/*
 * Maths with Bhavana – student portal & learning components.
 * Design tokens are shared with the theme (theme values take precedence).
 */
:root {
	--mwb-navy: #12254a;
	--mwb-navy-2: #1c3668;
	--mwb-blue: #3a5fae;
	--mwb-blue-soft: #6f8fd0;
	--mwb-sky: #eef3fb;
	--mwb-sky-2: #e2eaf7;
	--mwb-grey: #f5f6f8;
	--mwb-line: #dde3ee;
	--mwb-text: #182236;
	--mwb-muted: #5a6479;
	--mwb-white: #fff;
	--mwb-gold: #b08a44;
	--mwb-gold-soft: #f7efdf;
	--mwb-good: #1d7458;
	--mwb-good-soft: #e3f3ec;
	--mwb-mid: #a26f14;
	--mwb-mid-soft: #fbf1dc;
	--mwb-low: #b0413a;
	--mwb-low-soft: #fbe9e7;
	--mwb-radius: 14px;
	--mwb-radius-sm: 9px;
	--mwb-shadow: 0 1px 2px rgba(18, 37, 74, .06), 0 6px 20px rgba(18, 37, 74, .06);
	--mwb-shadow-lg: 0 10px 40px rgba(18, 37, 74, .14);
	--mwb-font-head: "Source Serif 4", Georgia, "Times New Roman", serif;
	--mwb-font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--mwb-ease: cubic-bezier(.2, .7, .2, 1);
}

.mwb, .mwb * { box-sizing: border-box; }
.mwb { font-family: var(--mwb-font-body); color: var(--mwb-text); line-height: 1.6; font-size: 16px; }
.mwb a { color: var(--mwb-blue); }
.mwb img, .mwb svg { max-width: 100%; }
.mwb .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.mwb :focus-visible { outline: 3px solid var(--mwb-blue-soft); outline-offset: 2px; border-radius: 6px; }
.mwb-hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.mwb-icon { flex: none; vertical-align: -4px; }
.mwb-muted { color: var(--mwb-muted); }
.mwb-center { text-align: center; }
.mwb-mt { margin-top: 1.25rem; }

/* ------------------------------------------------------------ Typography */
.mwb-h1 { font-family: var(--mwb-font-head); font-weight: 600; font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.4rem); line-height: 1.2; color: var(--mwb-navy); margin: .1em 0 .3em; letter-spacing: -.01em; }
.mwb-h2 { font-family: var(--mwb-font-head); font-weight: 600; font-size: clamp(1.25rem, 1.1rem + .6vw, 1.55rem); color: var(--mwb-navy); margin: 0 0 .8rem; line-height: 1.3; display: flex; align-items: center; gap: .5rem; }
.mwb-h3 { font-size: 1rem; font-weight: 650; color: var(--mwb-navy); margin: 1rem 0 .5rem; }
.mwb-eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .74rem; font-weight: 650; color: var(--mwb-gold); margin: 0; }
.mwb-eyebrow a { color: inherit; text-decoration: none; }
.mwb-lead { color: var(--mwb-muted); font-size: 1.05rem; max-width: 62ch; margin: 0; }
.mwb-page-head { margin-bottom: 1.5rem; }
.mwb-prose { font-size: 1.02rem; }
.mwb-prose > :first-child { margin-top: 0; }
.mwb-prose h3, .mwb-prose h4 { color: var(--mwb-navy); font-family: var(--mwb-font-head); margin: 1.2em 0 .4em; }
.mwb-prose ul, .mwb-prose ol { padding-left: 1.3em; }
.mwb-prose li { margin: .25em 0; }
.mwb-prose table { border-collapse: collapse; width: 100%; margin: 1em 0; font-size: .95rem; }
.mwb-prose th, .mwb-prose td { border: 1px solid var(--mwb-line); padding: .45em .6em; text-align: left; }
.mwb-prose th { background: var(--mwb-sky); }
.mwb-prose figure { margin: 1.2em 0; text-align: center; }
.mwb-prose figure svg { max-width: 460px; width: 100%; height: auto; }
.mwb figure.mwb-graph { margin: 1em auto; text-align: center; max-width: 460px; }
.mwb figure.mwb-graph svg { width: 100%; max-width: 420px; height: auto; display: block; margin: 0 auto; }
.mwb figure.mwb-graph figcaption { font-size: .85rem; color: var(--mwb-muted); margin-top: .4em; }
.mwb-prose figcaption { font-size: .85rem; color: var(--mwb-muted); margin-top: .4em; }
.mwb-prose .mwb-callout { background: var(--mwb-gold-soft); border-left: 4px solid var(--mwb-gold); padding: .8em 1em; border-radius: 0 10px 10px 0; margin: 1em 0; }
.mwb-math .katex-display { overflow-x: auto; overflow-y: hidden; padding: .3em 0; margin: .7em 0; }
.mwb-math .katex { font-size: 1.08em; }

