/* Mock Exam Builder. Everything is scoped to .tetmb so the Elementor theme is untouched.
   System fonts only: no Google Fonts request, so nothing extra for the cookie banner. */
.tetmb {
  --paper: #ffffff;
  --desk: #eef1f4;
  --ink: #1c2b45;
  --ink-soft: #4a5872;
  --rule: #c9d2dd;
  --gold: #b8862a;
  --red: #b3261e;
  --amber: #8a5a00;
  --amber-bg: #fff6e2;
  --red-bg: #fdecea;
  --ok: #1f6b3a;
  --ok-bg: #e8f4ec;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--desk);
  border-radius: 6px;
  padding: 20px;
  line-height: 1.45;
  font-size: 15px;
  max-width: 1280px;
  margin: 0 auto;
  box-sizing: border-box;
}
.tetmb *, .tetmb *::before, .tetmb *::after { box-sizing: border-box; }
.tetmb h2, .tetmb h3, .tetmb h4 { font-family: var(--sans); color: var(--ink); margin: 0; letter-spacing: 0; text-transform: none; }
.tetmb button, .tetmb select, .tetmb input { font: inherit; color: inherit; }
.tetmb :focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* header */
.tetmb-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 24px; margin-bottom: 14px; }
.tetmb-title h2 { font-family: var(--serif); font-size: 28px; font-weight: 600; line-height: 1.15; }
.tetmb-title p { margin: 2px 0 0; color: var(--ink-soft); font-size: 14px; }
.tetmb-tabs { display: flex; gap: 0; border: 1px solid var(--ink); border-radius: 4px; overflow: hidden; background: var(--paper); }
.tetmb-tabs button { border: 0; background: transparent; padding: 8px 16px; cursor: pointer; font-weight: 600; border-right: 1px solid var(--ink); }
.tetmb-tabs button:last-child { border-right: 0; }
.tetmb-tabs button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.tetmb-tabs button[disabled] { color: #8a96a8; cursor: not-allowed; }
.tetmb-switches { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.tetmb-boards button { font-weight: 600; }

/* toolbar */
.tetmb-bar { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: end; background: var(--paper); border: 1px solid var(--rule); border-radius: 4px; padding: 12px 14px; margin-bottom: 16px; }
.tetmb-field { display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: var(--ink-soft); }
.tetmb-field select, .tetmb-field input { min-width: 200px; padding: 7px 9px; border: 1px solid var(--rule); border-radius: 3px; background: #fff; font-size: 14px; color: var(--ink); }
.tetmb-field input { min-width: 240px; }
.tetmb-btn { border: 1px solid var(--ink); background: #fff; color: var(--ink); padding: 7px 13px; border-radius: 3px; cursor: pointer; font-weight: 600; font-size: 14px; }
.tetmb-btn:hover { background: #f3f5f8; }
.tetmb-btn.primary { background: var(--ink); color: #fff; }
.tetmb-btn.primary:hover { background: #2a3d60; }
.tetmb-btn[disabled] { opacity: .45; cursor: not-allowed; }
.tetmb-btn.quiet { border-color: var(--rule); font-weight: 500; }
.tetmb-spacer { flex: 1; }

/* three columns: paper outline, slots, panel */
.tetmb-grid { display: grid; grid-template-columns: 190px minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .tetmb-grid { grid-template-columns: minmax(0, 1fr) 280px; } .tetmb-outline { display: none; } }
@media (max-width: 760px) { .tetmb-grid { grid-template-columns: 1fr; } .tetmb-meta, .tetmb-preview, .tetmb-empty-note { margin-left: 0; } .tetmb-panel { position: static; } .tetmb { padding: 12px; } .tetmb-field select, .tetmb-field input { min-width: 0; width: 100%; } .tetmb-field { flex: 1 1 100%; } .tetmb-slot-top { flex-wrap: wrap; } .tetmb-slot-name { order: -1; } .tetmb-switches, .tetmb-tabs { max-width: 100%; } .tetmb-tabs button { padding: 8px 10px; } }

/* the paper outline: a ruled strip that reads like the paper's own page of contents */
.tetmb-outline { position: sticky; top: 16px; background: var(--paper); border: 1px solid var(--rule); border-left: 5px solid var(--ink); padding: 10px 0; border-radius: 2px; }
.tetmb-outline h3 { font-size: 13px; font-weight: 700; padding: 0 12px 6px; color: var(--ink-soft); }
.tetmb-outline ol { list-style: none; margin: 0; padding: 0; }
.tetmb-outline li a { display: flex; justify-content: space-between; gap: 8px; padding: 5px 12px; text-decoration: none; color: var(--ink); border-top: 1px solid #e7ebf0; font-size: 14px; }
.tetmb-outline li a:hover { background: #f5f7fa; }
.tetmb-outline li.sec { padding: 8px 12px 3px; font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.tetmb-outline .m { font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.tetmb-outline .empty a { color: var(--red); }
.tetmb-outline .total { display: flex; justify-content: space-between; padding: 8px 12px 2px; border-top: 2px solid var(--ink); font-weight: 700; margin-top: 4px; }

/* slots */
.tetmb-slots, .tetmb-panel { min-width: 0; }
.tetmb-section { margin-bottom: 18px; }
.tetmb-section > h3 { font-size: 17px; font-weight: 700; margin: 0 0 8px; display: flex; justify-content: space-between; }
.tetmb-section > h3 span { font-weight: 500; color: var(--ink-soft); font-size: 14px; }
.tetmb-slot { background: var(--paper); border: 1px solid var(--rule); border-radius: 3px; padding: 12px 14px; margin-bottom: 8px; scroll-margin-top: 20px; }
.tetmb-slot.is-empty { border-style: dashed; border-color: #9aa8ba; }
.tetmb-slot-top { display: flex; gap: 10px; align-items: center; }
.tetmb-qno { font-family: var(--serif); font-weight: 700; font-size: 18px; min-width: 32px; }
.tetmb-slot select { flex: 1 1 0; width: 0; min-width: 0; max-width: 100%; padding: 7px 9px; border: 1px solid var(--rule); border-radius: 3px; background: #fff; font-size: 14px; }
.tetmb-move { display: flex; gap: 4px; }
.tetmb-move button { border: 1px solid var(--rule); background: #fff; border-radius: 3px; width: 30px; height: 30px; cursor: pointer; font-size: 14px; line-height: 1; }
.tetmb-move button[disabled] { opacity: .3; cursor: default; }
.tetmb-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0 42px; font-size: 12.5px; color: var(--ink-soft); }
.tetmb-chip { border: 1px solid var(--rule); border-radius: 999px; padding: 1px 8px; background: #f7f9fb; }
.tetmb-chip.skill { border-color: #d9c59a; background: #fbf6ea; color: #6b4e12; }
.tetmb-preview { margin: 8px 0 0 42px; }
.tetmb-preview summary { cursor: pointer; font-size: 13px; color: var(--ink); font-weight: 600; }
.tetmb-paper { font-family: var(--serif); font-size: 15px; line-height: 1.55; border-left: 3px solid var(--rule); padding: 6px 0 2px 14px; margin-top: 6px; max-width: 72ch; }
.tetmb-paper p { margin: 0 0 8px; }
.tetmb-paper .q { display: flex; gap: 10px; justify-content: space-between; }
.tetmb-paper .q b { font-family: var(--sans); }
.tetmb-paper .mk { font-family: var(--sans); font-weight: 700; white-space: nowrap; }
.tetmb-paper .opt { margin: 0 0 2px 24px; font-size: 14px; }
.tetmb-paper .src { font-size: 12px; color: var(--ink-soft); font-style: italic; }
.tetmb-paper .ext { font-family: var(--sans); font-size: 13.5px; margin: 0 0 4px; }
.tetmb-empty-note { margin: 8px 0 0 42px; font-size: 13px; color: var(--ink-soft); }
.tetmb-qno.wide { font-size: 15px; min-width: 58px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tetmb-slot-name { font-weight: 600; font-size: 14px; white-space: nowrap; }
.tetmb-slot.compact { padding: 7px 12px; margin-bottom: 5px; }
.tetmb-slot.compact .tetmb-meta, .tetmb-slot.compact .tetmb-preview { margin-top: 4px; }
.tetmb-mix { margin: -2px 0 8px; font-size: 13px; color: var(--ink-soft); }
.tetmb-paper .ext.sub { margin-left: 16px; color: var(--ink-soft); }

/* side panel */
.tetmb-panel { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 12px; }
.tetmb-box { background: var(--paper); border: 1px solid var(--rule); border-radius: 3px; padding: 12px 14px; }
.tetmb-box h3 { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.tetmb-msg { font-size: 13.5px; padding: 7px 9px; border-radius: 3px; margin-bottom: 6px; }
.tetmb-msg.err { background: var(--red-bg); color: var(--red); }
.tetmb-msg.warn { background: var(--amber-bg); color: var(--amber); }
.tetmb-msg.ok { background: var(--ok-bg); color: var(--ok); }
.tetmb-theme { margin-bottom: 8px; font-size: 13.5px; }
.tetmb-theme .bar { height: 6px; background: #e7ebf0; border-radius: 3px; margin-top: 3px; overflow: hidden; }
.tetmb-theme .bar i { display: block; height: 100%; background: var(--ink); }
.tetmb-codes { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.tetmb-codes span { font-size: 12px; border: 1px solid var(--rule); border-radius: 3px; padding: 1px 5px; font-variant-numeric: tabular-nums; cursor: help; }
.tetmb-dl h4 { font-size: 13.5px; font-weight: 700; margin: 8px 0 6px; }
.tetmb-dl .row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.tetmb-dl .row .tetmb-btn { font-size: 13px; padding: 7px 8px; }
.tetmb-dl .row .tetmb-btn.wide { grid-column: span 2; }
.tetmb-status { font-size: 13px; color: var(--ink-soft); min-height: 1.2em; margin-top: 6px; }
.tetmb-loading, .tetmb-gate p { padding: 24px; background: #fff; border: 1px solid #c9d2dd; border-radius: 4px; }
@media (prefers-reduced-motion: no-preference) { .tetmb-slot { transition: border-color .15s; } }

/* ---------- 0.5: modes, ready-made gallery, versions, custom tests, live preview ---------- */
.tetmb [hidden] { display: none !important; }
.tetmb-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tetmb-hint { font-size: 12.5px; color: var(--ink-soft); margin: 4px 0 0; }
.tetmb-link { border: 0; background: none; padding: 0; color: var(--ink); text-decoration: underline; cursor: pointer; font-size: 13px; }
.tetmb-btn.small { padding: 4px 9px; font-size: 12.5px; }
.tetmb-wide { width: 100%; margin-top: 10px; }
.tetmb-grow { flex: 1 1 260px; }
.tetmb-grow input { width: 100%; }
.tetmb-empty { background: var(--paper); border: 1px dashed #9aa8ba; border-radius: 3px; padding: 18px; color: var(--ink-soft); }
.tetmb-empty h3 { font-size: 16px; margin-bottom: 4px; }

/* the two modes */
.tetmb-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.tetmb-modes button { text-align: left; border: 1px solid var(--rule); border-left: 5px solid var(--rule); background: var(--paper); border-radius: 3px; padding: 12px 14px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.tetmb-modes button b { font-family: var(--serif); font-size: 19px; font-weight: 600; }
.tetmb-modes button span { font-size: 13px; color: var(--ink-soft); }
.tetmb-modes button[aria-pressed="true"] { border-color: var(--ink); border-left-color: var(--gold); box-shadow: inset 0 0 0 1px var(--ink); }

/* gallery */
.tetmb-gintro { margin: 0 0 14px; color: var(--ink-soft); max-width: 75ch; }
.tetmb-gset { margin-bottom: 18px; }
.tetmb-gset > h3 { font-size: 17px; margin: 0 0 8px; }
.tetmb-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.tetmb-card { background: var(--paper); border: 1px solid var(--rule); border-top: 4px solid var(--ink); border-radius: 3px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tetmb-card .kicker { font-size: 12px; font-weight: 700; color: var(--gold); text-transform: uppercase; letter-spacing: .04em; }
.tetmb-card h4 { font-family: var(--serif); font-size: 18px; font-weight: 600; line-height: 1.2; }
.tetmb-card-line { margin: 0; font-size: 13.5px; }
.tetmb-card-themes { margin: 0; font-size: 12.5px; color: var(--ink-soft); }
.tetmb-card-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; }
.tetmb-card-dl { display: grid; grid-template-columns: 44px repeat(3, minmax(0, 1fr)); gap: 4px 5px; align-items: center; border-top: 1px solid #e7ebf0; padding-top: 8px; }
.tetmb-card-dl .fmt { font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.tetmb-card-dl .tetmb-btn { font-size: 12px; padding: 5px 4px; font-weight: 500; white-space: normal; line-height: 1.2; }
.tetmb-gstatus { min-height: 1.2em; }

/* dialog preview */
.tetmb-dialog { width: min(1000px, calc(100vw - 24px)); max-width: none; height: min(92vh, 1100px); border: 1px solid var(--ink); border-radius: 4px; padding: 0; background: var(--desk); color: var(--ink); font-family: var(--sans); }
.tetmb-dialog[open] { display: flex; flex-direction: column; }
.tetmb-dialog::backdrop { background: rgba(28, 43, 69, .55); }
.tetmb-dlg-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; background: var(--paper); border-bottom: 1px solid var(--rule); }
.tetmb-dlg-head h3 { font-size: 16px; }
.tetmb-dlg-body { flex: 1 1 auto; min-height: 0; padding: 10px 14px 0; display: flex; }
.tetmb-dlg-body .tetmb-pv { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.tetmb-dlg-body .tetmb-pv-frame { flex: 1; min-height: 0; height: auto; }
.tetmb-dlg-dl { padding: 8px 14px 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tetmb-dlg-dl .tetmb-card-dl { flex: 1 1 520px; border: 0; padding: 0; }
.tetmb-dialog .tetmb-status { padding: 0 14px 10px; margin: 4px 0 0; }

/* versions */
.tetmb-versions:empty { display: none; }
.tetmb-versions { margin: -6px 0 14px; display: flex; flex-direction: column; gap: 8px; }
.tetmb-vrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 14px; }
.tetmb-vtabs button { padding: 5px 12px; font-size: 13px; }
.tetmb-vhint { font-size: 12.5px; color: var(--ink-soft); }
.tetmb-changes { background: var(--paper); border: 1px solid var(--rule); border-left: 4px solid var(--gold); border-radius: 3px; padding: 8px 12px; font-size: 13.5px; }
.tetmb-changes summary { cursor: pointer; font-weight: 600; }
.tetmb-changes ul { margin: 6px 0 0; padding-left: 18px; }
.tetmb-changes li { margin-bottom: 3px; }
.tetmb-vnote { margin: 0; font-size: 13px; color: var(--amber); background: var(--amber-bg); padding: 6px 9px; border-radius: 3px; }
.tetmb-time { margin: 6px 12px 0; font-size: 12.5px; color: var(--ink-soft); }

/* custom test */
.tetmb-tgrid { display: grid; grid-template-columns: 280px minmax(0, 1fr) 290px; gap: 16px; align-items: start; }
.tetmb-tset, .tetmb-tmain, .tetmb-tpanel { min-width: 0; }
.tetmb-tset .tetmb-field select, .tetmb-tset .tetmb-field input { min-width: 0; width: 100%; }
.tetmb-tset .tetmb-field { margin-bottom: 10px; }
.tetmb-fs { border: 0; padding: 0; margin: 0 0 12px; min-width: 0; }
.tetmb-fs legend { font-size: 13px; color: var(--ink-soft); padding: 0; margin-bottom: 3px; }
.tetmb-len { display: flex; gap: 6px; }
.tetmb-len input { width: 90px; padding: 7px 9px; border: 1px solid var(--rule); border-radius: 3px; font-size: 14px; }
.tetmb-len select, .tetmb-mixrow select { padding: 7px 9px; border: 1px solid var(--rule); border-radius: 3px; background: #fff; font-size: 14px; }
.tetmb-mixrow { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13.5px; margin-bottom: 5px; }
.tetmb-topics { border-top: 1px solid #e7ebf0; border-bottom: 1px solid #e7ebf0; padding: 8px 0; margin-bottom: 10px; }
.tetmb-topics-head { display: flex; justify-content: space-between; align-items: baseline; }
.tetmb-topics h4 { font-size: 13.5px; }
.tetmb-tree { max-height: 340px; overflow-y: auto; margin-top: 6px; font-size: 13px; }
.tetmb-tree details { border-top: 1px solid #eef1f4; padding: 4px 0; }
.tetmb-tree summary { cursor: pointer; font-weight: 600; }
.tetmb-tree summary input { margin-right: 4px; }
.tetmb-ttopic { margin: 4px 0 6px 16px; }
.tetmb-ttopic p { margin: 4px 0 2px; font-weight: 600; color: var(--ink-soft); font-size: 12.5px; }
.tetmb-tcheck { display: block; padding: 2px 0; cursor: pointer; }
.tetmb-tcheck input { margin-right: 4px; }
.tetmb-tree .n { color: var(--ink-soft); font-weight: 400; font-variant-numeric: tabular-nums; }
.tetmb-tmsg { font-size: 13px; margin: 8px 0 0; color: var(--ink); min-height: 1.2em; }
.tetmb-tsec .tetmb-trow, .tetmb-tgroup { background: var(--paper); border: 1px solid var(--rule); border-radius: 3px; margin-bottom: 8px; }
.tetmb-tgroup .tetmb-trow { border: 0; border-top: 1px solid #e7ebf0; border-radius: 0; margin: 0; }
.tetmb-tghead { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 12px; background: #f5f7fa; font-weight: 600; font-size: 14px; }
.tetmb-tghead small { font-weight: 400; color: var(--ink-soft); }
.tetmb-trow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px 10px; align-items: start; padding: 9px 12px; }
.tetmb-trow .sum, .tetmb-addlist .sum { margin: 0; font-size: 14px; }
.tetmb-trow .tetmb-meta, .tetmb-addlist .tetmb-meta { margin: 5px 0 0; }
.tetmb-tact { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; align-items: center; max-width: 230px; }
.tetmb-chip.mk { border-color: var(--ink); background: #fff; color: var(--ink); font-weight: 700; }
.tetmb-src { font-size: 12px; color: var(--ink-soft); align-self: center; }
.tetmb-tadd { margin-top: 6px; }
.tetmb-addbar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: end; margin-bottom: 8px; }
.tetmb-addbar .tetmb-field select, .tetmb-addbar .tetmb-field input { min-width: 0; }
.tetmb-check { font-size: 13px; display: flex; gap: 5px; align-items: center; padding-bottom: 8px; }
.tetmb-addlist { list-style: none; margin: 0; padding: 0; max-height: 520px; overflow-y: auto; }
.tetmb-addlist li { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 10px; align-items: start; padding: 8px 0; border-top: 1px solid #e7ebf0; }
.tetmb-addlist .from { margin: 2px 0 0; font-size: 12.5px; color: var(--ink-soft); }
.tetmb-more { margin: 8px 0 0; }
.tetmb-tsum .big { font-size: 15px; margin: 0 0 2px; }
.tetmb-tsum .big b { font-family: var(--serif); font-size: 28px; }
.tetmb-tsum p { margin: 0 0 8px; font-size: 13.5px; }
.tetmb-tpanel { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 12px; }

/* preview */
.tetmb-pvbox { margin-top: 18px; background: var(--paper); border: 1px solid var(--rule); border-radius: 3px; padding: 12px 14px; }
.tetmb-pvbox-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.tetmb-pvbox-head h3 { font-size: 16px; }
.tetmb-pvbox-head .tetmb-hint { flex: 1 1 240px; margin: 0; }
.tetmb-pv-host { margin-top: 10px; }
.tetmb-pv-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 8px; }
.tetmb-pv-tabs button { padding: 6px 12px; font-size: 13px; }
.tetmb-pv-state { font-size: 13px; color: var(--ink-soft); min-width: 10em; }
.tetmb-pv.is-busy .tetmb-pv-state::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 6px; border: 2px solid var(--rule); border-top-color: var(--ink); border-radius: 50%; vertical-align: -1px; }
@media (prefers-reduced-motion: no-preference) { .tetmb-pv.is-busy .tetmb-pv-state::before { animation: tetmb-spin .8s linear infinite; } }
@keyframes tetmb-spin { to { transform: rotate(360deg); } }
.tetmb-pv-open { font-size: 13px; color: var(--ink); }
.tetmb-pv-frame { position: relative; height: min(80vh, 1000px); background: #525659; border: 1px solid var(--rule); border-radius: 2px; }
.tetmb-pv-frame iframe { width: 100%; height: 100%; border: 0; display: block; background: #525659; }
.tetmb-pv.is-busy iframe { opacity: .55; transition: opacity .2s; }
.tetmb-pv-msg { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 20px; text-align: center; background: var(--desk); color: var(--ink); font-size: 14px; }

@media (max-width: 1100px) {
  .tetmb-tgrid { grid-template-columns: 260px minmax(0, 1fr); }
  .tetmb-tpanel { grid-column: 1 / -1; position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}
@media (max-width: 760px) {
  .tetmb-modes { grid-template-columns: 1fr; }
  .tetmb-modes button b { font-size: 17px; }
  .tetmb-tgrid { grid-template-columns: 1fr; }
  .tetmb-tpanel { grid-template-columns: 1fr; }
  .tetmb-trow { grid-template-columns: auto minmax(0, 1fr); }
  .tetmb-tact { grid-column: 1 / -1; justify-content: flex-start; max-width: none; }
  .tetmb-pv-frame { height: 70vh; }
  .tetmb-card-dl { grid-template-columns: 38px repeat(3, minmax(0, 1fr)); }
  .tetmb-dialog { width: 100vw; height: 100vh; max-height: none; border-radius: 0; }
  .tetmb-buildbar .tetmb-field select { min-width: 0; }
}

/* "Set this…" (online sittings): made to stand out, in the panel and at the top of each builder */
.tetmb-setbox { border: 2px solid var(--ok); border-left-width: 6px; background: var(--ok-bg); }
.tetmb-setbox h3 { color: var(--ok); }
.tetmb-setbox p { font-size: 13.5px; color: var(--ink); margin: 0 0 8px; }
.tetmb-setbox .tetmb-btn { width: 100%; background: var(--ok); border-color: var(--ok); color: #fff; }
.tetmb-setbox .tetmb-btn:hover:not([disabled]) { background: #174f2b; }
.tetmb-btn.tetmb-set-top { background: var(--ok); border-color: var(--ok); color: #fff; }
.tetmb-btn.tetmb-set-top:hover:not([disabled]) { background: #174f2b; }
.tetmb-headlinks { margin: 6px 0 0; font-size: 14px; }
.tetmb-headlinks a { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.tetmb-pupilmsg { border: 1px solid var(--rule); border-left: 5px solid var(--ok); background: var(--paper); border-radius: 3px; padding: 10px 12px; margin: 10px 0; }
.tetmb-pupilmsg textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 14px; border: 1px solid var(--rule); border-radius: 3px; padding: 8px; resize: vertical; }
.tetmb-pupilmsg .tetmb-row { display: flex; gap: 10px; align-items: center; margin-top: 6px; }
.tetmb-setdlg { width: min(620px, calc(100vw - 24px)); max-height: min(92vh, 860px); border: 1px solid var(--ink); border-radius: 4px; padding: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.45; }
.tetmb-setdlg::backdrop { background: rgba(28, 43, 69, .55); }
.tetmb-setdlg, .tetmb-setdlg * { box-sizing: border-box; }
.tetmb-setdlg h3 { font-family: var(--sans); font-size: 16px; margin: 0; color: var(--ink); }
.tetmb-set-form { display: flex; flex-direction: column; max-height: inherit; margin: 0; }
.tetmb-set-body { padding: 14px 16px 4px; overflow: auto; display: grid; gap: 14px; }
.tetmb-set-body p { margin: 0; }
.tetmb-set-students { border: 1px solid var(--rule); border-radius: 3px; padding: 8px 12px 10px; margin: 0; }
.tetmb-set-students legend { font-weight: 700; font-size: 14px; padding: 0 6px; }
.tetmb-set-students label { display: flex; gap: 8px; align-items: baseline; padding: 5px 0; cursor: pointer; }
.tetmb-set-students input, .tetmb-set-tick input { width: 16px; height: 16px; accent-color: var(--ink); }
.tetmb-set-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tetmb-setdlg .tetmb-field input, .tetmb-setdlg .tetmb-field textarea { min-width: 0; width: 100%; padding: 7px 9px; border: 1px solid var(--rule); border-radius: 3px; background: #fff; font: inherit; font-size: 14px; color: var(--ink); }
.tetmb-set-tick { display: flex; gap: 8px; align-items: center; font-weight: 600; cursor: pointer; }
.tetmb-set-foot { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 10px 16px 14px; border-top: 1px solid var(--rule); }
.tetmb-set-status { margin: 0; font-size: 13.5px; color: var(--ink-soft); flex: 1; }
@media (max-width: 560px) { .tetmb-set-row { grid-template-columns: 1fr; } }

/* Licences: the free-sample note on the builder page */
.tetmb-licence { background: var(--amber-bg); border: 1px solid #e6cf9c; border-left: 5px solid var(--gold); border-radius: 3px; padding: 10px 14px; margin: -4px 0 16px; }
.tetmb-licence p { margin: 0; }
.tetmb-licence a { font-weight: 600; color: var(--ink); }
.tetmb-modes button[disabled] { opacity: .6; cursor: not-allowed; }

/* [tet_mock_licence]: the licence page */
.tetml { --ink: #1c2b45; --ink-soft: #4a5872; --rule: #c9d2dd; --gold: #b8862a; font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink); max-width: 860px; margin: 0 auto; line-height: 1.5; font-size: 16px; }
.tetml h2 { font-size: 26px; margin: 0 0 4px; }
.tetml h3 { font-size: 20px; margin: 28px 0 8px; }
.tetml-kind { color: var(--ink-soft); margin-top: 0; }
.tetml-msg { background: #e8f4ec; border-left: 4px solid #1f6b3a; padding: 8px 12px; border-radius: 3px; }
.tetml-table { width: 100%; border-collapse: collapse; margin: 12px 0 16px; font-size: 15px; }
.tetml-table th, .tetml-table td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--rule); }
.tetml-table th { font-size: 13px; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-soft); }
.tetml-offers { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 12px 0; }
.tetml-offer { border: 1px solid var(--rule); border-top: 4px solid var(--gold); border-radius: 4px; padding: 14px; background: #fff; }
.tetml-offer h4 { margin: 0; font-size: 18px; }
.tetml-sub { margin: 2px 0 8px; color: var(--ink-soft); font-size: 14px; }
.tetml-price { font-size: 24px; font-weight: 700; margin: 0 0 10px; }
.tetml-price span { font-size: 13px; font-weight: 400; color: var(--ink-soft); }
.tetml-intro { font-size: 13px; color: var(--ok); font-weight: 600; margin: -6px 0 10px; }
.tetml-kind-pick { border: 0; padding: 0; margin: 0 0 8px; }
.tetml-kind-pick label { display: block; margin: 4px 0; }
.tetml-name { width: 100%; max-width: 520px; padding: 8px; font-size: 16px; }
.tetml-members { padding-left: 18px; }
.tetml-inline { display: inline; }
.tetml-terms, .tetml-edit { margin-top: 24px; border-top: 1px solid var(--rule); padding-top: 12px; }
.tetml-terms summary, .tetml-edit summary { cursor: pointer; font-weight: 600; }
.tetml-invoice { font-size: 15px; }
@media (max-width: 600px) { .tetml-table { font-size: 14px; } .tetml-table th, .tetml-table td { padding: 6px; } }
.tetml a.tetmb-btn { display: inline-block; text-decoration: none; }
.tetml-offer--wide { grid-column: 1 / -1; border-top-color: var(--ink); }
.tetml-units { background: #eef1f4; border-radius: 3px; padding: 8px 12px; }

/* After signing up on the teachers' page. */
.tetmb-welcome { background: #eef6ee; border-left: 4px solid #2f7d4f; padding: 12px 16px; margin: 0 0 18px; border-radius: 4px; }
.tetmb-welcome p { margin: 0; }
