/* SteadyExam — test player styles. Colours and fonts come from CSS variables
   that the plugin prints from Settings › SteadyExam › Brand. */
.se-app {
  --se-ink: #1E1E24;
  --se-accent: #FACC15;
  --se-accent-ink: #1E1E24;
  --se-bg: #FAFAF5;
  --se-surface: #FFFFFF;
  --se-line: #E2E2DC;
  --se-muted: #5C5C66;
  --se-ok: #1F7A4D;
  --se-ok-bg: #E7F5EE;
  --se-bad: #B42318;
  --se-bad-bg: #FDECEA;
  --se-flag: #C2410C;
  --se-mark: #FEF08A;
  --se-on-ink: #FFFFFF;
  --se-flag-bg: #FFF3EB;
  --se-notice-bg: #FFF8DB;
  --se-notice-line: #F1D774;
  --se-shadow: rgba(20, 20, 24, .5);
  --se-radius: 12px;
  --se-font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --se-font-display: 'Bricolage Grotesque', var(--se-font);
  --se-text-scale: 1;
  font-family: var(--se-font);
  font-size: calc(16px * var(--se-text-scale));
  line-height: 1.55;
  color: var(--se-ink);
  background: var(--se-bg);
  border-radius: var(--se-radius);
  overflow: hidden;
  position: relative;
  min-height: 560px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}
.se-app *, .se-app *::before, .se-app *::after { box-sizing: border-box; }
.se-app.se-full { position: fixed; inset: 0; z-index: 99999; border-radius: 0; min-height: 0; padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); }
.se-app.is-module:not(.se-full) { height: 82vh; min-height: 520px; }
.se-app h1, .se-app h2, .se-app h3 { font-family: var(--se-font-display); line-height: 1.2; margin: 0 0 .5em; color: var(--se-ink); }
.se-app h1 { font-size: 1.75em; font-weight: 800; }
.se-app h2 { font-size: 1.3em; font-weight: 800; }
.se-app h3 { font-size: 1.05em; font-weight: 700; }
.se-app p { margin: 0 0 .8em; }
.se-app button { font: inherit; cursor: pointer; }
.se-app :focus-visible { outline: 3px solid var(--se-accent); outline-offset: 2px; }

/* Buttons */
.se-btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 44px; padding: .55em 1.2em; border-radius: 999px; border: 2px solid var(--se-ink); background: var(--se-ink); color: var(--se-on-ink); font-weight: 700; text-decoration: none; transition: transform .08s ease; }
.se-btn:hover { transform: translateY(-1px); }
.se-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.se-btn--accent { background: var(--se-accent); border-color: var(--se-accent); color: var(--se-accent-ink); }
.se-btn--ghost { background: transparent; color: var(--se-ink); }
.se-btn--small { min-height: 36px; padding: .3em .9em; font-size: .9em; }
.se-btn--danger { background: var(--se-bad); border-color: var(--se-bad); }
.se-iconbtn { min-width: 44px; min-height: 44px; border-radius: 10px; border: 1px solid var(--se-line); background: var(--se-surface); color: var(--se-ink); display: inline-flex; align-items: center; justify-content: center; }

/* Header */
.se-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 16px; background: var(--se-surface); border-bottom: 1px solid var(--se-line); }
.se-brand { display: flex; align-items: center; gap: 10px; font-family: var(--se-font-display); font-weight: 800; font-size: 1.1em; letter-spacing: -.02em; }
.se-brand img { max-height: 32px; width: auto; }
.se-brand .se-brand-hl { background: var(--se-accent); color: var(--se-accent-ink); padding: 0 .25em; border-radius: 4px; font-weight: 500; }
.se-top-mid { flex: 1 1 160px; min-width: 0; color: var(--se-muted); font-size: .9em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.se-top-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; margin-left: auto; }
.se-top-tools .se-btn { white-space: nowrap; }
.se-timer { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 1.1em; padding: 6px 12px; border-radius: 10px; background: var(--se-bg); border: 1px solid var(--se-line); min-width: 92px; text-align: center; }
.se-timer.is-low { background: var(--se-bad-bg); color: var(--se-bad); border-color: var(--se-bad); }
.se-timer.is-hidden .se-timer-val { visibility: hidden; }

