/* Munzako Academics - MDMS colours (royal blue) */
:root {
  --brand: #2451c8; --brand-dark: #1b3fa3; --brand-deep: #132f7d; --brand-soft: #eaf0fd; --brand-softer: #f3f6fe;
  --ink: #0f1a2e; --body: #334155; --muted: #64748b; --line: #e3e8ef; --surface: #f5f7fb; --card: #ffffff;
  --ring: rgba(36,81,200,.22); --line-strong: #cfd8e3; --chip: #eef1f5; --note-bg: #fff8eb; --ok: #15803d; --ok-soft: #e8f6ee; --bad: #b91c1c; --bad-soft: #fdecec;
  --warn: #b45309; --warn-soft: #fff4e0; --amber: #f59e0b; --radius: 16px; --shadow: 0 1px 2px rgba(15,26,46,.05), 0 8px 24px rgba(15,26,46,.06);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html { color-scheme: light; }
body { margin: 0; font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--surface); color: var(--body); font-size: 15.5px; line-height: 1.5; }
a { color: var(--brand); }
h1, h2, h3, h4 { color: var(--ink); letter-spacing: -.01em; line-height: 1.2; }
img { max-width: 100%; height: auto; }
.ma-skip { position: absolute; left: -999px; top: 0; background: var(--card); padding: 8px 12px; z-index: 99; }
.ma-skip:focus { left: 8px; }
.ma-wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.ma-main { max-width: 1120px; margin: 0 auto; padding: 18px 16px 40px; }
.ma-main.flush { max-width: none; padding: 0; }
.ma-muted { color: var(--muted); }
.ma-small { font-size: 13px; }
.ma-center { text-align: center; }
.ma-hide { display: none !important; }

/* ---------- top bar ---------- */
.ma-bar { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
.ma-bar-in { display: flex; align-items: center; gap: 14px; min-height: 62px; }
.ma-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); margin-right: auto; }
.ma-brand b { display: block; font-size: 16px; line-height: 1.1; }
.ma-brand small { display: block; font-size: 11.5px; color: var(--muted); }
.ma-logo { width: 36px; height: 36px; border-radius: 10px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 18px; flex: none; }
.ma-nav { display: flex; align-items: center; gap: 4px; }
.ma-nav a { text-decoration: none; color: var(--body); font-weight: 600; font-size: 14.5px; padding: 8px 12px; border-radius: 10px; }
.ma-nav a:hover { background: var(--brand-softer); color: var(--brand); }
.ma-nav a.on { color: var(--brand); background: var(--brand-soft); }
.ma-nav-cta { background: var(--brand); color: #fff !important; }
.ma-nav-cta:hover { background: var(--brand-dark) !important; }
.ma-nav-cta.ghost { background: transparent; color: var(--brand) !important; border: 1.5px solid var(--brand); }
.ma-nav-cta.ghost:hover { background: var(--brand-soft) !important; }
.ma-burger { display: none; border: 1px solid var(--line); background: var(--card); border-radius: 10px; width: 40px; height: 40px; font-size: 22px; color: var(--ink); cursor: pointer; }
.ma-bar-tools { display: flex; align-items: center; gap: 10px; }
.ma-icon-btn { position: relative; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-softer); color: var(--brand); text-decoration: none; font-size: 18px; }
.ma-icon-btn .dot { position: absolute; top: -4px; right: -4px; background: #e11d48; color: #fff; border-radius: 999px; font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 4px; }
.ma-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--amber); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 14px; text-decoration: none; }
@media (max-width: 860px) {
  .ma-burger { display: grid; place-items: center; }
  .ma-public .ma-nav, .ma-auth .ma-nav { display: none; position: absolute; left: 0; right: 0; top: 62px; background: var(--card); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 10px 16px 16px; box-shadow: var(--shadow); }
  .ma-public .ma-nav.open, .ma-auth .ma-nav.open { display: flex; }
  .ma-nav.desk { display: none; }
  .ma-brand small { display: none; }
}

@media (min-width: 861px) and (max-width: 1240px) { .ma-member .ma-nav.desk a { padding: 8px 8px; font-size: 13.5px; } .ma-member .ma-nav.desk { gap: 1px; } }
@media (min-width: 861px) and (max-width: 1040px) { .ma-member .ma-brand b { display: none; } }

