/*
 * Miah's Class brand layer for MiSEMS (loads after style.css).
 * Palette and type taken from miahsclass.com: navy #0b1d3a, brand blue #0d3a9e, Inter.
 */
:root {
  --mc-navy: #0b1d3a;
  --mc-brand: #0d3a9e;
  --mc-brand-2: #1d5fd6;
  --mc-ink: #0b1d3a;
  --mc-muted: #5a6b85;
  --mc-line: #dfe7ee;
  --mc-soft: #f3f7fa;
  --mc-ok: #0f7a4a;
  --mc-bad: #b42318;
  --mc-warn: #b54708;
  --mc-radius: 18px;
  --mc-shadow: 0 18px 50px rgba(5, 15, 40, .35);
}

html { -webkit-text-size-adjust: 100%; }

html body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--mc-ink);
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(29, 95, 214, .45), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(13, 58, 158, .55), transparent 60%),
    linear-gradient(165deg, #0b1d3a 0%, #0c2a63 55%, #0d3a9e 100%);
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 860px; padding-left: 16px; padding-right: 16px; }

/* ---------- top brand bar ---------- */
.mc-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 860px; margin: 0 auto; padding: 14px 16px 0;
}
.mc-bar a { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.mc-bar img { width: 38px; height: 38px; border-radius: 10px; background: #fff; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.mc-bar .mc-name { font-weight: 800; letter-spacing: .2px; font-size: 16px; line-height: 1.1; }
.mc-bar .mc-tag { display: block; font-weight: 500; font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; color: #b9c8e6; margin-top: 3px; }
.mc-bar .mc-right { font-size: 12px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: #b9c8e6; text-align: right; }

/* ---------- header ---------- */
.header { text-align: center; color: #fff; padding: 26px 8px 22px; }
.header h1 {
  display: inline-flex; align-items: center; gap: 14px; justify-content: center;
  font-size: clamp(30px, 6vw, 44px); font-weight: 800; letter-spacing: -.5px; margin: 0 0 8px;
  text-shadow: 0 2px 18px rgba(0,0,0,.35);
}
.header h1 img.mc-logo { width: 54px; height: 54px; border-radius: 14px; background: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.header p { color: #d4def2; margin: 4px 0; font-size: 15px; font-weight: 500; opacity: 1; }
.header p#level-header { display: inline-block; margin-top: 10px; padding: 5px 14px; border-radius: 999px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); color: #fff; font-weight: 700; letter-spacing: .3px; }

/* ---------- cards ---------- */
.card {
  background: #fff; border: 1px solid rgba(255,255,255,.6); border-radius: var(--mc-radius);
  box-shadow: var(--mc-shadow); padding: clamp(18px, 4vw, 32px);
}
.card h2 { color: var(--mc-navy); font-weight: 800; letter-spacing: -.2px; }
.card h3 { color: var(--mc-navy); font-weight: 700; }

/* ---------- buttons ---------- */
.btn {
  font-family: inherit; font-weight: 700; letter-spacing: .2px; border-radius: 12px; border: 0;
  padding: 13px 22px; transition: transform .12s ease, box-shadow .12s ease, filter .12s ease; cursor: pointer;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn-primary { background: linear-gradient(135deg, var(--mc-brand) 0%, var(--mc-brand-2) 100%); color: #fff; box-shadow: 0 8px 20px rgba(13, 58, 158, .35); }
.btn-primary:hover:not(:disabled) { box-shadow: 0 12px 26px rgba(13, 58, 158, .45); filter: brightness(1.05); background: linear-gradient(135deg, var(--mc-brand) 0%, var(--mc-brand-2) 100%); }
.btn-success { background: linear-gradient(135deg, #0f7a4a, #15a064); color: #fff; box-shadow: 0 8px 20px rgba(15, 122, 74, .3); }
.btn-danger { background: linear-gradient(135deg, #b42318, #d92d20); color: #fff; box-shadow: 0 8px 20px rgba(180, 35, 24, .3); }
.btn-secondary { background: var(--mc-soft); color: var(--mc-navy); border: 1px solid var(--mc-line); box-shadow: none; }
.btn-secondary:hover:not(:disabled) { background: #e8eff6; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn:focus-visible, .form-control:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid #8db4ff; outline-offset: 2px; }

/* ---------- forms ---------- */
.form-group label { color: var(--mc-navy); font-weight: 700; font-size: 14px; letter-spacing: .1px; }
.form-control, .form-group select {
  font-family: inherit; border: 2px solid var(--mc-line); border-radius: 12px; background: #fff; color: var(--mc-ink);
  padding: 13px 14px; font-size: 16px; transition: border-color .12s ease, box-shadow .12s ease;
}
.form-control:focus { border-color: var(--mc-brand-2); box-shadow: 0 0 0 4px rgba(29, 95, 214, .15); outline: none; }
.form-control::placeholder { color: #93a1b8; }

/* ---------- alerts ---------- */
.alert { border-radius: 12px; padding: 14px 16px; border: 1px solid transparent; border-left-width: 5px; }
.alert-info { background: #eef4ff; border-color: #c9dbff; border-left-color: var(--mc-brand); color: #123a82; }
.alert-success { background: #ecfdf3; border-color: #b7ebcd; border-left-color: var(--mc-ok); color: #0b5d39; }
.alert-warning { background: #fff7ed; border-color: #fed7aa; border-left-color: var(--mc-warn); color: #8a3b0a; }
.alert-danger { background: #fef3f2; border-color: #fecdca; border-left-color: var(--mc-bad); color: #8f1d14; }

/* ---------- timer, progress, scores ---------- */
.timer-display { font-variant-numeric: tabular-nums; color: var(--mc-brand); font-weight: 800; letter-spacing: -1px; }
.timer-label { color: var(--mc-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 1.2px; font-size: 12px; }
.progress-bar { background: var(--mc-line); border-radius: 999px; overflow: hidden; }
.progress-fill { background: linear-gradient(90deg, var(--mc-brand), var(--mc-brand-2)); border-radius: 999px; }
.question-item { border-radius: 12px; border-color: var(--mc-line); }
.score-card { border-radius: 16px; background: var(--mc-soft); border: 1px solid var(--mc-line); }
.score-value { color: var(--mc-brand); font-weight: 800; }
.score-label { color: var(--mc-muted); }
.rubric-table { border-radius: 12px; overflow: hidden; }
.rubric-table th { background: var(--mc-navy); color: #fff; }
.rubric-table tr:hover { background: var(--mc-soft); }
.image-container img, .task-image-large { border-radius: 14px; box-shadow: 0 6px 20px rgba(11, 29, 58, .18); }

/* ---------- UK examiner voice picker ---------- */
.mc-voice { margin: 4px 0 18px; padding: 14px; border: 1px solid var(--mc-line); border-radius: 14px; background: var(--mc-soft); }
.mc-voice label { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-weight: 700; color: var(--mc-navy); font-size: 14px; }
.mc-voice .mc-flag { font-size: 18px; }
.mc-voice .mc-row { display: flex; gap: 8px; flex-wrap: wrap; }
.mc-voice select { flex: 1 1 200px; min-width: 0; font: inherit; padding: 11px 12px; border: 2px solid var(--mc-line); border-radius: 10px; background: #fff; color: var(--mc-ink); }
.mc-voice button { font: inherit; font-weight: 700; padding: 11px 16px; border-radius: 10px; border: 0; cursor: pointer; background: var(--mc-navy); color: #fff; }
.mc-voice button:hover { filter: brightness(1.15); }
.mc-voice small { display: block; margin-top: 8px; color: var(--mc-muted); font-size: 12px; }

/* ---------- brand footer ---------- */
.copyright-footer, .mc-footer {
  max-width: none; width: 100%; margin: 36px 0 0; padding: 26px 16px 30px;
  background: rgba(7, 18, 40, .72); border-top: 1px solid rgba(255,255,255,.12);
  color: #b9c8e6; text-align: center; font-size: 13px; line-height: 1.7;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.mc-footer a { color: #fff; text-decoration: none; font-weight: 700; }
.mc-footer a:hover { text-decoration: underline; }
.mc-footer .mc-brand { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 8px; color: #fff; font-weight: 800; font-size: 15px; }
.mc-footer .mc-brand img { width: 30px; height: 30px; border-radius: 8px; background: #fff; }
.mc-footer .mc-motto { letter-spacing: 1.6px; text-transform: uppercase; font-size: 11px; font-weight: 600; color: #9fb4dc; margin-bottom: 8px; }
.mc-footer .mc-legal { opacity: .85; }

/* ---------- small screens, motion, print ---------- */
@media (max-width: 520px) {
  .mc-bar .mc-right { display: none; }
  .btn { width: 100%; }
  .header h1 img.mc-logo { width: 44px; height: 44px; }
}
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } .btn:hover:not(:disabled) { transform: none; } }
@media print { .mc-bar, .mc-voice { display: none; } html body { background: #fff; } .mc-footer, .copyright-footer { background: none; color: #444; border-top: 1px solid #ccc; } }
html.mc-branded{background:linear-gradient(165deg,#0b1d3a 0%,#0c2a63 55%,#0d3a9e 100%) fixed}
.header .logo{display:none}