/* Body */
.se-body { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.se-screen { padding: 32px 20px; max-width: 760px; margin: 0 auto; width: 100%; }
.se-card { background: var(--se-surface); border: 1px solid var(--se-line); border-radius: var(--se-radius); padding: 24px; }
.se-card + .se-card { margin-top: 16px; }
.se-muted { color: var(--se-muted); }
.se-kicker { text-transform: uppercase; letter-spacing: .08em; font-size: .78em; font-weight: 700; color: var(--se-muted); margin-bottom: .4em; }
.se-list { margin: 0 0 1em; padding-left: 1.2em; }
.se-list li { margin-bottom: .3em; }
.se-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.se-spacer { flex: 1; }

.se-modpick { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 12px 0 18px; }
.se-modpick label { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--se-line); border-radius: 10px; background: var(--se-bg); cursor: pointer; min-height: 48px; }
.se-modpick input { width: 20px; height: 20px; accent-color: var(--se-ink); }

/* Split layout */
.se-split { flex: 1 1 auto; min-height: 0; display: flex; }
.se-pane { flex: 1 1 50%; min-width: 0; overflow-y: auto; padding: 20px 24px 32px; -webkit-overflow-scrolling: touch; }
.se-pane--left { border-right: 1px solid var(--se-line); background: var(--se-surface); }
.se-pane--single { max-width: 900px; margin: 0 auto; width: 100%; }
.se-panetabs { display: none; }

.se-passage { font-size: 1em; line-height: 1.7; }
.se-passage p { margin: 0 0 1em; }
.se-passage .se-plabel { display: inline-block; min-width: 1.8em; font-weight: 800; }
.se-passage h3 { margin-top: 1em; }
.se-passage mark.se-hl { background: var(--se-mark); color: var(--se-mark-ink, inherit); border-radius: 2px; cursor: pointer; }
.se-hl-pop { position: absolute; z-index: 20; display: flex; gap: 6px; background: var(--se-ink); padding: 6px; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.se-hl-pop button { background: transparent; border: 0; color: var(--se-on-ink); padding: 6px 10px; border-radius: 6px; font-weight: 700; min-height: 36px; }
.se-hl-pop button:hover { background: rgba(255,255,255,.12); }

/* Questions */
.se-group { margin-bottom: 28px; }
.se-group-ins { background: var(--se-bg); border-left: 0; border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; font-size: .95em; }
.se-group-ins strong { display: block; margin-bottom: 2px; }
.se-optbox { border: 1px solid var(--se-line); border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; background: var(--se-surface); }
.se-optbox div { padding: 3px 0; }
.se-optbox b { display: inline-block; min-width: 2.2em; }
.se-q { display: flex; gap: 10px; align-items: flex-start; padding: 10px 8px; border-radius: 10px; scroll-margin-top: 16px; }
.se-q.is-current { background: var(--se-current-bg, rgba(250, 204, 21, .14)); }
.se-qnum { flex: 0 0 auto; min-width: 2em; height: 2em; border-radius: 999px; border: 2px solid var(--se-ink); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: .85em; }
.se-q.is-answered .se-qnum { background: var(--se-ink); color: var(--se-on-ink); }
.se-qbody { flex: 1; min-width: 0; }
.se-qtext { margin-bottom: 6px; }
.se-gap { display: inline-block; min-width: 9em; max-width: 100%; padding: 6px 10px; border: 2px solid var(--se-line); border-radius: 8px; font: inherit; background: var(--se-surface); color: var(--se-ink); }
.se-gap:focus { border-color: var(--se-ink); outline: none; }
.se-opts { display: flex; flex-direction: column; gap: 6px; }
.se-opt { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--se-line); border-radius: 10px; cursor: pointer; background: var(--se-surface); min-height: 44px; }
.se-opt input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--se-ink); flex: 0 0 auto; }
.se-opt.is-picked { border-color: var(--se-ink); box-shadow: inset 0 0 0 1px var(--se-ink); }
.se-opts--inline { flex-direction: row; flex-wrap: wrap; }
.se-select { min-height: 44px; padding: 6px 10px; border: 2px solid var(--se-line); border-radius: 8px; font: inherit; background: var(--se-surface); color: var(--se-ink); max-width: 100%; }
.se-flagbtn { flex: 0 0 auto; border: 1px solid var(--se-line); background: var(--se-surface); border-radius: 8px; min-width: 40px; min-height: 40px; color: var(--se-muted); display: inline-flex; align-items: center; justify-content: center; }
.se-flagbtn.is-on { color: var(--se-flag); border-color: var(--se-flag); background: var(--se-flag-bg); }