/* ---------- member bottom tabs ---------- */
.ma-tabs { display: none; }
@media (max-width: 860px) {
  .ma-member .ma-main { padding-bottom: 96px; }
  .ma-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); position: fixed; bottom: 0; left: 0; right: 0; background: var(--card); border-top: 1px solid var(--line); z-index: 50; padding-bottom: env(safe-area-inset-bottom); }
  .ma-tabs a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 9px; text-decoration: none; color: var(--muted); font-size: 11.5px; font-weight: 600; }
  .ma-tabs a i { font-size: 20px; }
  .ma-tabs a.on { color: var(--brand); }
}

/* ---------- buttons, forms, cards ---------- */
.ma-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; background: var(--brand); color: #fff; font: inherit; font-weight: 700; font-size: 15px; padding: 12px 18px; text-decoration: none; cursor: pointer; transition: background .15s, box-shadow .15s; }
.ma-btn:hover { background: var(--brand-dark); }
.ma-btn:focus-visible, .ma-in:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--ring); }
.ma-btn.block { width: 100%; }
.ma-btn.lg { padding: 15px 22px; font-size: 16px; }
.ma-btn.sm { padding: 7px 12px; font-size: 13.5px; border-radius: 10px; }
.ma-btn.ghost { background: var(--card); color: var(--brand); border: 1.5px solid var(--line); }
.ma-btn.ghost:hover { background: var(--brand-softer); border-color: var(--brand); }
.ma-btn.ghost.light { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.35); }
.ma-btn.soft { background: var(--brand-soft); color: var(--brand); }
.ma-btn.ok { background: var(--ok); } .ma-btn.ok:hover { background: #116a32; }
.ma-btn.bad { background: var(--bad); } .ma-btn.bad:hover { background: #961616; }
.ma-btn.warn { background: var(--warn); }
.ma-btn.white { background: #fff; color: var(--brand); }
.ma-btn[disabled] { opacity: .55; cursor: not-allowed; }
.ma-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.ma-card + .ma-card { margin-top: 16px; }
.ma-card h2 { font-size: 18px; margin: 0 0 12px; }
.ma-card h3 { font-size: 16px; margin: 0 0 10px; }
.ma-label { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink); margin: 0 0 6px; }
.ma-in, .ma-form input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]):not([type=submit]):not(.ma-fill-in), .ma-form select, .ma-form textarea {
  width: 100%; font: inherit; font-size: 15px; padding: 11px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--card); color: var(--ink); }