/* --------------------------------------------------------------- Buttons */
.mwb-btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 44px; padding: .6rem 1.15rem; border-radius: 999px; border: 1.5px solid transparent; font: 600 .95rem/1.2 var(--mwb-font-body); cursor: pointer; text-decoration: none !important; transition: transform .15s var(--mwb-ease), box-shadow .2s, background .2s, color .2s, border-color .2s; white-space: nowrap; background: var(--mwb-white); color: var(--mwb-navy); border-color: var(--mwb-line); }
.mwb-btn:hover { transform: translateY(-1px); box-shadow: var(--mwb-shadow); }
.mwb-btn:active { transform: translateY(0); }
.mwb-btn--primary { background: var(--mwb-navy); color: #fff !important; border-color: var(--mwb-navy); }
.mwb-btn--primary:hover { background: var(--mwb-navy-2); }
.mwb-btn--accent { background: var(--mwb-gold); color: #fff !important; border-color: var(--mwb-gold); }
.mwb-btn--accent:hover { background: #9c783a; }
.mwb-btn--ghost { background: transparent; color: var(--mwb-navy) !important; border-color: var(--mwb-line); }
.mwb-btn--ghost:hover { background: var(--mwb-sky); border-color: var(--mwb-sky-2); }
.mwb-btn--danger { background: var(--mwb-low); color: #fff; border-color: var(--mwb-low); }
.mwb-btn--small { min-height: 36px; padding: .4rem .85rem; font-size: .85rem; }
.mwb-btn--block { width: 100%; }
.mwb-btn.is-selected { background: var(--mwb-navy); color: #fff; border-color: var(--mwb-navy); }
.mwb-btn.is-loading { opacity: .7; pointer-events: none; }
.mwb-btn.is-loading::after { content: ""; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: mwb-spin .7s linear infinite; }
.mwb-btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.mwb-btn-row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-top: 1rem; }
.mwb-btn-row--center { justify-content: center; }
.mwb-btn-row--end { justify-content: flex-end; }
.mwb-start-form { display: inline-flex; margin: 0; }
.mwb-start-form .mwb-btn--block, .mwb-test .mwb-start-form { width: 100%; }
.mwb-link { background: none; border: 0; padding: 0; color: var(--mwb-blue); font-weight: 600; cursor: pointer; text-decoration: none; font-size: .9rem; }
.mwb-link:hover { text-decoration: underline; }
.mwb-icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--mwb-line); background: #fff; color: var(--mwb-muted); cursor: pointer; transition: .2s; }
.mwb-icon-btn:hover { color: var(--mwb-navy); background: var(--mwb-sky); }
.mwb-bookmark { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--mwb-line); background: #fff; color: var(--mwb-muted); cursor: pointer; transition: .2s; flex: none; }
.mwb-bookmark:hover { color: var(--mwb-gold); }
.mwb-bookmark.is-active { color: var(--mwb-gold); background: var(--mwb-gold-soft); border-color: #ecdcb8; }
.mwb-bookmark.is-active svg { fill: currentColor; }
.mwb-bookmark.is-active svg { animation: mwb-pop .3s var(--mwb-ease); }

/* ------------------------------------------------------------- Pills etc */
.mwb-pill { display: inline-flex; align-items: center; gap: .3rem; padding: .18rem .6rem; border-radius: 999px; font-size: .76rem; font-weight: 600; background: var(--mwb-sky); color: var(--mwb-navy); white-space: nowrap; }
.mwb-pill--soft { background: var(--mwb-grey); color: var(--mwb-muted); }
.mwb-pill--good { background: var(--mwb-good-soft); color: var(--mwb-good); }
.mwb-pill--warn { background: var(--mwb-mid-soft); color: var(--mwb-mid); }
.mwb-score { display: inline-block; font-weight: 700; font-size: .85rem; padding: .12rem .5rem; border-radius: 8px; }
.mwb-band-good { color: var(--mwb-good); background: var(--mwb-good-soft); }
.mwb-band-mid { color: var(--mwb-mid); background: var(--mwb-mid-soft); }
.mwb-band-low { color: var(--mwb-low); background: var(--mwb-low-soft); }
.mwb-band-none { color: var(--mwb-muted); background: var(--mwb-grey); }
.mwb-count { display: inline-grid; place-items: center; min-width: 1.5em; height: 1.5em; border-radius: 999px; background: var(--mwb-sky-2); font-size: .75rem; padding: 0 .35em; }
.mwb-note { display: flex; gap: .5rem; align-items: flex-start; font-size: .82rem; color: var(--mwb-muted); background: var(--mwb-grey); border-radius: 10px; padding: .7rem .85rem; margin: 1rem 0 0; }
.mwb-note .mwb-icon { color: var(--mwb-blue); margin-top: 2px; }
.mwb-tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.mwb-tags li { background: var(--mwb-low-soft); color: var(--mwb-low); border-radius: 8px; padding: .25rem .6rem; font-size: .85rem; }

/* ---------------------------------------------------------------- Alerts */
.mwb-alert { border-radius: 10px; padding: .8rem 1rem; margin: 0 0 1rem; font-size: .95rem; border: 1px solid; }
.mwb-alert--error { background: var(--mwb-low-soft); border-color: #f1c9c5; color: #7d2a24; }
.mwb-alert--success { background: var(--mwb-good-soft); border-color: #bfe2d3; color: #145a44; }
.mwb-alert--info { background: var(--mwb-sky); border-color: var(--mwb-sky-2); color: var(--mwb-navy); }

/* ----------------------------------------------------------------- Forms */
.mwb-form { display: grid; gap: 1rem; }
.mwb-field { display: grid; gap: .35rem; margin: 0; border: 0; padding: 0; min-width: 0; }
.mwb-field > label, .mwb-field legend { font-weight: 600; font-size: .9rem; color: var(--mwb-navy); }
.mwb-field input[type=text], .mwb-field input[type=email], .mwb-field input[type=tel], .mwb-field input[type=password], .mwb-field input[type=search], .mwb-field input[type=number], .mwb-field select, .mwb-field textarea,
.mwb-filterbar select, .mwb-filterbar input { width: 100%; min-height: 46px; padding: .6rem .8rem; border: 1.5px solid var(--mwb-line); border-radius: 10px; font: inherit; font-size: 1rem; color: var(--mwb-text); background: #fff; transition: border-color .2s, box-shadow .2s; }
.mwb-field textarea { min-height: 120px; resize: vertical; }
.mwb-field input:focus, .mwb-field select:focus, .mwb-field textarea:focus, .mwb-filterbar input:focus, .mwb-filterbar select:focus { outline: none; border-color: var(--mwb-blue); box-shadow: 0 0 0 4px rgba(58, 95, 174, .15); }
.mwb-field [aria-invalid=true] { border-color: var(--mwb-low); }
.mwb-field input:disabled { background: var(--mwb-grey); color: var(--mwb-muted); }
.mwb-field__hint { font-size: .8rem; color: var(--mwb-muted); margin: 0; }
.mwb-field__error { font-size: .82rem; color: var(--mwb-low); margin: 0; font-weight: 500; }
.mwb-form__row { display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; font-size: .9rem; }
.mwb-check { display: flex; gap: .55rem; align-items: flex-start; cursor: pointer; font-size: .92rem; }
.mwb-check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--mwb-navy); flex: none; }
.mwb-grid-2 { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mwb-grid-3 { display: grid; gap: 1rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mwb-password { position: relative; }
.mwb-password input { padding-right: 4.2rem !important; }
.mwb-password__toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: var(--mwb-grey); border-radius: 8px; padding: .35rem .6rem; font-size: .8rem; font-weight: 600; color: var(--mwb-navy); cursor: pointer; }
.mwb-strength { display: flex; align-items: center; gap: .6rem; font-size: .78rem; color: var(--mwb-muted); min-height: 1.2em; }
.mwb-strength__bar { flex: 1; height: 5px; background: var(--mwb-grey); border-radius: 5px; overflow: hidden; }
.mwb-strength__bar i { display: block; height: 100%; width: 0; background: var(--mwb-low); transition: width .3s, background .3s; }
.mwb-strength[data-level="1"] i { width: 20%; }
.mwb-strength[data-level="2"] i { width: 45%; background: var(--mwb-mid); }
.mwb-strength[data-level="3"] i { width: 65%; background: var(--mwb-blue); }
.mwb-strength[data-level="4"] i, .mwb-strength[data-level="5"] i { width: 100%; background: var(--mwb-good); }
.mwb-topic-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .35rem .9rem; background: var(--mwb-grey); border-radius: 10px; padding: .8rem; }
.mwb-topic-check.is-empty { opacity: .5; }

/* ------------------------------------------------------------------ Auth */
.mwb-auth { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); min-height: min(760px, 100vh); background: #fff; border-radius: 20px; overflow: hidden; box-shadow: var(--mwb-shadow); margin: 1.5rem auto; max-width: 1180px; }
.mwb-auth__aside { position: relative; background: linear-gradient(160deg, var(--mwb-navy) 0%, #1a3a73 100%); color: #fff; padding: 2.5rem; overflow: hidden; display: flex; }
.mwb-auth__grid { position: absolute; inset: 0; width: 100%; height: 100%; color: rgba(255, 255, 255, .07); }
.mwb-auth__curve { stroke: var(--mwb-gold); opacity: .55; stroke-dasharray: 900; stroke-dashoffset: 900; animation: mwb-draw 2.4s var(--mwb-ease) .2s forwards; }
.mwb-auth__aside-inner { position: relative; display: flex; flex-direction: column; gap: 1rem; width: 100%; }
.mwb-auth__eyebrow { font-family: var(--mwb-font-head); font-size: 1.1rem; color: #e9d7b0; margin: 0; }
.mwb-auth__quote { font-family: var(--mwb-font-head); font-size: 1.55rem; line-height: 1.3; margin: 0; }
.mwb-auth__illustration { width: min(260px, 70%); height: auto; margin: auto auto 0; filter: drop-shadow(0 10px 30px rgba(0, 0, 0, .25)); }
.mwb-auth__points { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; font-size: .92rem; color: rgba(255, 255, 255, .85); }
.mwb-auth__points li::before { content: "✓"; color: var(--mwb-gold); margin-right: .5rem; font-weight: 700; }
.mwb-auth__main { padding: clamp(1.5rem, 4vw, 3.5rem); display: flex; align-items: center; justify-content: center; }
.mwb-auth__card { width: 100%; max-width: 440px; }
.mwb-auth__card--wide { max-width: 620px; }
.mwb-auth__title { font-family: var(--mwb-font-head); font-size: 2rem; color: var(--mwb-navy); margin: 0 0 .3rem; }
.mwb-auth__sub { color: var(--mwb-muted); margin: 0 0 1.4rem; }
.mwb-auth__alt { text-align: center; margin-top: 1.4rem; color: var(--mwb-muted); }

/* ----------------------------------------------------------- Portal shell */
.mwb-shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 2rem; align-items: start; max-width: 1320px; margin: 0 auto; padding: 1.5rem clamp(1rem, 3vw, 2rem) 3rem; }
.mwb-side { position: sticky; top: calc(var(--mwb-header-h, 76px) + 1rem); background: #fff; border: 1px solid var(--mwb-line); border-radius: var(--mwb-radius); padding: 1rem .7rem; box-shadow: var(--mwb-shadow); max-height: calc(100vh - var(--mwb-header-h, 76px) - 2rem); overflow: auto; }
.mwb-side__user { display: flex; gap: .7rem; align-items: center; padding: .3rem .5rem 1rem; border-bottom: 1px solid var(--mwb-line); margin-bottom: .6rem; }
.mwb-side__user strong { display: block; color: var(--mwb-navy); font-size: .95rem; line-height: 1.3; }
.mwb-side__user span { font-size: .78rem; color: var(--mwb-muted); }
.mwb-avatar { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(135deg, var(--mwb-navy), var(--mwb-blue)); color: #fff; font-weight: 700; font-family: var(--mwb-font-head); font-size: 1.2rem; flex: none; }
.mwb-side__nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.mwb-side__nav a { display: flex; align-items: center; gap: .7rem; padding: .55rem .7rem; border-radius: 10px; color: var(--mwb-text); text-decoration: none; font-size: .93rem; font-weight: 500; transition: background .15s, color .15s; }
.mwb-side__nav a:hover { background: var(--mwb-sky); color: var(--mwb-navy); }
.mwb-side__nav a.is-active { background: var(--mwb-navy); color: #fff; }
.mwb-side__nav a .mwb-icon { opacity: .85; }
.mwb-side__sep { border-top: 1px solid var(--mwb-line); margin-top: .5rem; padding-top: .5rem; }
.mwb-main { min-width: 0; }
.mwb-bottom-nav { display: none; }
.mwb-public { max-width: 1200px; margin: 0 auto; padding: 1.5rem clamp(1rem, 3vw, 2rem) 3rem; }

/* ----------------------------------------------------------------- Cards */
.mwb-card { background: #fff; border: 1px solid var(--mwb-line); border-radius: var(--mwb-radius); padding: clamp(1rem, 2.5vw, 1.5rem); box-shadow: var(--mwb-shadow); margin-bottom: 1.25rem; min-width: 0; }
.mwb-card--tint { background: var(--mwb-sky); border-color: var(--mwb-sky-2); box-shadow: none; }
.mwb-card--summary { background: linear-gradient(135deg, var(--mwb-gold-soft), #fff); border-color: #eadcbc; }
.mwb-card--danger { border-color: #f1c9c5; }
.mwb-card__title { font-size: 1.02rem; font-weight: 650; color: var(--mwb-navy); margin: 0 0 .9rem; display: flex; align-items: center; gap: .45rem; }
.mwb-card__head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: .6rem; }
.mwb-card__head .mwb-card__title { margin: 0; }
.card-hover { transition: transform .25s var(--mwb-ease), box-shadow .25s var(--mwb-ease), border-color .25s; }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--mwb-shadow-lg); border-color: var(--mwb-sky-2); }

/* -------------------------------------------------------------- Dashboard */
.mwb-dash-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem; flex-wrap: wrap; background: linear-gradient(120deg, var(--mwb-sky) 0%, #fff 70%); border: 1px solid var(--mwb-sky-2); border-radius: 18px; padding: clamp(1.2rem, 3vw, 2rem); position: relative; overflow: hidden; }
.mwb-dash-hero::after { content: ""; position: absolute; right: -40px; top: -40px; width: 220px; height: 220px; background: radial-gradient(circle, rgba(176, 138, 68, .14), transparent 70%); pointer-events: none; }
.mwb-continue { display: grid; gap: .1rem; min-width: 250px; background: var(--mwb-navy); color: #fff !important; padding: 1rem 3rem 1rem 1.2rem; border-radius: 14px; text-decoration: none; position: relative; }
.mwb-continue__label { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: #e9d7b0; }
.mwb-continue strong { font-size: 1.05rem; }
.mwb-continue__meta { font-size: .82rem; opacity: .8; }
.mwb-continue__arrow { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); transition: transform .2s; }
.mwb-continue:hover .mwb-continue__arrow { transform: translate(4px, -50%); }
.mwb-resume { display: grid; gap: .5rem; margin: 1rem 0; }
.mwb-resume__item { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; background: var(--mwb-mid-soft); border: 1px solid #f0dfb7; border-radius: 12px; padding: .6rem .9rem; }
.mwb-resume__item strong { flex: 1; min-width: 150px; }
.mwb-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin: 1.25rem 0; }
.mwb-stat { background: #fff; border: 1px solid var(--mwb-line); border-radius: var(--mwb-radius); padding: 1rem 1.1rem; box-shadow: var(--mwb-shadow); display: grid; gap: .15rem; min-width: 0; }
.mwb-stat__icon { width: 36px; height: 36px; border-radius: 10px; background: var(--mwb-sky); color: var(--mwb-blue); display: grid; place-items: center; margin-bottom: .3rem; }
.mwb-stat__value { font-family: var(--mwb-font-head); font-size: 1.9rem; font-weight: 600; color: var(--mwb-navy); line-height: 1.1; }
.mwb-stat__value small { font-size: .55em; color: var(--mwb-muted); margin-left: 2px; }
.mwb-stat__label { font-size: .82rem; color: var(--mwb-muted); }
.mwb-stat__hint { font-size: .72rem; color: var(--mwb-muted); }
.mwb-trend-up { color: var(--mwb-good); }
.mwb-trend-down { color: var(--mwb-low); }
.mwb-dash-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.mwb-dash-grid > .mwb-card { margin-bottom: 0; }
.mwb-dash-grid + .mwb-dash-grid, .mwb-dash-grid + .mwb-card, .mwb-card + .mwb-dash-grid { margin-top: 1.25rem; }
.mwb-dash-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mwb-dash-grid--wide { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.mwb-retry { display: flex; justify-content: space-between; gap: 1rem; }
.mwb-retry__count { font-family: var(--mwb-font-head); font-size: 2.6rem; color: var(--mwb-gold); line-height: 1; }
.mwb-card--retry { background: linear-gradient(160deg, #fff, var(--mwb-gold-soft)); border-color: #eadcbc; }

/* Rings / gauges / bars */
.mwb-ring-wrap { display: grid; justify-items: center; gap: .6rem; text-align: center; }
.mwb-ring-wrap--row { grid-template-columns: auto 1fr; text-align: left; align-items: center; gap: 1.2rem; }
.mwb-ring { position: relative; width: 132px; height: 132px; }
.mwb-ring--xl { width: 170px; height: 170px; }
.mwb-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.mwb-ring__track { fill: none; stroke: var(--mwb-grey); stroke-width: 10; }
.mwb-ring__fill { fill: none; stroke: var(--mwb-blue); stroke-width: 10; stroke-linecap: round; stroke-dasharray: 327; stroke-dashoffset: 327; transition: stroke-dashoffset 1.1s var(--mwb-ease); background: none; }
.mwb-ring__fill.mwb-band-good { stroke: var(--mwb-good); background: none; }
.mwb-ring__fill.mwb-band-mid { stroke: var(--mwb-gold); background: none; }
.mwb-ring__fill.mwb-band-low { stroke: var(--mwb-low); background: none; }
.mwb-ring__value { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--mwb-font-head); font-size: 1.9rem; font-weight: 600; color: var(--mwb-navy); }
.mwb-ring--xl .mwb-ring__value { font-size: 2.5rem; }
.mwb-ring__value small { font-size: .5em; }
.mwb-gauge { position: relative; max-width: 240px; margin: 0 auto; text-align: center; }
.mwb-gauge svg { width: 100%; height: auto; display: block; }
.mwb-gauge__track { fill: none; stroke: var(--mwb-grey); stroke-width: 14; stroke-linecap: round; }
.mwb-gauge__fill { fill: none; stroke: url(#none) var(--mwb-gold); stroke: var(--mwb-gold); stroke-width: 14; stroke-linecap: round; stroke-dasharray: 268; stroke-dashoffset: 268; transition: stroke-dashoffset 1.2s var(--mwb-ease); }
.mwb-gauge__value { position: absolute; left: 0; right: 0; top: 48%; font-family: var(--mwb-font-head); font-size: 2.3rem; font-weight: 600; color: var(--mwb-navy); line-height: 1; }
.mwb-gauge__label { display: block; font-size: .85rem; font-weight: 600; color: var(--mwb-muted); margin-top: .3rem; }
.mwb-bar { display: block; height: 8px; background: var(--mwb-grey); border-radius: 8px; overflow: hidden; min-width: 60px; }
.mwb-bar--lg { height: 10px; }
.mwb-bar i { display: block; height: 100%; width: var(--w, 0%); background: linear-gradient(90deg, var(--mwb-blue), var(--mwb-navy)); border-radius: inherit; }
.mwb-bar i.mwb-band-good { background: var(--mwb-good); }
.mwb-bar i.mwb-band-mid { background: var(--mwb-gold); }
.mwb-bar i.mwb-band-low { background: var(--mwb-low); }
.mwb-anim .progress-fill { width: 0; transition: width 1s var(--mwb-ease); }
.mwb-anim .progress-fill.is-in { width: var(--w, 0%); }
.mwb-mini-bars { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .5rem; font-size: .82rem; }
.mwb-mini-bars li { display: grid; grid-template-columns: 120px 1fr 40px; align-items: center; gap: .6rem; }
.mwb-mini-bars b { text-align: right; color: var(--mwb-navy); }

/* Lists on dashboard */
.mwb-attempt-list, .mwb-area-list, .mwb-recs, .mwb-chapter-progress, .mwb-weak-list, .mwb-quick__list { list-style: none; margin: 0; padding: 0; }
.mwb-attempt-list li + li, .mwb-area-list li + li, .mwb-recs li + li, .mwb-weak-list li + li { border-top: 1px solid var(--mwb-line); }
.mwb-attempt-list a { display: grid; grid-template-columns: 1fr auto; gap: .1rem .8rem; padding: .7rem 0; text-decoration: none; color: inherit; }
.mwb-attempt-list a:hover .mwb-attempt-list__title { color: var(--mwb-blue); }
.mwb-attempt-list__title { font-weight: 600; color: var(--mwb-navy); }
.mwb-attempt-list__meta { grid-column: 1; font-size: .8rem; color: var(--mwb-muted); }
.mwb-attempt-list .mwb-score { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.mwb-area-list li, .mwb-weak-list li { display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding: .6rem 0; }
.mwb-area-list li > span:first-child, .mwb-weak-list li > div { display: grid; min-width: 0; }
.mwb-area-list small, .mwb-weak-list small { color: var(--mwb-muted); font-size: .78rem; }
.mwb-weak-list strong { color: var(--mwb-navy); font-weight: 600; }
.mwb-rec { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .75rem 0; }
.mwb-rec strong { color: var(--mwb-navy); display: block; }
.mwb-rec span { font-size: .8rem; }
.mwb-rec p { margin: .15rem 0 0; font-size: .86rem; color: var(--mwb-muted); }
.mwb-rec--weak strong::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--mwb-low); margin-right: .45rem; vertical-align: 2px; }
.mwb-chapter-progress { display: grid; gap: .55rem; }
.mwb-chapter-progress li { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(80px, 1fr) 44px; gap: .8rem; align-items: center; font-size: .92rem; }
.mwb-chapter-progress a { color: var(--mwb-text); text-decoration: none; display: flex; align-items: center; gap: .55rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mwb-chapter-progress a:hover { color: var(--mwb-blue); }
.mwb-chapter-progress__n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: var(--mwb-sky); font-size: .75rem; font-weight: 700; color: var(--mwb-navy); flex: none; }
.mwb-chapter-progress b { font-size: .82rem; text-align: right; color: var(--mwb-navy); }
.mwb-revision-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 1.25rem; }
.mwb-revision-link { display: grid; gap: .1rem; background: #fff; border: 1px solid var(--mwb-line); border-radius: var(--mwb-radius); padding: 1rem 1.1rem; text-decoration: none; color: var(--mwb-text) !important; }
.mwb-revision-link .mwb-icon { color: var(--mwb-gold); width: 26px; height: 26px; margin-bottom: .3rem; }
.mwb-revision-link strong { color: var(--mwb-navy); }
.mwb-revision-link span { font-size: .84rem; color: var(--mwb-muted); }

/* --------------------------------------------------------------- Chapters */
.mwb-unit { margin: 0 0 2.2rem; }
.mwb-unit__head { display: flex; align-items: baseline; gap: .8rem; flex-wrap: wrap; margin-bottom: 1rem; border-bottom: 1px solid var(--mwb-line); padding-bottom: .5rem; }
.mwb-unit__title { font-family: var(--mwb-font-head); font-size: 1.3rem; color: var(--mwb-navy); margin: 0; }
.mwb-chapter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.1rem; }
.mwb-chapter-card { position: relative; background: #fff; border: 1px solid var(--mwb-line); border-radius: 16px; padding: 1.2rem 1.2rem 1rem; display: flex; flex-direction: column; gap: .6rem; box-shadow: var(--mwb-shadow); overflow: hidden; }
.mwb-chapter-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: linear-gradient(90deg, var(--mwb-navy), var(--mwb-blue), var(--mwb-gold)); transform: scaleX(0); transform-origin: left; transition: transform .4s var(--mwb-ease); }
.mwb-chapter-card:hover::before, .mwb-chapter-card.is-open::before { transform: scaleX(1); }
.mwb-chapter-card__link { text-decoration: none; color: inherit; display: grid; gap: .3rem; }
.mwb-chapter-card__num { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--mwb-gold); font-weight: 700; }
.mwb-chapter-card .mwb-chapter-icon { color: var(--mwb-blue); width: 52px; height: 46px; transition: transform .35s var(--mwb-ease), color .3s; }
.mwb-chapter-card:hover .mwb-chapter-icon { transform: scale(1.08) rotate(-3deg); color: var(--mwb-navy); }
.mwb-chapter-card__title { font-family: var(--mwb-font-head); font-size: 1.2rem; font-weight: 600; color: var(--mwb-navy); margin: 0; line-height: 1.25; }
.mwb-chapter-card__meta { display: flex; flex-wrap: wrap; gap: .3rem .9rem; font-size: .82rem; color: var(--mwb-muted); align-items: center; }
.mwb-chapter-card__progress { display: grid; gap: .25rem; }
.mwb-chapter-card__pct { font-size: .78rem; color: var(--mwb-muted); }
.mwb-chapter-card__toggle { display: none; align-items: center; justify-content: space-between; border: 0; background: var(--mwb-grey); border-radius: 10px; padding: .55rem .8rem; font: 600 .85rem var(--mwb-font-body); color: var(--mwb-navy); cursor: pointer; min-height: 40px; }
.mwb-chapter-card__toggle .mwb-icon { transition: transform .25s; transform: rotate(90deg); }
.mwb-chapter-card.is-open .mwb-chapter-card__toggle .mwb-icon { transform: rotate(-90deg); }
.mwb-chapter-card__reveal { display: grid; gap: .3rem; }
.mwb-chapter-card__topics { margin: 0; padding-left: 1.2rem; font-size: .88rem; display: grid; gap: .15rem; }
.mwb-chapter-card__topics a { color: var(--mwb-text); text-decoration: none; }
.mwb-chapter-card__topics a:hover { color: var(--mwb-blue); text-decoration: underline; }
.mwb-chapter-card .mwb-btn-row { margin-top: .5rem; }
@media (hover: hover) and (min-width: 900px) {
	.mwb-chapter-card__reveal { max-height: 0; opacity: 0; overflow: hidden; transition: max-height .45s var(--mwb-ease), opacity .3s; }
	.mwb-chapter-card:hover .mwb-chapter-card__reveal, .mwb-chapter-card:focus-within .mwb-chapter-card__reveal { max-height: 340px; opacity: 1; }
}
@media (hover: none), (max-width: 899px) {
	.mwb-chapter-card__toggle { display: flex; }
	.mwb-chapter-card__reveal { display: none; }
	.mwb-chapter-card.is-open .mwb-chapter-card__reveal { display: grid; animation: mwb-fade .3s; }
}

/* Chapter & topic pages */
.mwb-crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .3rem; padding: 0; margin: 0 0 1rem; font-size: .84rem; color: var(--mwb-muted); }
.mwb-crumbs li + li::before { content: "/"; margin-right: .3rem; opacity: .5; }
.mwb-crumbs a { color: var(--mwb-muted); text-decoration: none; }
.mwb-crumbs a:hover { color: var(--mwb-blue); }
.mwb-chapter-head { display: grid; grid-template-columns: auto 1fr; gap: 1.5rem; align-items: start; background: linear-gradient(120deg, var(--mwb-sky), #fff 75%); border: 1px solid var(--mwb-sky-2); border-radius: 18px; padding: clamp(1.2rem, 3vw, 2rem); margin-bottom: 1rem; }
.mwb-chapter-head__icon { width: 88px; height: 88px; border-radius: 20px; background: #fff; display: grid; place-items: center; color: var(--mwb-blue); box-shadow: var(--mwb-shadow); }
.mwb-chapter-head__icon .mwb-chapter-icon { width: 60px; height: 52px; }
.mwb-chapter-head__meta { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .88rem; color: var(--mwb-muted); }
.mwb-chapter-head__progress { display: grid; grid-template-columns: minmax(120px, 280px) auto; gap: .8rem; align-items: center; font-size: .85rem; color: var(--mwb-muted); margin-top: .7rem; }
.mwb-topic-head { margin-bottom: 1rem; }
.mwb-topic-head__status { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; font-size: .88rem; }
.mwb-subnav { position: sticky; top: calc(var(--mwb-header-h, 76px) + .25rem); z-index: 5; display: flex; gap: .3rem; overflow-x: auto; scrollbar-width: none; background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px); border: 1px solid var(--mwb-line); border-radius: 999px; padding: .3rem; margin: 0 0 1.5rem; }
.mwb-subnav::-webkit-scrollbar { display: none; }
.mwb-subnav a { flex: none; padding: .4rem .85rem; border-radius: 999px; font-size: .85rem; font-weight: 600; color: var(--mwb-muted); text-decoration: none; white-space: nowrap; }
.mwb-subnav a:hover { background: var(--mwb-sky); color: var(--mwb-navy); }
.mwb-section { margin: 0 0 2.2rem; scroll-margin-top: calc(var(--mwb-header-h, 76px) + 70px); }
.mwb-topic-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.mwb-topic-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; grid-template-areas: "n title meta" "n bar bar"; gap: .15rem .8rem; align-items: center; background: #fff; border: 1px solid var(--mwb-line); border-radius: 12px; padding: .75rem 1rem; transition: border-color .2s, box-shadow .2s; }
.mwb-topic-row:hover { border-color: var(--mwb-blue-soft); box-shadow: var(--mwb-shadow); }
.mwb-topic-row__n { grid-area: n; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--mwb-sky); color: var(--mwb-navy); font-weight: 700; font-size: .85rem; }
.mwb-topic-row.is-done .mwb-topic-row__n { background: var(--mwb-good-soft); color: var(--mwb-good); }
.mwb-topic-row__title { grid-area: title; font-weight: 600; color: var(--mwb-navy) !important; text-decoration: none; }
.mwb-topic-row__title:hover { color: var(--mwb-blue) !important; }
.mwb-topic-row__meta { grid-area: meta; display: flex; gap: .6rem; align-items: center; font-size: .8rem; flex-wrap: wrap; justify-content: flex-end; }
.mwb-topic-row__bar { grid-area: bar; height: 5px; }
.mwb-topic-row .mwb-bookmark { grid-area: meta; justify-self: end; }
.mwb-action-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.mwb-action { background: #fff; border: 1px solid var(--mwb-line); border-radius: var(--mwb-radius); padding: 1.2rem; display: flex; flex-direction: column; gap: .4rem; box-shadow: var(--mwb-shadow); }
.mwb-action > .mwb-icon { width: 30px; height: 30px; color: var(--mwb-gold); }
.mwb-action h3 { margin: .2rem 0 0; font-size: 1.05rem; color: var(--mwb-navy); }
.mwb-action p { margin: 0 0 .6rem; color: var(--mwb-muted); font-size: .9rem; flex: 1; }
.mwb-cta-band { display: flex; justify-content: space-between; align-items: center; gap: 1.2rem; flex-wrap: wrap; background: var(--mwb-navy); color: #fff; border-radius: 16px; padding: 1.3rem 1.5rem; margin: 2rem 0; }
.mwb-cta-band p { margin: .2rem 0 0; opacity: .85; font-size: .92rem; }
.mwb-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 2.5rem 0 1rem; }
.mwb-pager a { display: grid; gap: .1rem; background: #fff; border: 1px solid var(--mwb-line); border-radius: 12px; padding: .8rem 1rem; text-decoration: none; color: var(--mwb-navy); }
.mwb-pager a span { font-size: .75rem; color: var(--mwb-muted); text-transform: uppercase; letter-spacing: .08em; }
.mwb-pager__next { text-align: right; grid-column: 2; }
.mwb-pager a:hover { border-color: var(--mwb-blue-soft); }

/* Items (formula / key point / mistake / example) */
.mwb-item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; align-items: start; }
.mwb-item { background: #fff; border: 1px solid var(--mwb-line); border-radius: var(--mwb-radius); padding: 1rem 1.1rem; box-shadow: var(--mwb-shadow); transition: border-color .2s, box-shadow .2s; min-width: 0; }
.mwb-item:hover { border-color: var(--mwb-sky-2); box-shadow: var(--mwb-shadow-lg); }
.mwb-item__head { display: flex; gap: .7rem; align-items: flex-start; }
.mwb-item__icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--mwb-sky); color: var(--mwb-blue); flex: none; }
.mwb-item--formula .mwb-item__icon { background: var(--mwb-sky); color: var(--mwb-navy); }
.mwb-item--key_point .mwb-item__icon { background: var(--mwb-gold-soft); color: var(--mwb-gold); }
.mwb-item--common_mistake .mwb-item__icon { background: var(--mwb-low-soft); color: var(--mwb-low); }
.mwb-item--solved_example .mwb-item__icon { background: var(--mwb-good-soft); color: var(--mwb-good); }
.mwb-item__titles { flex: 1; min-width: 0; }
.mwb-item__title { font-size: 1rem; font-weight: 650; color: var(--mwb-navy); margin: .3rem 0 0; line-height: 1.35; }
.mwb-item__ctx { font-size: .76rem; color: var(--mwb-muted); }
.mwb-item__body { margin-top: .6rem; overflow-x: auto; }
.mwb-item__body > :last-child, .mwb-item__detail > :last-child { margin-bottom: 0; }
.mwb-item--formula .mwb-item__body { background: var(--mwb-sky); border-radius: 10px; padding: .4rem .8rem; }
.mwb-item--common_mistake .mwb-item__body { border-left: 3px solid var(--mwb-low); padding-left: .8rem; }
.mwb-item__toggle { display: inline-flex; align-items: center; gap: .35rem; margin-top: .7rem; border: 0; background: none; padding: .35rem 0; color: var(--mwb-blue); font: 600 .86rem var(--mwb-font-body); cursor: pointer; min-height: 36px; }
.mwb-item__toggle .mwb-icon { transition: transform .25s; transform: rotate(90deg); width: 16px; }
.mwb-item__toggle[aria-expanded=true] .mwb-icon { transform: rotate(-90deg); }
.mwb-item__detail { margin-top: .4rem; padding-top: .7rem; border-top: 1px dashed var(--mwb-line); font-size: .95rem; animation: mwb-fade .3s; overflow-x: auto; }
.mwb-item--common_mistake .mwb-item__detail { background: var(--mwb-good-soft); border: 0; border-radius: 10px; padding: .7rem .9rem; }
.mwb-item[hidden], .mwb-rev-group[hidden] { display: none; }

/* Revision hub + filter bar */
.mwb-revision-hub { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; margin-bottom: 1.5rem; }
.mwb-revision-hub__card { display: flex; flex-direction: column; gap: .5rem; background: #fff; border: 1px solid var(--mwb-line); border-radius: 18px; padding: 1.5rem; text-decoration: none; color: var(--mwb-text) !important; box-shadow: var(--mwb-shadow); }
.mwb-revision-hub__icon { width: 52px; height: 52px; border-radius: 14px; background: var(--mwb-sky); color: var(--mwb-navy); display: grid; place-items: center; }
.mwb-revision-hub__icon .mwb-icon { width: 28px; height: 28px; }
.mwb-revision-hub__card h2 { font-family: var(--mwb-font-head); color: var(--mwb-navy); margin: .3rem 0 0; font-size: 1.35rem; }
.mwb-revision-hub__card p { margin: 0; color: var(--mwb-muted); flex: 1; }
.mwb-revision-hub__card .mwb-pill { align-self: flex-start; }
.mwb-filterbar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; background: #fff; border: 1px solid var(--mwb-line); border-radius: 14px; padding: .6rem; margin-bottom: 1.5rem; box-shadow: var(--mwb-shadow); position: sticky; top: calc(var(--mwb-header-h, 76px) + .25rem); z-index: 5; }
.mwb-filterbar__search { position: relative; flex: 1 1 220px; }
.mwb-filterbar__search .mwb-icon { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: var(--mwb-muted); }
.mwb-filterbar__search input { padding-left: 2.4rem; }
.mwb-filterbar select { width: auto; flex: 0 1 220px; }

/* Practice */
.mwb-practice-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.mwb-quick { display: grid; gap: 1rem; }
.mwb-quick__card { background: #fff; border: 1px solid var(--mwb-line); border-radius: var(--mwb-radius); padding: 1.1rem; box-shadow: var(--mwb-shadow); }
.mwb-quick__card > .mwb-icon { color: var(--mwb-blue); width: 24px; height: 24px; }
.mwb-quick__card--accent { background: linear-gradient(160deg, #fff, var(--mwb-gold-soft)); border-color: #eadcbc; }
.mwb-quick__card--accent > .mwb-icon { color: var(--mwb-gold); }
.mwb-quick__card h3 { margin: .3rem 0 .2rem; font-size: 1rem; color: var(--mwb-navy); }
.mwb-quick__card p { margin: 0 0 .6rem; color: var(--mwb-muted); font-size: .88rem; }
.mwb-quick__list li { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .35rem 0; font-size: .88rem; }

/* Tests */
.mwb-test-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.mwb-test-grid--compact { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.mwb-test { background: #fff; border: 1px solid var(--mwb-line); border-radius: var(--mwb-radius); padding: 1.2rem; display: flex; flex-direction: column; gap: .5rem; box-shadow: var(--mwb-shadow); }
.mwb-test .mwb-pill { align-self: flex-start; }
.mwb-test__title { font-size: 1.05rem; margin: 0; color: var(--mwb-navy); line-height: 1.35; }
.mwb-test__desc { font-size: .88rem; color: var(--mwb-muted); margin: 0; }
.mwb-test__facts { list-style: none; padding: 0; margin: 0 0 .3rem; display: flex; flex-wrap: wrap; gap: .3rem 1rem; font-size: .85rem; color: var(--mwb-muted); flex: 1; align-content: flex-start; }
.mwb-test__facts li { display: flex; gap: .35rem; align-items: center; }
.mwb-test__stats { font-size: .82rem; color: var(--mwb-good); font-weight: 600; margin: 0; }
.mwb-test--compact { flex-direction: row; align-items: center; justify-content: space-between; padding: .8rem 1rem; }
.mwb-test--compact .mwb-test__title { font-size: .95rem; }
.mwb-test--compact.is-disabled { opacity: .65; box-shadow: none; }

/* My learning */
.mwb-path { background: #fff; border: 1px solid var(--mwb-line); border-radius: 14px; margin-bottom: .7rem; box-shadow: var(--mwb-shadow); }
.mwb-path summary { display: grid; grid-template-columns: 32px minmax(0, 1fr) minmax(80px, 200px) 44px; gap: .8rem; align-items: center; padding: .85rem 1rem; cursor: pointer; list-style: none; }
.mwb-path summary::-webkit-details-marker { display: none; }
.mwb-path__n { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--mwb-navy); color: #fff; font-weight: 700; font-size: .85rem; }
.mwb-path__title { font-weight: 650; color: var(--mwb-navy); }
.mwb-path__pct { text-align: right; font-weight: 700; font-size: .85rem; color: var(--mwb-navy); }
.mwb-path__topics { list-style: none; margin: 0; padding: 0 1rem 1rem 3.6rem; display: grid; gap: .3rem; }
.mwb-path__topics li { display: grid; grid-template-columns: 22px 1fr auto; gap: .5rem; align-items: center; font-size: .92rem; padding: .25rem 0; }
.mwb-path__topics a { color: var(--mwb-text); text-decoration: none; }
.mwb-path__topics a:hover { color: var(--mwb-blue); }
.mwb-path__topics .mwb-muted { font-size: .78rem; }
.mwb-path__status { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--mwb-line); display: grid; place-items: center; }
.mwb-path__topics li.is-started .mwb-path__status { border-color: var(--mwb-gold); }
.mwb-path__topics li.is-done .mwb-path__status { background: var(--mwb-good); border-color: var(--mwb-good); color: #fff; }
.mwb-path__status .mwb-icon { width: 13px; height: 13px; }

/* Tabs */
.mwb-tabs__list { display: flex; gap: .4rem; overflow-x: auto; border-bottom: 1px solid var(--mwb-line); margin-bottom: 1.2rem; }
.mwb-tabs__list [role=tab] { border: 0; background: none; padding: .7rem 1rem; font: 600 .92rem var(--mwb-font-body); color: var(--mwb-muted); cursor: pointer; border-bottom: 3px solid transparent; white-space: nowrap; display: flex; gap: .4rem; align-items: center; }
.mwb-tabs__list [role=tab][aria-selected=true] { color: var(--mwb-navy); border-bottom-color: var(--mwb-gold); }
.mwb-bq-list { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .8rem; }
.mwb-bq { background: #fff; border: 1px solid var(--mwb-line); border-radius: 12px; padding: 1rem; }
.mwb-bq__meta { font-size: .78rem; color: var(--mwb-muted); margin-bottom: .3rem; }
.mwb-bq__tools { display: flex; gap: .6rem; align-items: center; margin-top: .5rem; }

/* ----------------------------------------------------------- Empty state */
.mwb-empty { text-align: center; padding: 2.5rem 1rem; max-width: 520px; margin: 0 auto; }
.mwb-empty__art { width: 150px; height: 140px; fill: none; stroke: var(--mwb-blue-soft); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; margin-bottom: .5rem; }
.mwb-empty__art .acc { stroke: var(--mwb-gold); }
.mwb-empty__art .dot { fill: var(--mwb-gold); stroke: none; }
.mwb-empty__title { font-family: var(--mwb-font-head); color: var(--mwb-navy); font-size: 1.4rem; margin: 0 0 .4rem; }
.mwb-empty__text { color: var(--mwb-muted); margin: 0 0 1.2rem; }

/* Skeleton */
.mwb-skeleton { display: grid; gap: .8rem; }
.mwb-skel { display: block; border-radius: 8px; background: linear-gradient(90deg, var(--mwb-grey) 25%, #e9ecf2 50%, var(--mwb-grey) 75%); background-size: 200% 100%; animation: mwb-shimmer 1.2s infinite; }
.mwb-skel--line { height: 16px; }
.mwb-skel--block { height: 110px; }
.mwb-skel.w30 { width: 30%; }
.mwb-skel.w60 { width: 60%; }

/* ---------------------------------------------------------------- Runner */
.mwb-focus-mode .mwb-runner { max-width: 1180px; margin: 0 auto; padding: 0 clamp(.75rem, 3vw, 1.5rem) 110px; }
.mwb-runner__bar { position: sticky; top: var(--mwb-admin-bar, 0px); z-index: 20; display: flex; align-items: center; gap: .8rem; background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px); border-bottom: 1px solid var(--mwb-line); padding: .7rem 0; }
.mwb-runner__exit { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--mwb-line); color: var(--mwb-navy); flex: none; }
.mwb-runner__heading { flex: 1; min-width: 0; }
.mwb-runner__kind { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--mwb-gold); font-weight: 700; }
.mwb-runner__title { font-size: 1rem; margin: 0; color: var(--mwb-navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 650; font-family: var(--mwb-font-body); }
.mwb-runner__timer { display: flex; align-items: center; gap: .35rem; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--mwb-navy); background: var(--mwb-sky); border-radius: 999px; padding: .4rem .8rem; }
.mwb-runner__timer.is-low { background: var(--mwb-mid-soft); color: var(--mwb-mid); }
.mwb-runner__timer.is-critical { background: var(--mwb-low-soft); color: var(--mwb-low); animation: mwb-pulse 1s infinite; }
.mwb-runner__save { font-size: .78rem; color: var(--mwb-muted); min-width: 60px; text-align: right; }
.mwb-runner__save.is-saved { color: var(--mwb-good); }
.mwb-runner__save.is-error { color: var(--mwb-low); }
.mwb-runner__progress { height: 3px; background: var(--mwb-grey); }
.mwb-runner__progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--mwb-blue), var(--mwb-gold)); transition: width .4s var(--mwb-ease); }
.mwb-runner__body { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 1.5rem; margin-top: 1.25rem; align-items: start; }
.mwb-runner__main { min-width: 0; }
.mwb-runner__palette { position: sticky; top: 90px; background: #fff; border: 1px solid var(--mwb-line); border-radius: var(--mwb-radius); padding: 1rem; box-shadow: var(--mwb-shadow); }
.mwb-palette__head { display: flex; justify-content: space-between; align-items: center; }
.mwb-palette__head h2 { font-size: .95rem; margin: 0 0 .7rem; color: var(--mwb-navy); }
.mwb-palette__close { display: none; border: 0; background: none; cursor: pointer; color: var(--mwb-muted); }
.mwb-palette { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: .45rem; max-height: 50vh; overflow: auto; padding: 2px; }
.mwb-palette__q { position: relative; height: 40px; border-radius: 10px; border: 1.5px solid var(--mwb-line); background: #fff; font: 600 .9rem var(--mwb-font-body); color: var(--mwb-muted); cursor: pointer; transition: .15s; }
.mwb-palette__q:hover { border-color: var(--mwb-blue-soft); }
.mwb-palette__q.is-answered { background: var(--mwb-navy); border-color: var(--mwb-navy); color: #fff; }
.mwb-palette__q.is-marked::after { content: ""; position: absolute; top: -4px; right: -4px; width: 12px; height: 12px; border-radius: 50%; background: var(--mwb-gold); border: 2px solid #fff; }
.mwb-palette__q.is-current { outline: 3px solid var(--mwb-blue-soft); outline-offset: 1px; }
.mwb-palette__legend { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: .35rem; font-size: .82rem; color: var(--mwb-muted); }
.mwb-palette__legend li { display: flex; align-items: center; gap: .5rem; }
.mwb-palette__legend b { margin-left: auto; color: var(--mwb-navy); }
.mwb-palette__legend i { width: 14px; height: 14px; border-radius: 4px; border: 1.5px solid var(--mwb-line); }
.mwb-palette__legend i.is-answered { background: var(--mwb-navy); border-color: var(--mwb-navy); }
.mwb-palette__legend i.is-marked { background: var(--mwb-gold); border-color: var(--mwb-gold); border-radius: 50%; }
.mwb-runner__nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: center; gap: .6rem; padding: .7rem 1rem calc(.7rem + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .97); backdrop-filter: blur(10px); border-top: 1px solid var(--mwb-line); }
.mwb-runner__mark.is-active { background: var(--mwb-gold-soft); border-color: var(--mwb-gold); color: var(--mwb-gold) !important; }
.mwb-runner__palette-btn { display: none; }
.mwb-q { background: #fff; border: 1px solid var(--mwb-line); border-radius: 18px; padding: clamp(1.1rem, 3vw, 2rem); box-shadow: var(--mwb-shadow); }
.mwb-q--next { animation: mwb-slide-l .28s var(--mwb-ease); }
.mwb-q--prev { animation: mwb-slide-r .28s var(--mwb-ease); }
.mwb-q--in { animation: mwb-fade .3s; }
.mwb-q__head { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.mwb-q__num { font-family: var(--mwb-font-head); font-size: 1.3rem; font-weight: 600; color: var(--mwb-navy); outline: none; }
.mwb-q__num small { font-size: .7em; color: var(--mwb-muted); font-weight: 400; }
.mwb-q__tags { display: flex; gap: .3rem; flex-wrap: wrap; }
.mwb-q__tools { margin-left: auto; display: flex; gap: .4rem; }
.mwb-q__ctx { font-size: .8rem; color: var(--mwb-muted); margin: .3rem 0 1rem; }
.mwb-q__text { font-size: 1.08rem; line-height: 1.7; margin-bottom: 1.2rem; overflow-x: auto; }
.mwb-passage { background: var(--mwb-sky); border-left: 4px solid var(--mwb-blue); border-radius: 0 12px 12px 0; padding: .9rem 1.1rem; margin-bottom: 1rem; font-size: .98rem; overflow-x: auto; }
.mwb-passage--collapsed summary { cursor: pointer; font-weight: 600; color: var(--mwb-navy); }
.mwb-options { display: grid; gap: .7rem; }
.mwb-option { display: flex; align-items: center; gap: .9rem; width: 100%; text-align: left; border: 1.5px solid var(--mwb-line); background: #fff; border-radius: 14px; padding: .85rem 1rem; cursor: pointer; font: inherit; color: var(--mwb-text); min-height: 56px; transition: border-color .15s, background .15s, transform .12s; }
.mwb-option:hover { border-color: var(--mwb-blue-soft); background: #fbfcfe; }
.mwb-option:active { transform: scale(.995); }
.mwb-option__label { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--mwb-grey); font-weight: 700; color: var(--mwb-navy); flex: none; transition: .15s; }
.mwb-option__body { flex: 1; min-width: 0; overflow-x: auto; }
.mwb-option.is-selected { border-color: var(--mwb-navy); background: var(--mwb-sky); box-shadow: 0 0 0 3px rgba(18, 37, 74, .08); }
.mwb-option.is-selected .mwb-option__label { background: var(--mwb-navy); color: #fff; }
.mwb-q__clear { margin-top: .8rem; }
.mwb-q__numeric input { max-width: 320px; font-size: 1.15rem; }
.mwb-submitted { text-align: center; padding: 3rem 1rem; }
.mwb-submitted h2 { font-family: var(--mwb-font-head); color: var(--mwb-navy); }
.mwb-check-anim { width: 80px; height: 80px; fill: none; stroke: var(--mwb-good); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.mwb-check-anim circle { stroke-dasharray: 160; stroke-dashoffset: 160; animation: mwb-dash .6s forwards; }
.mwb-check-anim path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: mwb-dash .4s .45s forwards; }
.mwb-submit-summary { list-style: none; padding: 0; margin: .5rem 0 1rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; text-align: center; }
.mwb-submit-summary li { background: var(--mwb-grey); border-radius: 10px; padding: .6rem .3rem; font-size: .8rem; color: var(--mwb-muted); }
.mwb-submit-summary b { display: block; font-size: 1.4rem; color: var(--mwb-navy); font-family: var(--mwb-font-head); }
.mwb-submit-summary .is-warn b { color: var(--mwb-mid); }

/* ----------------------------------------------------------------- Modal */
.mwb-modal { position: fixed; inset: 0; z-index: 100000; background: rgba(12, 22, 44, .55); display: grid; place-items: center; padding: 1rem; animation: mwb-fade .2s; }
.mwb-modal[hidden] { display: none; }
.mwb-modal__box { background: #fff; border-radius: 18px; padding: 1.5rem; width: min(520px, 100%); box-shadow: var(--mwb-shadow-lg); animation: mwb-scale .25s var(--mwb-ease); max-height: 90vh; overflow: auto; }
.mwb-modal__box h2 { font-family: var(--mwb-font-head); color: var(--mwb-navy); margin: 0 0 .5rem; font-size: 1.35rem; }
body.mwb-modal-open { overflow: hidden; }
.mwb-toasts { position: fixed; z-index: 100001; left: 50%; bottom: 90px; transform: translateX(-50%); display: grid; gap: .5rem; width: min(420px, calc(100% - 2rem)); pointer-events: none; }
.mwb-toast { background: var(--mwb-navy); color: #fff; padding: .7rem 1rem; border-radius: 12px; box-shadow: var(--mwb-shadow-lg); font-size: .9rem; animation: mwb-up .25s var(--mwb-ease); transition: opacity .4s, transform .4s; }
.mwb-toast--error { background: var(--mwb-low); }
.mwb-toast--success { background: var(--mwb-good); }
.mwb-toast.is-out { opacity: 0; transform: translateY(8px); }

/* ---------------------------------------------------------------- Result */
.mwb-result { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); gap: 1.5rem; background: #fff; border: 1px solid var(--mwb-line); border-radius: 20px; padding: clamp(1.2rem, 3vw, 2rem); box-shadow: var(--mwb-shadow); margin-bottom: 1.2rem; position: relative; overflow: hidden; }
.mwb-result__score { text-align: center; display: grid; justify-items: center; gap: .3rem; position: relative; }
.mwb-result__marks { margin: .4rem 0 0; font-size: 1.05rem; color: var(--mwb-navy); }
.mwb-result__msg { margin: 0; color: var(--mwb-muted); font-size: .9rem; max-width: 30ch; }
.mwb-result__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem; margin: 0; align-content: center; }
.mwb-result__grid div { background: var(--mwb-grey); border-radius: 12px; padding: .8rem .9rem; }
.mwb-result__grid dt { font-size: .76rem; color: var(--mwb-muted); }
.mwb-result__grid dd { margin: 0; font-family: var(--mwb-font-head); font-size: 1.45rem; font-weight: 600; color: var(--mwb-navy); }
.mwb-result__grid .is-good { background: var(--mwb-good-soft); }
.mwb-result__grid .is-good dd { color: var(--mwb-good); }
.mwb-result__grid .is-bad { background: var(--mwb-low-soft); }
.mwb-result__grid .is-bad dd { color: var(--mwb-low); }
.mwb-result__actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 2rem; }
.mwb-confetti { position: absolute; inset: -20px; pointer-events: none; }
.mwb-confetti i { position: absolute; top: 40%; left: 50%; width: 8px; height: 12px; border-radius: 2px; background: var(--mwb-gold); opacity: 0; animation: mwb-confetti 1.4s var(--mwb-ease) .4s forwards; }
.mwb-confetti i:nth-child(3n) { background: var(--mwb-blue); }
.mwb-confetti i:nth-child(4n) { background: var(--mwb-good); }
.mwb-confetti i:nth-child(1) { --x: -120px; --y: -90px; --r: 200deg; }
.mwb-confetti i:nth-child(2) { --x: 110px; --y: -100px; --r: -160deg; }
.mwb-confetti i:nth-child(3) { --x: -80px; --y: -130px; --r: 120deg; }
.mwb-confetti i:nth-child(4) { --x: 70px; --y: -140px; --r: 260deg; }
.mwb-confetti i:nth-child(5) { --x: -140px; --y: -30px; --r: -90deg; }
.mwb-confetti i:nth-child(6) { --x: 140px; --y: -40px; --r: 90deg; }
.mwb-confetti i:nth-child(7) { --x: -40px; --y: -150px; --r: 300deg; }
.mwb-confetti i:nth-child(8) { --x: 30px; --y: -160px; --r: -300deg; }
.mwb-confetti i:nth-child(9) { --x: -110px; --y: 40px; --r: 45deg; }
.mwb-confetti i:nth-child(10) { --x: 120px; --y: 30px; --r: -45deg; }
.mwb-confetti i:nth-child(11) { --x: -60px; --y: 80px; --r: 180deg; }
.mwb-confetti i:nth-child(12) { --x: 60px; --y: 90px; --r: -180deg; }
.mwb-confetti i:nth-child(13) { --x: -160px; --y: -120px; --r: 70deg; }
.mwb-confetti i:nth-child(14) { --x: 160px; --y: -120px; --r: -70deg; }
.mwb-review__head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.mwb-filter-chips { display: flex; gap: .35rem; flex-wrap: wrap; }
.mwb-filter-chips button { border: 1px solid var(--mwb-line); background: #fff; border-radius: 999px; padding: .4rem .85rem; font: 600 .83rem var(--mwb-font-body); color: var(--mwb-muted); cursor: pointer; min-height: 36px; }
.mwb-filter-chips button.is-active { background: var(--mwb-navy); color: #fff; border-color: var(--mwb-navy); }
.mwb-rq { background: #fff; border: 1px solid var(--mwb-line); border-left: 5px solid var(--mwb-line); border-radius: 16px; padding: clamp(1rem, 2.5vw, 1.5rem); margin-bottom: 1rem; box-shadow: var(--mwb-shadow); scroll-margin-top: 100px; }
.mwb-rq--correct { border-left-color: var(--mwb-good); }
.mwb-rq--incorrect { border-left-color: var(--mwb-low); }
.mwb-rq--partial { border-left-color: var(--mwb-gold); }
.mwb-rq--unattempted, .mwb-rq--pending_self { border-left-color: var(--mwb-blue-soft); }
.mwb-rq__head { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-bottom: .8rem; }
.mwb-rq__num { font-family: var(--mwb-font-head); font-weight: 600; font-size: 1.15rem; color: var(--mwb-navy); }
.mwb-rq__badge { font-size: .76rem; font-weight: 700; padding: .2rem .6rem; border-radius: 999px; background: var(--mwb-grey); color: var(--mwb-muted); }
.mwb-rq--correct .mwb-rq__badge { background: var(--mwb-good-soft); color: var(--mwb-good); }
.mwb-rq--incorrect .mwb-rq__badge { background: var(--mwb-low-soft); color: var(--mwb-low); }
.mwb-rq--partial .mwb-rq__badge { background: var(--mwb-mid-soft); color: var(--mwb-mid); }
.mwb-rq--pending_self .mwb-rq__badge { background: var(--mwb-sky); color: var(--mwb-blue); }
.mwb-rq__meta { font-size: .8rem; color: var(--mwb-muted); }
.mwb-rq__tools { margin-left: auto; display: flex; gap: .4rem; }
.mwb-rq__question { font-size: 1.03rem; margin-bottom: .8rem; overflow-x: auto; }
.mwb-rq__options { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .45rem; }
.mwb-rq__options li { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; border: 1.5px solid var(--mwb-line); border-radius: 12px; padding: .6rem .85rem; }
.mwb-rq__options li.is-correct { border-color: var(--mwb-good); background: var(--mwb-good-soft); }
.mwb-rq__options li.is-wrong { border-color: var(--mwb-low); background: var(--mwb-low-soft); }
.mwb-opt__label { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: #fff; font-weight: 700; font-size: .85rem; color: var(--mwb-navy); border: 1px solid var(--mwb-line); flex: none; }
.mwb-opt__body { flex: 1; min-width: 0; overflow-x: auto; }
.mwb-opt__tag { font-size: .72rem; font-weight: 700; color: var(--mwb-low); background: #fff; border-radius: 999px; padding: .1rem .55rem; }
.mwb-opt__tag--ok { color: var(--mwb-good); }
.mwb-rq__answers { display: flex; gap: .8rem; flex-wrap: wrap; margin-bottom: 1rem; }
.mwb-rq__answers p { margin: 0; background: var(--mwb-grey); border-radius: 12px; padding: .6rem 1rem; display: grid; }
.mwb-rq__answers p span { font-size: .75rem; color: var(--mwb-muted); }
.mwb-rq__answers p.is-ok { background: var(--mwb-good-soft); }
.mwb-rq__answers strong { font-size: 1.15rem; color: var(--mwb-navy); }
.mwb-rq__written { background: var(--mwb-grey); border-radius: 12px; padding: .8rem 1rem; margin-bottom: 1rem; }
.mwb-rq__written h4 { margin: 0 0 .3rem; font-size: .85rem; color: var(--mwb-muted); }
.mwb-rq__final { margin: .6rem 0 0; }
.mwb-rq__final span { font-size: .8rem; color: var(--mwb-muted); }
.mwb-explain { display: grid; gap: .7rem; }
.mwb-explain__block { border-radius: 12px; padding: .85rem 1rem; background: var(--mwb-sky); overflow-x: auto; }
.mwb-explain__block h4 { margin: 0 0 .35rem; font-size: .92rem; color: var(--mwb-navy); display: flex; gap: .4rem; align-items: center; }
.mwb-explain__block > :last-child { margin-bottom: 0; }
.mwb-explain__block p { margin: .3rem 0; }
.mwb-explain__block--ok { background: var(--mwb-good-soft); }
.mwb-explain__block--ok h4 { color: var(--mwb-good); }
.mwb-explain__block--bad { background: var(--mwb-low-soft); }
.mwb-explain__block--bad h4 { color: var(--mwb-low); }
.mwb-explain__block--warn { background: var(--mwb-mid-soft); }
.mwb-explain__block--warn h4 { color: var(--mwb-mid); }
.mwb-explain__solution { border: 1px solid var(--mwb-line); border-radius: 12px; padding: .7rem 1rem; }
.mwb-explain__solution summary { cursor: pointer; font-weight: 650; color: var(--mwb-navy); }
.mwb-steps { margin-top: .6rem; overflow-x: auto; }
.mwb-steps ol { padding-left: 1.2em; }
.mwb-steps li { margin: .4em 0; }
.mwb-explain__foot { display: grid; gap: .4rem; font-size: .9rem; }
.mwb-explain__foot p, .mwb-explain__lp { margin: 0; }
.mwb-explain__concept span, .mwb-explain__lp span { display: inline-block; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--mwb-gold); margin-right: .4rem; }
.mwb-selfgrade { background: #fff; border: 1.5px dashed var(--mwb-blue-soft); border-radius: 12px; padding: .9rem 1rem; }
.mwb-selfgrade p { margin: 0; }
.mwb-selfgrade .mwb-btn-row { margin: .6rem 0; }
.mwb-rq__next { display: flex; }

/* ----------------------------------------------------------- Performance */
.mwb-chart { position: relative; }
.mwb-line { width: 100%; height: auto; display: block; overflow: visible; }
.mwb-line__grid { stroke: var(--mwb-line); stroke-width: 1; }
.mwb-line__axis { font-size: 11px; fill: var(--mwb-muted); font-family: var(--mwb-font-body); }
.mwb-line__area { fill: rgba(58, 95, 174, .09); }
.mwb-line__path { fill: none; stroke: var(--mwb-navy); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.mwb-anim .mwb-line__path { stroke-dashoffset: 1; animation: mwb-dash 1.4s var(--mwb-ease) .2s forwards; }
.mwb-line__dot { fill: #fff; stroke: var(--mwb-gold); stroke-width: 2.5; cursor: pointer; transition: r .15s; }
.mwb-line__dot:hover, .mwb-line__dot:focus { r: 7; outline: none; }
.mwb-tip { position: absolute; transform: translate(-50%, -100%); background: var(--mwb-navy); color: #fff; font-size: .78rem; padding: .35rem .6rem; border-radius: 8px; pointer-events: none; white-space: nowrap; }
.mwb-hbar { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.mwb-hbar li { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(70px, 1fr) 48px; grid-template-areas: "label bar val" "label small small"; gap: 0 .7rem; align-items: center; font-size: .88rem; }
.mwb-hbar__label { grid-area: label; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.mwb-hbar__ctx { display: block; color: var(--mwb-muted); font-size: .75rem; }
.mwb-hbar .mwb-bar { grid-area: bar; }
.mwb-hbar b { grid-area: val; text-align: right; color: var(--mwb-navy); }
.mwb-hbar small { grid-area: small; font-size: .72rem; color: var(--mwb-muted); }
.mwb-heat-wrap { overflow-x: auto; }
.mwb-heat { border-collapse: separate; border-spacing: 4px; width: 100%; min-width: 560px; font-size: .82rem; }
.mwb-heat th { text-align: left; font-weight: 600; color: var(--mwb-muted); font-size: .78rem; padding: .2rem .4rem; }
.mwb-heat tbody th { color: var(--mwb-navy); white-space: nowrap; }
.mwb-heat__cell { text-align: center; border-radius: 8px; padding: .55rem .3rem; font-weight: 700; background: var(--mwb-grey); color: var(--mwb-muted); }
.mwb-heat--good { background: rgba(28, 54, 104, calc(.25 + var(--a) * .75)); color: #fff; }
.mwb-heat--mid { background: rgba(176, 138, 68, calc(.35 + var(--a) * .5)); color: #fff; }
.mwb-heat--low { background: rgba(176, 65, 58, .75); color: #fff; }
.mwb-weak-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.mwb-weak-grid .mwb-h3:first-child { margin-top: 0; }
.mwb-table-wrap { overflow-x: auto; }
.mwb-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.mwb-table th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--mwb-muted); padding: .6rem; border-bottom: 1px solid var(--mwb-line); }
.mwb-table td { padding: .7rem .6rem; border-bottom: 1px solid var(--mwb-line); }
.mwb-table a { font-weight: 600; text-decoration: none; }
.mwb-pagination { display: flex; gap: .6rem; justify-content: center; align-items: center; margin-top: 1rem; color: var(--mwb-muted); font-size: .9rem; }

/* Contact */
.mwb-contact { max-width: 720px; }

/* ------------------------------------------------------------ Animations */
.mwb-anim .fade-up { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--mwb-ease), transform .6s var(--mwb-ease); }
.mwb-anim .fade-up.is-in { opacity: 1; transform: none; }
.mwb-anim .scale-in { opacity: 0; transform: scale(.96); transition: opacity .5s var(--mwb-ease), transform .5s var(--mwb-ease); }
.mwb-anim .scale-in.is-in { opacity: 1; transform: none; }
.mwb-anim .mwb-stats.is-in .scale-in { opacity: 1; transform: none; }
.mwb-anim .mwb-stats .scale-in:nth-child(2) { transition-delay: .06s; }
.mwb-anim .mwb-stats .scale-in:nth-child(3) { transition-delay: .12s; }
.mwb-anim .mwb-stats .scale-in:nth-child(4) { transition-delay: .18s; }
.mwb-anim .slide-in { opacity: 0; transform: translateX(-20px); transition: opacity .6s var(--mwb-ease), transform .6s var(--mwb-ease); }
.mwb-anim .slide-in.is-in { opacity: 1; transform: none; }
@keyframes mwb-spin { to { transform: rotate(360deg); } }
@keyframes mwb-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes mwb-scale { from { opacity: 0; transform: scale(.95); } to { opacity: 1; transform: none; } }
@keyframes mwb-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes mwb-slide-l { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes mwb-slide-r { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
@keyframes mwb-shimmer { to { background-position: -200% 0; } }
@keyframes mwb-pulse { 50% { opacity: .6; } }
@keyframes mwb-pop { 50% { transform: scale(1.3); } }
@keyframes mwb-draw { to { stroke-dashoffset: 0; } }
@keyframes mwb-dash { to { stroke-dashoffset: 0; } }
@keyframes mwb-confetti { 0% { opacity: 1; transform: translate(0, 0) rotate(0); } 100% { opacity: 0; transform: translate(var(--x), var(--y)) rotate(var(--r)); } }

/* ------------------------------------------------------------ Responsive */
@media (max-width: 1100px) {
	.mwb-dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.mwb-dash-grid > .mwb-card--retry { grid-column: 1 / -1; }
	.mwb-weak-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.mwb-result__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
	.mwb-shell { grid-template-columns: minmax(0, 1fr); padding-bottom: 90px; }
	.mwb-side { position: fixed; top: 0; bottom: 0; left: 0; z-index: 9999; width: min(300px, 85vw); max-height: none; border-radius: 0 16px 16px 0; transform: translateX(-105%); transition: transform .3s var(--mwb-ease); }
	body.mwb-side-open .mwb-side { transform: none; }
	body.mwb-side-open::after { content: ""; position: fixed; inset: 0; background: rgba(12, 22, 44, .45); z-index: 9998; }
	.mwb-bottom-nav { display: grid; grid-template-columns: repeat(6, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 9990; background: #fff; border-top: 1px solid var(--mwb-line); padding: .35rem .25rem calc(.35rem + env(safe-area-inset-bottom)); box-shadow: 0 -6px 20px rgba(18, 37, 74, .06); }
	.mwb-bottom-nav a, .mwb-bottom-nav button { display: grid; justify-items: center; gap: 2px; font: 600 .66rem var(--mwb-font-body); color: var(--mwb-muted); text-decoration: none; padding: .3rem 0; border: 0; background: none; cursor: pointer; min-height: 48px; }
	.mwb-bottom-nav .is-active { color: var(--mwb-navy); }
	.mwb-bottom-nav .is-active .mwb-icon { color: var(--mwb-gold); }
	.mwb-dash-grid--wide, .mwb-practice-layout { grid-template-columns: minmax(0, 1fr); }
	.mwb-revision-hub { grid-template-columns: minmax(0, 1fr); }
	.mwb-runner__body { grid-template-columns: minmax(0, 1fr); }
	.mwb-runner__palette { position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 30; border-radius: 18px 18px 0 0; transform: translateY(105%); transition: transform .3s var(--mwb-ease); max-height: 75vh; overflow: auto; padding-bottom: calc(1rem + env(safe-area-inset-bottom)); }
	.mwb-runner.is-palette-open .mwb-runner__palette { transform: none; box-shadow: 0 -20px 60px rgba(12, 22, 44, .3); }
	.mwb-palette__close { display: block; }
	.mwb-runner__palette-btn { display: inline-flex; }
	.mwb-auth { grid-template-columns: minmax(0, 1fr); margin: 0; border-radius: 0; box-shadow: none; }
	.mwb-auth__aside { padding: 1.5rem; min-height: 0; }
	.mwb-auth__illustration, .mwb-auth__points { display: none; }
	.mwb-auth__quote { font-size: 1.15rem; }
}
@media (max-width: 700px) {
	.mwb-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
	.mwb-stat { padding: .8rem; }
	.mwb-stat__value { font-size: 1.55rem; }
	.mwb-dash-grid, .mwb-dash-grid--2, .mwb-weak-grid { grid-template-columns: minmax(0, 1fr); }
	.mwb-revision-links { grid-template-columns: minmax(0, 1fr); }
	.mwb-grid-2, .mwb-grid-3 { grid-template-columns: minmax(0, 1fr); }
	.mwb-chapter-head { grid-template-columns: minmax(0, 1fr); }
	.mwb-chapter-head__icon { width: 64px; height: 64px; }
	.mwb-chapter-head__progress { grid-template-columns: minmax(0, 1fr); }
	.mwb-topic-row { grid-template-columns: 30px minmax(0, 1fr); grid-template-areas: "n title" "n meta" "bar bar"; }
	.mwb-topic-row__meta { justify-content: flex-start; }
	.mwb-result { grid-template-columns: minmax(0, 1fr); }
	.mwb-result__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.mwb-result__actions .mwb-btn, .mwb-result__actions .mwb-start-form { flex: 1 1 100%; }
	.mwb-result__actions .mwb-start-form .mwb-btn { width: 100%; }
	.mwb-item-grid { grid-template-columns: minmax(0, 1fr); }
	.mwb-runner__save { display: none; }
	.mwb-runner__nav { gap: .4rem; padding-left: .5rem; padding-right: .5rem; }
	.mwb-runner__nav .mwb-btn { padding: .55rem .7rem; flex: 1; }
	.mwb-runner__nav .mwb-btn span { font-size: .82rem; }
	.mwb-runner__mark span { display: none; }
	.mwb-q__tools { margin-left: 0; }
	.mwb-q__text { font-size: 1.02rem; }
	.mwb-path summary { grid-template-columns: 30px minmax(0, 1fr) 44px; }
	.mwb-path summary .mwb-bar { grid-column: 2 / 4; grid-row: 2; }
	.mwb-path__topics { padding-left: 1rem; }
	.mwb-mini-bars li { grid-template-columns: 1fr 1fr 36px; }
	.mwb-filterbar { position: static; }
	.mwb-filterbar select { flex: 1 1 100%; }
	.mwb-table thead { display: none; }
	.mwb-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: .2rem .8rem; padding: .7rem 0; border-bottom: 1px solid var(--mwb-line); }
	.mwb-table td { border: 0; padding: .1rem 0; }
	.mwb-table td::before { content: attr(data-label); display: block; font-size: .7rem; color: var(--mwb-muted); text-transform: uppercase; letter-spacing: .06em; }
	.mwb-table td:nth-child(2) { grid-column: 1 / -1; order: -1; }
	.mwb-pager { grid-template-columns: minmax(0, 1fr); }
	.mwb-pager__next { grid-column: 1; }
	.mwb-cta-band { padding: 1.1rem; }
	.mwb-hbar li { grid-template-columns: minmax(0, 1fr) 70px 44px; }
	.mwb-test--compact { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
	.mwb *, .mwb *::before, .mwb *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
	.mwb-anim .fade-up, .mwb-anim .scale-in, .mwb-anim .slide-in { opacity: 1 !important; transform: none !important; }
	.mwb-auth__curve { stroke-dashoffset: 0; }
	.mwb-confetti { display: none; }
}

@media print {
	.mwb-side, .mwb-bottom-nav, .mwb-runner__nav, .mwb-result__actions { display: none !important; }
}