/* Audio */
.se-audio { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px; border-radius: var(--se-radius); background: var(--se-surface); border: 1px solid var(--se-line); margin-bottom: 18px; }
.se-audio-status { flex: 1 1 200px; font-size: .95em; }
.se-eq { display: inline-flex; gap: 3px; align-items: flex-end; height: 18px; }
.se-eq i { width: 4px; background: var(--se-ink); border-radius: 2px; animation: se-eq 1s infinite ease-in-out; }
.se-eq i:nth-child(2) { animation-delay: .2s; } .se-eq i:nth-child(3) { animation-delay: .4s; } .se-eq i:nth-child(4) { animation-delay: .1s; }
@keyframes se-eq { 0%,100% { height: 4px; } 50% { height: 18px; } }
@media (prefers-reduced-motion: reduce) { .se-eq i { animation: none; height: 10px; } }

/* Writing */
.se-prompt { white-space: pre-line; }
.se-prompt-img { max-width: 100%; height: auto; border: 1px solid var(--se-line); border-radius: 8px; margin-top: 12px; background: #FFFFFF; }
.se-textarea { width: 100%; min-height: 360px; resize: vertical; padding: 14px; border: 2px solid var(--se-line); border-radius: 10px; font: inherit; line-height: 1.6; background: var(--se-surface); color: var(--se-ink); }
.se-textarea:focus { border-color: var(--se-ink); outline: none; }
.se-wc { margin-top: 8px; font-weight: 700; font-variant-numeric: tabular-nums; }
.se-wc.is-under { color: var(--se-flag); }

/* Speaking */
.se-examiner { text-align: center; }
.se-examiner .se-question { font-family: var(--se-font-display); font-size: 1.35em; font-weight: 700; margin: 12px 0 20px; }
.se-cue { text-align: left; background: var(--se-bg); border: 2px dashed var(--se-ink); border-radius: var(--se-radius); padding: 18px 20px; margin: 12px 0 18px; }
.se-cue ul { margin: 6px 0 8px; padding-left: 1.2em; }
.se-rec { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; color: var(--se-bad); }
.se-rec::before { content: ''; width: 12px; height: 12px; border-radius: 50%; background: var(--se-bad); animation: se-pulse 1.2s infinite; }
@keyframes se-pulse { 50% { opacity: .3; } }
.se-big-count { font-size: 2.4em; font-weight: 800; font-variant-numeric: tabular-nums; margin: 8px 0; }
.se-progress { height: 8px; border-radius: 99px; background: var(--se-line); overflow: hidden; margin: 10px 0 16px; }
.se-progress > span { display: block; height: 100%; background: var(--se-ink); transition: width .25s linear; }

/* Bottom nav */
.se-nav { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--se-surface); border-top: 1px solid var(--se-line); }
.se-nav-scroll { flex: 1 1 auto; min-width: 0; overflow-x: auto; display: flex; gap: 14px; align-items: center; scrollbar-width: thin; }
.se-navpart { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.se-navpart-label { font-weight: 800; font-size: .85em; margin-right: 4px; white-space: nowrap; background: transparent; border: 0; color: var(--se-ink); padding: 6px 4px; border-radius: 6px; }
.se-navpart-label.is-active { background: var(--se-accent); color: var(--se-accent-ink); }
.se-navq { position: relative; min-width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--se-line); background: var(--se-bg); font-size: .8em; font-weight: 700; color: var(--se-ink); padding: 0 4px; }
.se-navq.is-answered { background: var(--se-ink); color: var(--se-on-ink); border-color: var(--se-ink); }
.se-navq.is-current { box-shadow: 0 0 0 2px var(--se-accent), 0 0 0 4px var(--se-ink); }
.se-navq.is-flagged::after { content: ''; position: absolute; top: -4px; right: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--se-flag); border: 2px solid var(--se-surface); }