.ma-form textarea { min-height: 96px; resize: vertical; }
.ma-form input:not(.ma-fill-in):focus, .ma-form select:focus, .ma-form textarea:focus, .ma-in:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--ring); }
.ma-form .row { margin-bottom: 14px; }
.ma-form .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.ma-form .grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 14px; }
.ma-form .help { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.ma-form .check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
.ma-form .check input { margin-top: 3px; width: auto; }
@media (max-width: 640px) { .ma-form .grid2, .ma-form .grid3 { grid-template-columns: 1fr; } }
.ma-pw { position: relative; }
.ma-pw button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--muted); font-size: 18px; padding: 6px; cursor: pointer; }
.ma-alert { display: flex; gap: 10px; align-items: flex-start; border-radius: 12px; padding: 12px 14px; margin: 0 0 14px; font-size: 14.5px; border: 1px solid transparent; }
.ma-alert i { margin-top: 1px; }
.ma-alert.success { background: var(--ok-soft); color: #14532d; border-color: #bfe5cd; }
.ma-alert.info { background: var(--brand-soft); color: var(--brand-deep); border-color: #cddaf8; }
.ma-alert.warning { background: var(--warn-soft); color: #7c3d07; border-color: #f6d7a7; }
.ma-alert.danger { background: var(--bad-soft); color: #7f1d1d; border-color: #f5c2c2; }
.ma-badge { display: inline-block; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.ma-badge.ok { background: var(--ok-soft); color: var(--ok); }
.ma-badge.warn { background: var(--warn-soft); color: var(--warn); }
.ma-badge.bad { background: var(--bad-soft); color: var(--bad); }
.ma-badge.muted { background: var(--chip); color: var(--muted); }
.ma-badge.brand { background: var(--brand-soft); color: var(--brand); }
.ma-or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; margin: 16px 0; }
.ma-or::before, .ma-or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.ma-oauth { display: grid; gap: 8px; }
.ma-oauth a { display: flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid var(--line-strong); border-radius: 12px; padding: 11px; text-decoration: none; color: var(--ink); font-weight: 600; background: var(--card); }
.ma-oauth a:hover { background: var(--brand-softer); }

/* ---------- public pages ---------- */
.ma-hero { background: linear-gradient(135deg, var(--brand-deep) 0%, var(--brand) 60%, #3a6be0 100%); color: #fff; position: relative; overflow: hidden; }
.ma-hero::after { content: ""; position: absolute; width: 520px; height: 520px; right: -160px; top: -200px; border-radius: 50%; background: rgba(255,255,255,.07); }
.ma-hero-in { display: grid; grid-template-columns: 1.1fr .9fr; gap: 28px; align-items: center; padding: 48px 16px 40px; position: relative; z-index: 1; }
.ma-hero h1 { color: #fff; font-size: clamp(32px, 5vw, 52px); font-weight: 800; letter-spacing: -.03em; margin: 14px 0 12px; }
.ma-hero p.lead { font-size: 18px; opacity: .92; margin: 0 0 22px; max-width: 34em; }
.ma-pill { display: inline-block; background: rgba(255,255,255,.16); border-radius: 999px; padding: 5px 13px; font-size: 13px; font-weight: 600; }
.ma-hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.ma-hero-phones { display: flex; justify-content: center; align-items: flex-end; gap: 0; }
.ma-hero-phones img { width: 46%; max-width: 250px; filter: drop-shadow(0 18px 30px rgba(0,0,0,.25)); }
.ma-hero-phones img + img { margin-left: -9%; transform: translateY(28px); }
.ma-ticks { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 8px; }
.ma-ticks li { display: flex; gap: 10px; align-items: flex-start; }
.ma-ticks i { color: #9ec1ff; font-size: 18px; }
.ma-section { padding: 52px 0; }
.ma-section.alt { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ma-section h2 { font-size: clamp(24px, 3.5vw, 34px); font-weight: 800; letter-spacing: -.02em; margin: 0 0 8px; }
.ma-section .sub { color: var(--muted); font-size: 16.5px; margin: 0 0 26px; max-width: 46em; }
.ma-eyebrow { color: var(--brand); font-weight: 700; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.ma-feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.ma-feat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.ma-feat .ic { width: 46px; height: 46px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-size: 22px; margin-bottom: 10px; }
.ma-feat h3 { font-size: 16.5px; margin: 0 0 6px; }
.ma-feat p { margin: 0; color: var(--body); font-size: 14.5px; }
.ma-show { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: center; margin: 0 0 54px; }
.ma-show.rev > :first-child { order: 2; }
.ma-show .ph { display: flex; justify-content: center; gap: 14px; }
.ma-show .ph img { width: 48%; max-width: 260px; filter: drop-shadow(0 14px 24px rgba(15,26,46,.18)); }
.ma-show h3 { font-size: 24px; margin: 6px 0 10px; }
.ma-plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.ma-plan { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; }
.ma-plan.best { border-color: var(--brand); box-shadow: 0 0 0 4px var(--ring); }
.ma-plan h3 { margin: 0; font-size: 17px; }
.ma-plan .price { font-size: 34px; font-weight: 800; color: var(--ink); margin: 8px 0 0; letter-spacing: -.02em; }
.ma-plan .per { color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.ma-plan ul { padding-left: 18px; margin: 0 0 16px; flex: 1; }
.ma-cards4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.ma-course { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; text-decoration: none; color: inherit; display: block; transition: transform .12s, box-shadow .12s; }
.ma-course:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.ma-course .ic { font-size: 26px; color: var(--brand); }
.ma-course b { display: block; color: var(--ink); margin: 6px 0 4px; }
.ma-course span { font-size: 13.5px; color: var(--muted); }
.ma-mdms-note { background: var(--brand-soft); border-radius: var(--radius); padding: 18px 20px; display: flex; gap: 14px; align-items: center; }
.ma-mdms-note i { font-size: 26px; color: var(--brand); }
@media (max-width: 900px) {
  .ma-hero-in, .ma-show { grid-template-columns: 1fr; }
  .ma-show.rev > :first-child { order: 0; }
  .ma-feats, .ma-plans { grid-template-columns: 1fr 1fr; }
  .ma-cards4 { grid-template-columns: 1fr 1fr; }
  .ma-hero-in { padding-top: 32px; }
}
@media (max-width: 560px) { .ma-feats, .ma-plans { grid-template-columns: 1fr; } .ma-hero-phones img { width: 52%; } }
.ma-foot { background: var(--brand-deep); color: #c9d6f5; padding: 30px 0 34px; margin-top: 30px; font-size: 14px; }
.ma-foot-brand { display: flex; gap: 10px; align-items: center; color: #fff; }
.ma-foot-brand small { display: block; color: #c9d6f5; }
.ma-foot-brand .ma-logo { background: #fff; color: var(--brand); }
.ma-foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 16px 0; }
.ma-foot a { color: #fff; text-decoration: none; }
.ma-foot p { margin: 0; opacity: .8; }

/* ---------- sign-in / registration ---------- */
.ma-auth-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 0; max-width: 1040px; margin: 24px auto; background: var(--card); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); }
.ma-auth-art { background: linear-gradient(160deg, var(--brand-deep), var(--brand)); color: #fff; padding: 30px; display: flex; flex-direction: column; justify-content: space-between; }
.ma-auth-art h2 { color: #fff; font-size: 26px; margin: 10px 0 8px; }
.ma-auth-art img.phone { width: 62%; max-width: 250px; align-self: center; margin-top: 18px; filter: drop-shadow(0 18px 30px rgba(0,0,0,.3)); }
.ma-auth-form { padding: 30px; }
.ma-auth-form h1 { font-size: 26px; margin: 0 0 4px; }
.ma-auth-form > p.sub { color: var(--muted); margin: 0 0 18px; }
@media (max-width: 860px) { .ma-auth-wrap { grid-template-columns: 1fr; margin: 0 auto; border-radius: 0; border: 0; } .ma-auth-art { display: none; } .ma-auth-form { padding: 22px 16px; } }
.ma-who-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.ma-who-card { position: relative; display: block; cursor: pointer; }
.ma-who-card input { position: absolute; opacity: 0; inset: 0; }
.ma-who-card .box { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; border: 1.5px solid var(--line); border-radius: 14px; padding: 10px 6px; height: 100%; background: var(--card); transition: border-color .12s, background .12s; min-height: 108px; }
.ma-who-card .box img { height: 46px; width: auto; }
.ma-who-card .box i { font-size: 30px; color: var(--brand); line-height: 46px; }
.ma-who-card .box b { color: var(--ink); font-size: 13px; margin-top: 4px; line-height: 1.2; }
.ma-who-card input:checked + .box { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 3px var(--ring); }
.ma-who-card input:focus-visible + .box { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (max-width: 560px) { .ma-who-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------- member app ---------- */
.ma-homehero { background: linear-gradient(135deg, var(--brand-deep) 0%, var(--brand) 70%, #3a6be0 100%); color: #fff; border-radius: 22px; padding: 22px 22px 24px; position: relative; overflow: hidden; }
.ma-homehero::after { content: ""; position: absolute; width: 260px; height: 260px; right: -80px; top: -90px; border-radius: 50%; background: rgba(255,255,255,.08); }
.ma-homehero .lang { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.16); border-radius: 999px; padding: 4px 11px; font-size: 12px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: #fff; text-decoration: none; }
.ma-homehero h1 { color: #fff; font-size: clamp(24px, 4vw, 34px); font-weight: 800; margin: 12px 0 4px; position: relative; z-index: 1; }
.ma-homehero p { margin: 0; opacity: .9; position: relative; z-index: 1; }
.ma-homehero .meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; position: relative; z-index: 1; }
.ma-homehero .meta span { background: rgba(255,255,255,.18); border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 600; }
.ma-homehero .meta .streak { background: #fff; color: #b45309; }
.ma-subcard { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 16px 0; }
.ma-subcard .txt { flex: 1; min-width: 200px; }
.ma-subcard .txt b { color: var(--ink); }
.ma-sechead { display: flex; align-items: baseline; justify-content: space-between; margin: 22px 0 10px; }
.ma-sechead h2 { font-size: 18px; margin: 0; }
.ma-sechead a, .ma-sechead span { font-size: 13px; color: var(--muted); }
.ma-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.ma-tile { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px 10px; text-align: center; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 14px; display: flex; flex-direction: column; align-items: center; gap: 8px; position: relative; transition: transform .12s, box-shadow .12s; }
.ma-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.ma-tile .ic { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; background: var(--bg, var(--brand-soft)); color: var(--fg, var(--brand)); }
.ma-tile.locked { opacity: .7; }
.ma-tile.locked::after { content: "\F47B"; font-family: bootstrap-icons; position: absolute; top: 8px; right: 10px; color: var(--muted); font-size: 13px; }
.ma-tile .n { position: absolute; top: 8px; right: 10px; background: #e11d48; color: #fff; border-radius: 999px; font-size: 11px; min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 4px; }
@media (max-width: 560px) { .ma-tiles { grid-template-columns: repeat(3, 1fr); gap: 8px; } .ma-tile { padding: 12px 4px; font-size: 12.5px; border-radius: 16px; } .ma-tile .ic { width: 44px; height: 44px; font-size: 21px; } }
.ma-list { list-style: none; margin: 0; padding: 0; }
.ma-list li { border-top: 1px solid var(--line); padding: 12px 2px; display: flex; gap: 12px; align-items: center; }
.ma-list li:first-child { border-top: 0; }
.ma-list .grow { flex: 1; min-width: 0; }
.ma-list .t { color: var(--ink); font-weight: 600; }
.ma-list .s { color: var(--muted); font-size: 13px; }

.ma-appbar { background: linear-gradient(135deg, var(--brand-deep), var(--brand)); color: #fff; border-radius: 0 0 22px 22px; padding: 16px 18px 18px; margin: -18px -16px 18px; }
.ma-appbar-row { display: flex; align-items: center; gap: 12px; max-width: 1088px; margin: 0 auto; }
.ma-appbar h1 { color: #fff; font-size: 19px; margin: 0; }
.ma-appbar p { margin: 2px 0 0; opacity: .85; font-size: 13.5px; }
.ma-back { width: 38px; height: 38px; border-radius: 12px; background: rgba(255,255,255,.16); color: #fff; display: grid; place-items: center; text-decoration: none; font-size: 18px; flex: none; }
.ma-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; max-width: 1088px; margin-left: auto; margin-right: auto; }
.ma-chips span { background: rgba(255,255,255,.18); border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600; }
@media (min-width: 861px) { .ma-appbar { border-radius: 20px; margin: 0 0 18px; } }

.ma-choose { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ma-choice { display: block; border: 1.5px solid var(--line); background: var(--card); border-radius: 16px; padding: 16px; text-decoration: none; color: inherit; position: relative; }
.ma-choice.on { border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }
.ma-choice.on::after { content: "\F26B"; font-family: bootstrap-icons; position: absolute; top: 10px; right: 12px; color: var(--brand); font-size: 20px; }
.ma-choice .big { font-size: 26px; font-weight: 800; color: var(--brand); }
.ma-choice.obc .big { color: #c2620a; }
.ma-choice b { display: block; color: var(--ink); }
.ma-choice span { font-size: 12.5px; color: var(--muted); }
.ma-grades { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.ma-grade { border: 1.5px solid var(--line); background: var(--card); border-radius: 14px; padding: 12px 6px; text-align: center; text-decoration: none; color: var(--ink); }
.ma-grade b { display: block; font-size: 22px; line-height: 1.1; }
.ma-grade span { font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .05em; }
.ma-grade.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.ma-grade.on span { color: #dbe5ff; }
.ma-levelhead { font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--muted); text-transform: uppercase; margin: 18px 0 8px; }
.ma-subjects { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ma-subject { background: var(--card); border: 1.5px solid var(--line); border-radius: 16px; padding: 16px 10px; text-align: center; text-decoration: none; color: var(--ink); }
.ma-subject:hover { border-color: var(--brand); }
.ma-subject i { font-size: 28px; color: var(--brand); display: block; margin-bottom: 6px; }
.ma-subject b { display: block; font-size: 14px; line-height: 1.25; }
.ma-subject span { font-size: 12px; color: var(--muted); }
.ma-subject .bar { height: 4px; border-radius: 4px; background: var(--line); margin-top: 8px; overflow: hidden; }
.ma-subject .bar i { display: block; height: 100%; background: var(--ok); font-size: 0; margin: 0; }
.ma-topics { display: grid; gap: 12px; }
.ma-topic { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.ma-topic-h { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--brand-softer); }
.ma-topic-h .code { background: var(--brand); color: #fff; border-radius: 8px; padding: 2px 8px; font-size: 12px; font-weight: 700; }
.ma-topic-h b { color: var(--ink); flex: 1; }
.ma-topic-h small { color: var(--muted); }
.ma-sub { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-top: 1px solid var(--line); text-decoration: none; color: var(--body); }
.ma-sub:hover { background: var(--brand-softer); }
.ma-sub .code { color: var(--brand); font-weight: 700; font-size: 13px; min-width: 42px; }
.ma-sub .t { flex: 1; color: var(--ink); }
.ma-sub .score { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 2px 8px; }
.ma-sub .go { font-size: 12px; font-weight: 700; color: #fff; background: var(--brand); border-radius: 999px; padding: 3px 10px; }
.ma-notes { font-size: 16px; line-height: 1.65; color: var(--ink); }
.ma-notes h3, .ma-notes h4 { margin: 18px 0 8px; }
.ma-notes h3:first-child, .ma-notes h4:first-child { margin-top: 0; }
.ma-notes ul, .ma-notes ol { padding-left: 22px; }
.ma-notes table { border-collapse: collapse; width: 100%; margin: 10px 0; font-size: 14.5px; }
.ma-notes td, .ma-notes th { border: 1px solid var(--line); padding: 6px 8px; }
.ma-notes blockquote, .ma-notes .note, .ma-notes .example { border-left: 4px solid var(--amber); background: var(--note-bg); padding: 10px 14px; border-radius: 0 10px 10px 0; margin: 12px 0; }
.ma-outcome { border-left: 4px solid var(--brand); background: var(--brand-softer); border-radius: 0 12px 12px 0; padding: 10px 14px; margin-bottom: 8px; font-size: 14.5px; }
.ma-outcome b { color: var(--brand-dark); }
.ma-sticky-cta { position: sticky; bottom: 0; background: linear-gradient(to top, var(--surface) 70%, rgba(245,247,251,0)); padding: 14px 0 6px; margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 860px) { .ma-sticky-cta { bottom: 64px; } }

/* quiz */
.ma-qprogress { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.ma-qbar { height: 8px; background: var(--line); border-radius: 8px; overflow: hidden; margin-bottom: 16px; }
.ma-qbar i { display: block; height: 100%; background: var(--brand); transition: width .2s; }
.ma-timer { display: inline-flex; align-items: center; gap: 6px; background: var(--brand-soft); color: var(--brand-dark); border-radius: 999px; padding: 4px 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ma-timer.low { background: var(--bad-soft); color: var(--bad); }
.ma-q { margin-bottom: 22px; }
.js-on .ma-q { display: none; margin: 0; }
.js-on .ma-q.on { display: block; }
.ma-q .prompt { font-size: 18px; font-weight: 700; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin-bottom: 12px; }
.ma-q .kind { display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--brand); margin-bottom: 6px; }
.ma-opt { display: flex; gap: 12px; align-items: center; background: var(--card); border: 1.5px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; cursor: pointer; }
.ma-opt input { position: absolute; opacity: 0; }
.ma-opt .k { width: 30px; height: 30px; border-radius: 50%; background: var(--brand-softer); color: var(--brand-dark); display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: none; }
.ma-opt:has(input:checked) { border-color: var(--brand); background: var(--brand-softer); box-shadow: 0 0 0 3px var(--ring); }
.ma-opt:has(input:checked) .k { background: var(--brand); color: #fff; }
.ma-opt:has(input:focus-visible) { outline: 2px solid var(--brand); }
.ma-match { display: grid; gap: 10px; }
.ma-match .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.ma-match .pair .l { color: var(--ink); font-weight: 600; }
@media (max-width: 640px) { .ma-match .pair { grid-template-columns: 1fr; } }
.ma-fill-in { display: inline-block; width: 140px; border: 0; border-bottom: 2px solid var(--brand); font: inherit; font-weight: 700; padding: 2px 6px; margin: 0 4px; background: var(--brand-softer); border-radius: 6px 6px 0 0; color: var(--ink); }
.ma-fill-in:focus { outline: none; background: var(--card); }
.ma-part { margin-bottom: 12px; }
.ma-part label { font-weight: 600; color: var(--ink); display: block; margin-bottom: 6px; }
.ma-part textarea { width: 100%; min-height: 70px; font: inherit; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 10px; }
.ma-qnav { display: flex; gap: 10px; margin-top: 16px; }
.ma-qnav .ma-btn { flex: 1; }
.ma-dots { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.ma-dots button { width: 32px; height: 32px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--card); font-weight: 700; color: var(--muted); cursor: pointer; }
.ma-dots button.done { background: var(--brand-soft); color: var(--brand); border-color: #cddaf8; }
.ma-dots button.cur { border-color: var(--brand); color: var(--brand); }

/* results */
.ma-score { display: flex; align-items: center; gap: 18px; }
.ma-ring { --p: 0; width: 92px; height: 92px; border-radius: 50%; background: conic-gradient(var(--c, var(--ok)) calc(var(--p) * 1%), var(--line) 0); display: grid; place-items: center; flex: none; }
.ma-ring b { width: 72px; height: 72px; border-radius: 50%; background: var(--card); display: grid; place-items: center; font-size: 20px; color: var(--ink); }
.ma-res { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; display: flex; gap: 12px; }
.ma-res .mk { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #fff; flex: none; font-size: 14px; }
.ma-res.ok .mk { background: var(--ok); } .ma-res.no .mk { background: var(--bad); } .ma-res.part .mk { background: var(--amber); }
.ma-res.no { background: var(--bad-soft); border-color: #f5d0d0; }
.ma-res .q { color: var(--ink); font-weight: 600; }
.ma-res .your { color: var(--bad); font-weight: 600; font-size: 14px; }
.ma-res .right { color: var(--ok); font-weight: 600; font-size: 14px; }
.ma-res .exp { font-size: 14px; color: var(--body); margin-top: 6px; background: var(--brand-softer); border-radius: 8px; padding: 8px 10px; }
.ma-res table { font-size: 13.5px; border-collapse: collapse; margin-top: 6px; width: 100%; }
.ma-res td { padding: 4px 6px; border-top: 1px solid var(--line); vertical-align: top; }

/* tables / admin */
.ma-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ma-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ma-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; padding: 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ma-table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ma-table tr:hover td { background: var(--brand-softer); }
.ma-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.ma-admin { background: var(--surface); }
.ma-admin .ma-bar { background: var(--brand-deep); border-color: var(--brand-deep); }
.ma-admin .ma-brand, .ma-admin .ma-brand small { color: #fff; }
.ma-admin .ma-brand .ma-logo { background: #fff; color: var(--brand); }
.ma-admin .ma-icon-btn { background: rgba(255,255,255,.12); color: #fff; }
.ma-who { color: #dbe5ff; font-size: 14px; }
.ma-side { position: fixed; top: 62px; bottom: 0; left: 0; width: 230px; background: var(--card); border-right: 1px solid var(--line); padding: 12px 10px; overflow-y: auto; z-index: 30; }
.ma-side a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; text-decoration: none; color: var(--body); font-weight: 600; font-size: 14px; }
.ma-side a:hover { background: var(--brand-softer); }
.ma-side a.on { background: var(--brand-soft); color: var(--brand); }
.ma-side a i { font-size: 17px; }
.ma-side a em { margin-left: auto; font-style: normal; background: #e11d48; color: #fff; border-radius: 999px; font-size: 11px; padding: 1px 7px; }
.ma-admin .ma-main { margin-left: 230px; max-width: none; padding: 22px 26px 50px; }
@media (max-width: 960px) {
  .ma-side { transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow); }
  .ma-side.open { transform: none; }
  .ma-admin .ma-main { margin-left: 0; padding: 18px 14px 40px; }
  .ma-who { display: none; }
  .ma-admin .ma-burger { display: grid; place-items: center; }
}
.ma-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.ma-head h1 { font-size: 23px; margin: 0; }
.ma-head p { margin: 2px 0 0; color: var(--muted); }
.ma-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.ma-stat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; text-decoration: none; color: inherit; display: block; }
.ma-stat .k { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.ma-stat .v { font-size: 26px; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.ma-stat .s { font-size: 12.5px; color: var(--muted); }
.ma-stat.warn { border-color: #f6d7a7; background: var(--warn-soft); }
.ma-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ma-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 1000px) { .ma-grid2, .ma-grid3 { grid-template-columns: 1fr; } }
.ma-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin-bottom: 14px; }
.ma-filters .ma-in, .ma-filters select { width: auto; min-width: 150px; padding: 8px 10px; font-size: 14px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--card); font-family: inherit; }
.ma-seg { display: inline-flex; flex-wrap: wrap; gap: 4px; background: var(--chip); padding: 4px; border-radius: 12px; margin-bottom: 14px; }
.ma-seg a { padding: 6px 12px; border-radius: 9px; text-decoration: none; color: var(--body); font-weight: 600; font-size: 13.5px; }
.ma-seg a.on { background: var(--card); color: var(--brand); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.ma-seg a em { font-style: normal; color: var(--muted); font-weight: 500; margin-left: 4px; }
.ma-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ma-dl { display: grid; grid-template-columns: 170px 1fr; gap: 8px 14px; margin: 0; font-size: 14.5px; }
.ma-dl dt { color: var(--muted); }
.ma-dl dd { margin: 0; color: var(--ink); }
@media (max-width: 560px) { .ma-dl { grid-template-columns: 1fr; } .ma-dl dd { margin-bottom: 6px; } }
.ma-bars { display: flex; align-items: flex-end; gap: 4px; height: 170px; padding-top: 18px; }
.ma-bars .b { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.ma-bars .b i { display: block; width: 100%; max-width: 34px; background: var(--brand); border-radius: 5px 5px 0 0; }
.ma-bars.ok .b i { background: var(--ok); }
.ma-bars.amber .b i { background: var(--amber); }
.ma-bars .v { font-size: 10.5px; color: var(--muted); margin-bottom: 2px; white-space: nowrap; }
.ma-bars .l { font-size: 10.5px; color: var(--muted); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ma-hbars .r { display: grid; grid-template-columns: minmax(110px, 40%) 1fr 64px; gap: 10px; align-items: center; margin-bottom: 8px; font-size: 13.5px; }
.ma-hbars .l { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ma-hbars .t { background: var(--line); height: 10px; border-radius: 6px; overflow: hidden; }
.ma-hbars .t i { display: block; height: 100%; background: var(--brand); border-radius: 6px; }
.ma-hbars .v { text-align: right; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.ma-pager { display: flex; gap: 10px; align-items: center; margin-top: 14px; font-size: 14px; }
.ma-pager a, .ma-pager .dis { padding: 6px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); text-decoration: none; }
.ma-pager .dis { color: #b3bdcc; }
.ma-timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--line); }
.ma-timeline li { position: relative; padding: 0 0 14px 12px; font-size: 14px; }
.ma-timeline li::before { content: ""; position: absolute; left: -25px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--brand); border: 2px solid #fff; }
.ma-timeline small { color: var(--muted); display: block; }
.ma-proof { max-width: 100%; max-height: 420px; border-radius: 12px; border: 1px solid var(--line); }
details.ma-more summary { cursor: pointer; color: var(--brand); font-weight: 600; }
.ma-empty { text-align: center; color: var(--muted); padding: 30px 10px; }
.ma-empty i { font-size: 34px; display: block; margin-bottom: 6px; color: #b3c2e6; }
@media print { .ma-bar, .ma-tabs, .ma-side, .ma-sticky-cta { display: none !important; } .ma-admin .ma-main { margin: 0; } }

.ma-grid2 > *, .ma-grid3 > * { min-width: 0; }
.ma-bars { overflow: hidden; }
.ma-bars.many .v { visibility: hidden; }
.ma-bars.many .b:hover .v { visibility: visible; }
.ma-bars.many .l { overflow: visible; text-overflow: clip; }

/* ---------- v92: dark mode ---------- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --brand: #5b86f0; --brand-dark: #3f6ce0; --brand-deep: #0d1f55; --brand-soft: #1c2a4d; --brand-softer: #162139;
  --ink: #e8edf7; --body: #c3cad6; --muted: #8d98ab; --line: #273145; --line-strong: #364259; --surface: #0e1420; --card: #161e2e;
  --ring: rgba(110,150,255,.32); --ok: #4ade80; --ok-soft: #10301d; --bad: #f87171; --bad-soft: #3a1919; --warn: #fbbf24; --warn-soft: #362a12;
  --chip: #222c40; --note-bg: #2c2414; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
}
:root[data-theme="dark"] .ma-alert.success { color: #bbf7d0; border-color: #1d4d31; }
:root[data-theme="dark"] .ma-alert.info { color: #c7d7ff; border-color: #2a3c6b; }
:root[data-theme="dark"] .ma-alert.warning { color: #fde68a; border-color: #5a4419; }
:root[data-theme="dark"] .ma-alert.danger { color: #fecaca; border-color: #5a2323; }
:root[data-theme="dark"] .ma-homehero .meta .streak { background: #2c2414; color: #fbbf24; }
:root[data-theme="dark"] .ma-btn.white { background: #e8edf7; color: #0d1f55; }
:root[data-theme="dark"] img.ma-keep-light, :root[data-theme="dark"] .ma-doc { color-scheme: light; }
:root[data-theme="dark"] .ma-hero, :root[data-theme="dark"] .ma-homehero, :root[data-theme="dark"] .ma-appbar, :root[data-theme="dark"] .ma-auth-art { background: linear-gradient(135deg, #0b1a48 0%, #1b3a9a 100%); }
.ma-theme-btn { border: 1px solid var(--line); background: var(--card); color: var(--ink); width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; cursor: pointer; font-size: 17px; }
.ma-admin .ma-theme-btn { background: rgba(255,255,255,.12); color: #fff; border-color: transparent; }
/* flash messages above an app bar */
.ma-main > .ma-alert ~ .ma-appbar { margin-top: 0; }
@media (min-width: 861px) { .ma-main > .ma-alert ~ .ma-appbar { margin-top: 0; } }
/* gentle page entrance */
@media (prefers-reduced-motion: no-preference) { .ma-main { animation: ma-in .22s ease-out; } @keyframes ma-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } } }

.ma-avatar.photo { padding: 0; overflow: hidden; background: var(--chip); }
.ma-avatar.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