/* Modal */
.se-modal-back { position: absolute; inset: 0; background: var(--se-shadow); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 50; }
.se-modal { background: var(--se-surface); border-radius: var(--se-radius); padding: 24px; max-width: 460px; width: 100%; box-shadow: 0 24px 64px rgba(0,0,0,.25); }
.se-modal .se-row { justify-content: flex-end; margin-top: 16px; }

/* Results */
.se-bands { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin: 16px 0; }
.se-band { background: var(--se-surface); border: 1px solid var(--se-line); border-radius: var(--se-radius); padding: 16px; text-align: center; }
.se-band-val { font-family: var(--se-font-display); font-size: 2.2em; font-weight: 800; line-height: 1.1; }
.se-band-lbl { font-size: .85em; color: var(--se-muted); font-weight: 600; }
.se-band--overall { background: var(--se-ink); color: var(--se-on-ink); border-color: var(--se-ink); }
.se-band--overall .se-band-lbl { color: var(--se-on-ink); opacity: .8; }
.se-band--overall .se-band-val { color: var(--se-accent); }
.se-pending { font-size: 1em; font-weight: 700; color: var(--se-muted); }
.se-review { width: 100%; border-collapse: collapse; font-size: .92em; }
.se-review th, .se-review td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--se-line); vertical-align: top; }
.se-review th { font-size: .8em; text-transform: uppercase; letter-spacing: .06em; color: var(--se-muted); }
.se-review .is-ok td:first-child { box-shadow: inset 4px 0 0 var(--se-ok); }
.se-review .is-bad td:first-child { box-shadow: inset 4px 0 0 var(--se-bad); }
.se-tag { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: .78em; font-weight: 800; }
.se-tag--ok { background: var(--se-ok-bg); color: var(--se-ok); }
.se-tag--bad { background: var(--se-bad-bg); color: var(--se-bad); }
.se-tablewrap { overflow-x: auto; border: 1px solid var(--se-line); border-radius: 10px; background: var(--se-surface); }
.se-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 12px; }
.se-tab { border: 1px solid var(--se-line); background: var(--se-surface); border-radius: 999px; padding: 6px 14px; min-height: 40px; font-weight: 700; color: var(--se-ink); }
.se-tab.is-active { background: var(--se-ink); color: var(--se-on-ink); border-color: var(--se-ink); }
.se-notice { padding: 12px 14px; border-radius: 10px; background: var(--se-notice-bg); border: 1px solid var(--se-notice-line); margin: 12px 0; font-size: .95em; }

/* Mobile */
@media (max-width: 820px) {
  .se-split { flex-direction: column; }
  .se-panetabs { display: flex; gap: 6px; padding: 8px 12px; background: var(--se-surface); border-bottom: 1px solid var(--se-line); }
  .se-panetabs .se-tab { flex: 1; }
  .se-split[data-show="left"] .se-pane--right { display: none; }
  .se-split[data-show="right"] .se-pane--left { display: none; }
  .se-pane--left { border-right: 0; }
  .se-pane { padding: 16px; }
  .se-top-mid { display: none; }
  .se-app.is-module .se-brand { display: none; }
  .se-top { padding: 8px 12px; }
  .se-screen { padding: 20px 16px; }
  .se-card { padding: 18px; }
  .se-textarea { min-height: 260px; }
}
@media print { .se-nav, .se-top-tools { display: none; } }

/* ---------- Exam look: plain screen modelled on computer-delivered IELTS ---------- */
.se-namefield { display: grid; gap: 6px; margin: 4px 0 18px; }
.se-namefield label { font-weight: 700; }
.se-name { max-width: 380px; width: 100%; }
.se-linkbtn { background: none; border: 0; padding: 6px 4px; min-height: 36px; color: var(--se-ink); text-decoration: underline; text-underline-offset: 3px; font-size: .9em; cursor: pointer; }
.se-select--small { min-height: 40px; font-size: .85em; padding: 4px 8px; }
.se-progress--inline { display: inline-block; width: 140px; height: 6px; margin: 0 0 0 10px; vertical-align: middle; }
.se-volwrap { display: flex; align-items: center; gap: 8px; font-size: .9em; }
.se-volume { width: 120px; accent-color: var(--se-ink); }
.se-navcount { font-weight: 400; margin-left: 6px; color: var(--se-muted); white-space: nowrap; }
.se-nav-arrows { display: flex; gap: 6px; flex: 0 0 auto; }
.se-timer-ico { display: none; }

.se-exam { transition: background-color .2s ease; }
.se-exam .se-top--exam { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; padding: 8px 16px; background: var(--se-surface); border-bottom: 2px solid var(--se-ink); }
.se-cand { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.se-cand strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.se-cand-lbl { font-size: .75em; color: var(--se-muted); }
.se-exam .se-top-mid { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--se-ink); white-space: nowrap; font-size: 1em; }
.se-exam .se-timer { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 0; min-width: 0; font-size: 1.05em; }
.se-exam .se-timer-ico { display: inline-flex; }
.se-exam .se-timer.is-low { color: var(--se-bad); background: none; }
.se-exam .se-timer.is-hidden .se-timer-val { visibility: hidden; }
.se-exam .se-top-tools { justify-content: flex-end; }
.se-exam .se-btn, .se-exam .se-iconbtn, .se-exam .se-select, .se-exam .se-tab, .se-exam .se-flagbtn, .se-exam .se-audio, .se-exam .se-optbox, .se-exam .se-modal { border-radius: 3px; }
.se-exam .se-btn { background: var(--se-surface); color: var(--se-ink); border: 1px solid var(--se-ink); font-weight: 700; }
.se-exam .se-btn--accent, .se-exam .se-btn--small { background: var(--se-ink); color: var(--se-on-ink); border-color: var(--se-ink); }
.se-exam .se-btn:hover { transform: none; filter: brightness(1.08); }
.se-exam .se-pane--left { background: var(--se-surface); border-right: 2px solid var(--se-line); }
.se-exam .se-group-ins { background: none; border: 1px solid var(--se-line); border-radius: 0; }
.se-exam .se-qnum { border-radius: 3px; border-width: 1px; min-width: 2.2em; }
.se-exam .se-q.is-answered .se-qnum { background: var(--se-surface); color: var(--se-ink); border-width: 2px; }
.se-exam .se-gap, .se-exam .se-select, .se-exam .se-textarea { border-radius: 2px; border: 1px solid var(--se-ink); }
.se-exam .se-opt { border-radius: 3px; }
.se-exam .se-opt.is-picked { box-shadow: none; border-color: var(--se-ink); background: var(--se-current-bg); }
.se-exam .se-nav { border-top: 2px solid var(--se-ink); padding: 6px 12px; }
.se-exam .se-navpart:not(.is-current) .se-navpart-label { border: 1px solid var(--se-line); border-radius: 3px; padding: 6px 10px; font-weight: 700; }
.se-exam .se-navpart-label.is-active { background: none; color: var(--se-ink); font-weight: 800; }
.se-exam .se-navq { border-radius: 2px; background: var(--se-surface); border: 1px solid var(--se-line); }
.se-exam .se-navq.is-answered { background: var(--se-surface); color: var(--se-ink); border-color: var(--se-ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.se-exam .se-navq.is-current { box-shadow: 0 0 0 2px var(--se-accent); }
.se-exam .se-arrow { background: var(--se-ink); color: var(--se-on-ink); border-color: var(--se-ink); }
.se-exam .se-tab.is-active { background: var(--se-ink); color: var(--se-on-ink); }
.se-exam .se-wc { font-weight: 400; }
@media (max-width: 820px) {
  .se-exam .se-top--exam { grid-template-columns: minmax(0, 1fr) auto; }
  .se-exam .se-top-mid { display: flex; }
  .se-exam .se-top-tools { grid-column: 1 / -1; justify-content: flex-start; }
}
