/* Vantham application shell.
   Deliberately NOT named styles.css: Moodle injects every plugin's styles.css into every
   Moodle page, and this file is only for our standalone screens.
   Tokens match site/assets/style.css, so the app, vantham.com and verify.vantham.com are one brand.
   Spec: docs/vantham-product-spec-v1.md section 6.4. */

:root {
  --blue: #3B82F6;
  --blue-dark: #2563EB;
  --blue-deep: #1E3A8A;
  --blue-soft: #EEF4FF;
  --ink: #1E2633;
  --ink-2: #39424F;
  --muted: #6B7280;
  --line: #E5E7EB;
  --paper: #FFFFFF;
  --paper-2: #F7F9FC;
  --ok: #15803D; --ok-bg: #E8F6EE;
  --warn: #92600A; --warn-bg: #FFF4D6;
  --bad: #B42318; --bad-bg: #FDECEC;
  --radius: 14px;
  --radius-sm: 10px;
  --wrap: 1120px;
  --shadow: 0 1px 2px rgba(30,38,51,.05), 0 8px 24px rgba(30,38,51,.06);
  --ring: 0 0 0 3px rgba(59,130,246,.22);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px; line-height: 1.55; color: var(--ink);
  background:
    radial-gradient(1000px 420px at 12% -8%, rgba(59,130,246,.10), transparent 60%),
    radial-gradient(760px 340px at 92% 4%, rgba(59,130,246,.07), transparent 62%),
    linear-gradient(180deg, #F5F8FF 0, #FFFFFF 520px);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
/* No hard focus border on click. A soft ring for keyboard users only. */
:focus { outline: none; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 8px; }
.visually-hidden-focusable, .sr-only, .sr-only-focusable,
a[href="#maincontent"] { position: absolute; left: 12px; top: 8px; z-index: 101;
  width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0; }
.visually-hidden-focusable:focus, .sr-only:focus, .sr-only-focusable:focus,
a[href="#maincontent"]:focus { width: auto; height: auto; margin: 0; padding: 10px 14px;
  overflow: visible; clip: auto; color: var(--ink); background: #fff; border: 2px solid var(--blue);
  border-radius: 8px; box-shadow: var(--ring); }

.vx-wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(20px, 4vw, 32px); }

/* ---------- top bar ---------- */
.vx-top {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.88); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.vx-top-inner { display: flex; align-items: center; gap: 22px; min-height: 64px; }
.vx-brand { display: flex; align-items: center; }
.vx-brand:hover { text-decoration: none; }
.vx-logo { height: 24px; width: auto; }
.vx-orgmark { display: flex; align-items: center; gap: 10px; padding-left: 18px; border-left: 1px solid var(--line);
  color: var(--ink-2); font-weight: 500; font-size: .92rem; white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.vx-orgmark img { height: 26px; width: auto; max-width: 90px; object-fit: contain; border-radius: 4px; }
.vx-nav { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.vx-navlink { padding: 8px 12px; border-radius: 8px; color: var(--ink-2); font-weight: 500; font-size: .94rem; }
.vx-navlink:hover { background: var(--paper-2); color: var(--ink); text-decoration: none; }
.vx-navlink.is-active { color: var(--blue-dark); background: var(--blue-soft); }
.vx-top-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.vx-user { position: relative; }
.vx-user summary { list-style: none; cursor: pointer; }
.vx-user summary::-webkit-details-marker { display: none; }
.vx-avatar { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--blue-soft); color: var(--blue-dark); font-weight: 600; font-size: .85rem; border: 1px solid #DCE7FD; }
.vx-user-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 240px; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow); padding: 8px; }
.vx-user-name { font-weight: 600; padding: 8px 10px 0; }
.vx-user-email { color: var(--muted); font-size: .85rem; padding: 0 10px 8px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.vx-user-menu a { display: block; padding: 8px 10px; border-radius: 8px; color: var(--ink-2); }
.vx-user-menu a:hover { background: var(--paper-2); text-decoration: none; }

.vx-adminbar { background: var(--ink); color: #E5E7EB; font-size: .86rem; padding: 7px 0; }
.vx-adminbar a { color: #fff; font-weight: 600; margin-left: 8px; }

/* ---------- page ---------- */
.vx-main { flex: 1; padding: 36px 0 64px; }
.vx-narrow { max-width: 760px; margin-left: max(0px, calc((100% - var(--wrap)) / 2)); }
.vx-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.vx-head-text { min-width: 0; }
.vx-eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: .38em .9em; border: 1px solid var(--line);
  border-radius: 999px; background: rgba(255,255,255,.75); font-size: .72rem; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); }
.vx-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }
.vx-head h1 { margin: 0; font-size: clamp(1.6rem, 3vw, 2.1rem); line-height: 1.15; letter-spacing: -.02em; font-weight: 700; text-wrap: balance; }
.vx-lede { margin: 8px 0 0; color: var(--ink-2); font-size: 1rem; max-width: 64ch; }
.vx-head-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.vx-section { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 30px 0 12px; }
.vx-section h2 { margin: 0; font-size: 1.05rem; font-weight: 600; }

/* ---------- cards ---------- */
.vx-card { background: rgba(255,255,255,.82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.vx-panel { padding: 22px 24px; margin-bottom: 18px; }
.vx-panel-title { margin: 0 0 14px; font-size: 1.02rem; font-weight: 600; }

.vx-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.vx-stat { padding: 18px 20px; }
.vx-stat-value { font-size: 1.75rem; font-weight: 650; letter-spacing: -.02em; line-height: 1.1; }
.vx-stat-label { color: var(--muted); font-size: .88rem; margin-top: 6px; }
.vx-stat-hint { color: #9CA3AF; font-size: .8rem; margin-top: 2px; }

.vx-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin-bottom: 8px; }
.vx-action { display: flex; flex-direction: column; gap: 6px; padding: 20px 22px; color: var(--ink); transition: transform .14s ease, box-shadow .14s ease; }
.vx-action:hover { text-decoration: none; transform: translateY(-1px); box-shadow: 0 2px 4px rgba(30,38,51,.05), 0 14px 30px rgba(30,38,51,.09); }
.vx-action.is-primary { background: linear-gradient(135deg, var(--blue) 0%, var(--blue-deep) 100%); border-color: transparent; color: #fff; }
.vx-action-title { font-weight: 600; font-size: 1.02rem; }
.vx-action-text { color: var(--muted); font-size: .9rem; }
.vx-action.is-primary .vx-action-text { color: rgba(255,255,255,.86); }

/* ---------- tables ---------- */
.vx-tablewrap { overflow-x: auto; margin-bottom: 18px; }
.vx-table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.vx-table th { text-align: left; font-weight: 600; color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .05em;
  padding: 12px 18px; border-bottom: 1px solid var(--line); }
/* Short values stay on one line; names and anything with a link to a course or person may wrap. */
.vx-table td + td { white-space: nowrap; }
.vx-table td:has(.vx-strong), .vx-table td:has(.vx-muted) { white-space: normal; }
.vx-table td { padding: 13px 18px; border-bottom: 1px solid #F0F2F5; vertical-align: middle; }
.vx-table tr:last-child td { border-bottom: 0; }
.vx-table tbody tr:hover td { background: rgba(59,130,246,.03); }
.vx-table td a.vx-strong { color: var(--ink); font-weight: 600; }
.vx-empty { padding: 30px; text-align: center; color: var(--muted); background: rgba(255,255,255,.7); border: 1px dashed #D6DBE3;
  border-radius: var(--radius); margin-bottom: 18px; }
.vx-muted { color: var(--muted); font-size: .85rem; }
.vx-row-actions { display: flex; gap: 14px; justify-content: flex-end; white-space: nowrap; }

.vx-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .76rem; font-weight: 600; line-height: 1.7; white-space: nowrap; }
.vx-pill-ok { background: var(--ok-bg); color: var(--ok); }
.vx-pill-warn { background: var(--warn-bg); color: var(--warn); }
.vx-pill-bad { background: var(--bad-bg); color: var(--bad); }
.vx-pill-info { background: var(--blue-soft); color: var(--blue-dark); }
.vx-pill-muted { background: #F1F3F6; color: var(--muted); }

/* ---------- buttons and links ---------- */
.vx-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: .7em 1.2em; border-radius: var(--radius-sm);
  font: inherit; font-weight: 600; font-size: .94rem; line-height: 1; cursor: pointer; white-space: nowrap;
  border: 1px solid var(--line); background: #fff; color: var(--ink); transition: background .15s, border-color .15s, transform .1s; }
.vx-btn:hover { text-decoration: none; border-color: #D1D5DB; background: var(--paper-2); }
.vx-btn:active { transform: translateY(1px); }
.vx-btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.vx-btn-primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: #fff; }
.vx-btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.vx-btn-ghost:hover { background: var(--paper-2); }
.vx-btn-danger { color: var(--bad); }
.vx-btn-sm { padding: .55em .95em; font-size: .88rem; }
.vx-btn[disabled] { opacity: .55; cursor: not-allowed; }
.vx-link { font-size: .9rem; font-weight: 500; color: var(--blue-dark); }
.vx-link.is-danger { color: var(--bad); }

/* ---------- flash ---------- */
.vx-flash { padding: 12px 16px; border-radius: 12px; margin-bottom: 18px; font-size: .94rem; border: 1px solid transparent; }
.vx-flash-ok { background: var(--ok-bg); color: var(--ok); border-color: #CDEBD8; }
.vx-flash-bad { background: var(--bad-bg); color: var(--bad); border-color: #F7D0CC; }
.vx-flash-warn { background: var(--warn-bg); color: var(--warn); border-color: #F3E2B0; }
.vx-flash-info { background: var(--blue-soft); color: var(--blue-dark); border-color: #DCE7FD; }

/* ---------- forms ---------- */
.vx-form .vx-field { margin-bottom: 20px; }
.vx-field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 7px; }
.vx-req { color: #DC2626; margin-left: 3px; font-weight: 700; }
.vx-hint { color: var(--muted); font-size: .84rem; margin-top: 6px; }
.vx-error { color: var(--bad); font-size: .85rem; margin-top: 6px; }
.vx-field.has-error .vx-input { border-color: #F2A9A2; }
.vx-input { width: 100%; padding: .72em .9em; font: inherit; font-size: .95rem; color: var(--ink); background: #fff;
  border: 1px solid #D6DBE3; border-radius: var(--radius-sm); transition: border-color .15s, box-shadow .15s; }
.vx-input:focus { border-color: var(--blue); box-shadow: var(--ring); }
textarea.vx-input { resize: vertical; min-height: 110px; line-height: 1.5; }
.vx-html-editor { width: 100%; min-height: 110px; padding: .72em .9em; font: inherit; font-size: .95rem;
  color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 10px; line-height: 1.5;
  overflow-wrap: anywhere; }
.vx-html-editor:focus { border-color: var(--blue); box-shadow: var(--ring); outline: 0; }
.vx-html-editor[contenteditable="false"] { background: #F4F6F9; color: var(--muted); cursor: not-allowed; }
.vx-html-editor p:first-child { margin-top: 0; }
.vx-html-editor p:last-child { margin-bottom: 0; }
.vx-html-editor-placeholder { color: var(--muted); pointer-events: none; }
.vx-select { appearance: none; -webkit-appearance: none; padding-right: 2.4em;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236B7280' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .9em center; }
.vx-formactions { display: flex; gap: 10px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.vx-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
@media (max-width: 720px) { .vx-row2 { grid-template-columns: 1fr; } }
.vx-check { display: flex; gap: 9px; align-items: flex-start; font-weight: 500; font-size: .92rem; cursor: pointer; }
.vx-check input { margin-top: 4px; accent-color: var(--blue); }
.vx-check input:disabled { opacity: .6; }
.vx-fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px 6px; margin: 18px 0; }
.vx-fieldset legend { padding: 0 8px; font-weight: 600; font-size: .92rem; }
.vx-fieldset-title { font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
  margin: 26px 0 14px; padding-top: 18px; border-top: 1px solid var(--line); }
.vx-fieldset-title.is-first, .vx-form > input[type=hidden] + .vx-fieldset-title { margin-top: 0; padding-top: 0; border-top: 0; }

.vx-choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 760px) { .vx-choices { grid-template-columns: 1fr; } }
.vx-choice { position: relative; cursor: pointer; }
.vx-choice input { position: absolute; opacity: 0; pointer-events: none; }
.vx-choice-body { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 16px 18px; border: 1px solid #D6DBE3;
  border-radius: 12px; background: #fff; transition: border-color .15s, box-shadow .15s, background .15s; }
.vx-choice:hover .vx-choice-body { border-color: #B8C4D6; }
.vx-choice input:checked + .vx-choice-body { border-color: var(--blue); background: var(--blue-soft); box-shadow: 0 0 0 1px var(--blue) inset; }
.vx-choice input:focus-visible + .vx-choice-body { box-shadow: var(--ring); }
.vx-choice-title { font-weight: 600; }
.vx-choice-text { color: var(--muted); font-size: .86rem; }

.vx-seg { display: inline-flex; padding: 4px; gap: 4px; background: #F1F3F6; border-radius: 12px; }
.vx-seg label { margin: 0; font-weight: 500; cursor: pointer; }
.vx-seg input { position: absolute; opacity: 0; pointer-events: none; }
.vx-seg span { display: block; padding: .5em 1em; border-radius: 9px; color: var(--ink-2); font-size: .9rem; }
.vx-seg input:checked + span { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(30,38,51,.12); font-weight: 600; }
.vx-seg input:focus-visible + span { box-shadow: var(--ring); }

.vx-drop, .vx-field label.vx-drop { position: relative; display: flex; font-weight: 400; margin: 0; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 150px; padding: 26px; text-align: center; cursor: pointer; border: 1.5px dashed #C3CCDA; border-radius: var(--radius);
  background: rgba(255,255,255,.7); transition: border-color .15s, background .15s; }
.vx-drop:hover, .vx-drop.is-over { border-color: var(--blue); background: var(--blue-soft); }
.vx-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.vx-drop-prompt { font-weight: 600; color: var(--ink); }
.vx-drop-file { font-size: .9rem; color: var(--blue-dark); font-weight: 600; }
.vx-drop-hint { font-size: .83rem; color: var(--muted); }
.vx-drop.has-file { border-style: solid; border-color: var(--blue); background: var(--blue-soft); }
.vx-drop.has-file .vx-drop-prompt { color: var(--muted); font-weight: 500; }

.vx-panelswitch > [data-panel] { display: none; }
.vx-panelswitch > [data-panel].is-shown { display: block; }

.vx-checklist { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px 18px; margin: 4px 0 6px; }
.vx-checklist label { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; font-size: .92rem; margin: 0; cursor: pointer; }
.vx-checklist input { margin-top: 4px; accent-color: var(--blue); }

/* ---------- builder ---------- */
.vx-steps { display: grid; gap: 12px; }
.vx-step { display: grid; grid-template-columns: 36px 1fr auto; gap: 14px; align-items: center; padding: 18px 20px; }
.vx-step-ico { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: #F1F3F6; color: var(--muted); font-weight: 700; font-size: .9rem; }
.vx-step.is-running .vx-step-ico { background: var(--blue-soft); color: var(--blue-dark); }
.vx-step.is-done .vx-step-ico { background: var(--ok-bg); color: var(--ok); }
.vx-step.is-failed .vx-step-ico { background: var(--bad-bg); color: var(--bad); }
.vx-step-title { font-weight: 600; }
.vx-step-detail { color: var(--muted); font-size: .88rem; margin-top: 2px; }
.vx-bar { height: 6px; border-radius: 999px; background: #EEF1F5; overflow: hidden; margin-top: 10px; }
.vx-bar > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--blue), var(--blue-dark)); border-radius: 999px; transition: width .6s ease; }
.vx-step-pct { font-variant-numeric: tabular-nums; color: var(--muted); font-size: .88rem; }
.vx-spin { width: 16px; height: 16px; border: 2px solid #CFE0FC; border-top-color: var(--blue); border-radius: 50%; animation: vxspin .8s linear infinite; }
@keyframes vxspin { to { transform: rotate(360deg); } }

.vx-review { display: grid; grid-template-columns: 260px 1fr; gap: 22px; align-items: start; }
@media (max-width: 900px) { .vx-review { grid-template-columns: 1fr; } }
.vx-toc { position: sticky; top: 84px; padding: 16px; }
.vx-toc h3 { margin: 0 0 10px; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.vx-toc ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: .9rem; }
.vx-toc a { color: var(--ink-2); }
.vx-lesson { padding: 28px 32px; margin-bottom: 16px; }
.vx-lesson h2 { margin: 0 0 4px; font-size: 1.25rem; letter-spacing: -.01em; }
.vx-lesson .vx-lesson-meta { color: var(--muted); font-size: .84rem; margin-bottom: 14px; }
.vx-lesson h3 { font-size: 1.02rem; margin: 20px 0 6px; }
.vx-lesson p, .vx-lesson li { color: var(--ink-2); }
.vx-lesson ul { padding-left: 20px; }
.vx-lesson .alert { padding: 12px 16px; margin: 14px 0; border-radius: 8px !important; }
.vx-keypoints { margin-top: 16px; padding: 14px 18px; background: var(--paper-2); border-radius: 10px; }
.vx-keypoints strong { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 6px; }
.vx-q { padding: 18px 22px; margin-bottom: 12px; }
.vx-q-text { font-weight: 600; margin-bottom: 10px; }
.vx-q ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.vx-q li { padding: 8px 12px; border-radius: 8px; background: var(--paper-2); font-size: .93rem; color: var(--ink-2); }
.vx-q li.is-correct { background: var(--ok-bg); color: var(--ok); font-weight: 600; }
.vx-q li b { margin-right: 8px; }
.vx-publishbar { position: sticky; bottom: 0; z-index: 40; margin-top: 18px; padding: 14px 0;
  background: rgba(255,255,255,.92); backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
.vx-publishbar form { margin: 0; }
.vx-publishrow { display: flex; align-items: center; gap: 12px; }
.vx-publishrow label { color: var(--muted); font-size: .88rem; white-space: nowrap; margin: 0; }
.vx-publishrow .vx-input { flex: 1 1 auto; min-width: 200px; max-width: 560px; margin-right: auto; }
@media (max-width: 720px) { .vx-publishrow { flex-wrap: wrap; } }

/* ---------- exam ---------- */
.vx-q-num { font-size: .78rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.vx-q-text p { margin: 0 0 12px; }
.vx-options { display: grid; gap: 8px; }
.vx-option { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid #D6DBE3; border-radius: 10px;
  background: #fff; cursor: pointer; font-weight: 500; transition: border-color .15s, background .15s; }
.vx-option:hover { border-color: #B8C4D6; }
.vx-option input { margin-top: 3px; accent-color: var(--blue); }
.vx-option.is-on { border-color: var(--blue); background: var(--blue-soft); }
.vx-option p { margin: 0; }
.vx-q li.is-wrong { background: var(--bad-bg); color: var(--bad); }
.vx-q li p { display: inline; margin: 0; }
.vx-exam-save-status { color: var(--muted); font-size: .86rem; }
.vx-exam-save-status.is-submitting { color: var(--blue-dark); font-weight: 600; }
.vx-exam-save-region { margin: 1rem 0 .75rem; }
.vx-exam-save-region .autosave_info { color: var(--muted); font-size: .86rem; }
#quiz-timer-wrapper { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.82); }
#quiz-timer { margin: 0; padding: 0; color: var(--ink-2); font-weight: 600; background: transparent; }
#quiz-time-left { font-variant-numeric: tabular-nums; white-space: nowrap; }
#toggle-timer { margin: 0; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px;
  color: var(--ink-2); background: #fff; font: inherit; cursor: pointer; }
#toggle-timer:hover { border-color: var(--blue); color: var(--blue-dark); }
#quiz-timer.timeleft10, #quiz-timer.timeleft9, #quiz-timer.timeleft8, #quiz-timer.timeleft7,
#quiz-timer.timeleft6, #quiz-timer.timeleft5, #quiz-timer.timeleft4, #quiz-timer.timeleft3,
#quiz-timer.timeleft2, #quiz-timer.timeleft1, #quiz-timer.timeleft0 { color: var(--bad); }
#responseform { position: relative; }
@media (max-width: 560px) { #quiz-timer-wrapper { align-items: flex-start; flex-wrap: wrap; } }

/* ---------- exam editor ---------- */
.vx-editor-card { position: relative; }
.vx-editor-meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: -4px 0 16px; color: var(--muted); font-size: .84rem; }
.vx-editor-answers { display: grid; gap: 12px; }
.vx-editor-answer { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: rgba(247,249,252,.72); }
.vx-editor-answer-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 8px; font-weight: 700; color: var(--ink-2); }
.vx-editor-answer-head label { margin: 0; font-weight: 500; font-size: .86rem; cursor: pointer; }
.vx-editor-answer .vx-input + .vx-input { margin-top: 8px; }
.vx-editor-actions, .vx-editor-reorder { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.vx-editor-actions { margin-top: 6px; }
.vx-editor-card-actions { display: flex; justify-content: flex-end; margin: -4px 0 12px; }
.vx-editor-reorder { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 12px; }
.vx-editor-card .vx-btn-ghost { padding-left: .75em; padding-right: .75em; }
.vx-preview-question.is-focused { border-color: var(--blue); box-shadow: var(--ring); }
.vx-preview-question .vx-option { cursor: default; }
.vx-preview-question .vx-option input { opacity: .6; }
.vx-preview-question .vx-option:hover { border-color: #D6DBE3; }
@media (max-width: 720px) {
  .vx-editor-answer-head { align-items: flex-start; flex-direction: column; }
}

/* ---------- certificate and audit ---------- */
.vx-certgrid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 900px) { .vx-certgrid { grid-template-columns: 1fr; } }
.vx-certimg { padding: 14px; }
.vx-certimg img { width: 100%; border-radius: 8px; }
.vx-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.6rem; font-weight: 600; letter-spacing: .06em; margin-top: 4px; }
.vx-progress-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.vx-progress-pct { font-size: 2.4rem; font-weight: 700; letter-spacing: -.02em; line-height: 1; }
.vx-bar-lg { height: 10px; margin-top: 14px; }

/* ---------- compliance health ---------- */
.vx-rag { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: .86rem; white-space: nowrap; }
.vx-rag i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.vx-rag-red { color: var(--bad); } .vx-rag-red i { background: #DC2626; box-shadow: 0 0 0 3px #FDECEC; }
.vx-rag-amber { color: var(--warn); } .vx-rag-amber i { background: #D97706; box-shadow: 0 0 0 3px #FFF4D6; }
.vx-rag-green { color: var(--ok); } .vx-rag-green i { background: #16A34A; box-shadow: 0 0 0 3px #E8F6EE; }
.vx-healthrow { display: flex; align-items: center; gap: 16px; margin-top: 14px; flex-wrap: wrap; }
.vx-healthrow .vx-spacer, .vx-spacer { flex: 1; }
.vx-healthrow form { margin: 0; }
.vx-minibar { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.vx-minibar .vx-bar { flex: 1; margin: 0; }

/* ---------- learner ---------- */
.vx-lcards { display: grid; gap: 12px; }
.vx-lcard { display: flex; align-items: center; gap: 20px; padding: 18px 22px; }
.vx-lcard-main { flex: 1; min-width: 0; }
.vx-lcard-top { margin-bottom: 6px; }
.vx-lcard-title { display: block; color: var(--ink); font-weight: 600; font-size: 1.05rem; margin-bottom: 2px; }
.vx-lcard-title:hover { text-decoration: none; color: var(--blue-dark); }
.vx-lcard .vx-bar { max-width: 420px; }
.vx-lcard-act { flex: none; }
@media (max-width: 640px) { .vx-lcard { flex-direction: column; align-items: stretch; } }
.vx-contents { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: var(--ink-2); }

/* ---------- sign in ---------- */
.vx-main-bare { display: flex; align-items: center; padding: 48px 0 80px; }
.vx-auth { max-width: 420px; margin: 0 auto; padding: 34px 34px 28px; }
.vx-auth h1 { margin: 0 0 6px; font-size: 1.6rem; letter-spacing: -.02em; }
.vx-auth .vx-lede { margin: 0 0 24px; font-size: .95rem; }
.vx-auth .vx-btn-primary { width: 100%; padding: .85em 1.2em; }
.vx-auth-foot { margin-top: 18px; text-align: center; font-size: .88rem; color: var(--muted); }

/* ---------- footer ---------- */
.vx-foot { border-top: 1px solid var(--line); padding: 20px 0; color: var(--muted); font-size: .85rem; background: #fff; }
.vx-foot .vx-wrap { display: flex; justify-content: space-between; }

@media (max-width: 860px) {
  .vx-orgmark span { display: none; }
  .vx-nav { overflow-x: auto; }
  .vx-top-right .vx-btn { display: none; }
}

/* Slide editor (slides.php) */
.vx-ed-sections { display:flex; gap:8px; flex-wrap:wrap; margin:0 0 18px; }
.vx-ed-sec { display:inline-flex; gap:8px; align-items:center; padding:8px 14px; border:1px solid var(--vx-line, #E5E7EB);
  border-radius:999px; background:#fff; color:#39424F; text-decoration:none; font-size:14px; font-weight:500; max-width:360px; }
.vx-ed-sec span { display:inline-flex; width:22px; height:22px; border-radius:999px; background:#EEF4FF; color:#3B82F6;
  align-items:center; justify-content:center; font-size:12px; font-weight:700; flex:0 0 auto; }
.vx-ed-sec.is-active { border-color:#3B82F6; color:#1E2633; box-shadow:0 0 0 3px rgba(59,130,246,.12); }
.vx-ed { display:grid; grid-template-columns:minmax(0,1fr) 400px; gap:22px; align-items:start; }
.vx-ed aside { position:sticky; top:84px; max-height:calc(100vh - 100px); overflow:auto; }
@media (max-width: 1000px) { .vx-ed { grid-template-columns:1fr; } .vx-ed aside { position:static; max-height:none; } }
.vx-ed-block { border:1px solid #E5E7EB; border-radius:12px; padding:12px 14px 14px; margin:0 0 12px; background:#fff; }
.vx-ed-block[data-type=heading] { background:#F9FAFB; }
.vx-ed-block[data-type=steps], .vx-ed-block[data-type=compare], .vx-ed-block[data-type=stat], .vx-ed-block[data-type=image] { border-color:#BFDBFE; }
.vx-ed-head { display:flex; justify-content:space-between; align-items:center; margin:0 0 8px; }
.vx-ed-type { font-size:12px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:#6B7280; }
.vx-ed-tools { display:flex; gap:4px; }
.vx-ed-tools .vx-btn { padding:4px 10px; min-height:0; }
.vx-ed-block .vx-input + .vx-input, .vx-ed-block .vx-row2 .vx-input + textarea { margin-top:8px; }
.vx-ed-img { display:grid; gap:10px; }
.vx-ed-img img { max-height:180px; max-width:100%; object-fit:contain; border-radius:8px; border:1px solid #E5E7EB; justify-self:start; }
.vx-ed-add { display:flex; gap:6px; flex-wrap:wrap; align-items:center; margin:4px 0 18px; }
.vx-ed-save { border-top:1px solid #E5E7EB; padding-top:16px; }
.vx-ed-ptitle { font-weight:600; margin:0 0 10px; }
/* The preview is the learner's plate at its real size (1120 x 544, deck type sizes), scaled down as a
   whole by the editor script, so wrapping and fit match the deck exactly instead of approximately. */
.vx-ed-frame { position:relative; width:100%; aspect-ratio:1120/544; overflow:hidden; margin:0 0 12px;
  border:1px solid #E5E7EB; border-radius:6px; background:#fff; }
.vx-ed-slide { position:absolute; left:0; top:0; width:1120px; height:544px; transform-origin:0 0;
  padding:3rem 3.25rem 4.25rem; color:#39424F; overflow:hidden; }
.vx-ed-slide::before { content:''; position:absolute; left:0; top:0; bottom:0; width:6px; background:#3B82F6; }
.vx-ed-kicker { display:flex; justify-content:space-between; font-size:.75rem; font-weight:700; letter-spacing:.14em;
  text-transform:uppercase; color:#3B82F6; margin:0 0 1rem; }
.vx-ed-kicker span { color:#9CA3AF; letter-spacing:0; }
.vx-ed-slide h3 { font-size:1.75rem; line-height:1.15; letter-spacing:-.01em; margin:0 0 1.1rem; color:#1E2633;
  max-width:24ch; font-weight:700; }
.vx-ed-slide p { font-size:1.06rem; line-height:1.62; margin:0 0 .85rem; }
.vx-ed-slide ul { margin:0 0 .85rem; padding-left:1.35rem; }
.vx-ed-slide li { font-size:1.06rem; line-height:1.55; margin-bottom:.55rem; }
.vx-ed-slide .alert { margin:1rem 0; padding:.85rem 1.1rem; font-size:1rem; line-height:1.55;
  border-left:4px solid #3B82F6; background:#EEF4FF; border-radius:2px; color:#1E2633; }

.vx-fulltext { margin-top:6px; border-top:1px solid #E5E7EB; padding-top:10px; }
.vx-fulltext summary { cursor:pointer; color:#3B82F6; font-weight:600; font-size:14px; margin-bottom:8px; }
.vx-ed-tabs { display:flex; gap:6px; margin:0 0 14px; }
.vx-ed-tab { padding:7px 14px; border-radius:999px; border:1px solid #E5E7EB; background:#fff; color:#39424F; text-decoration:none; font-weight:600; font-size:14px; }
.vx-ed-tab.is-active { background:#1E2633; color:#fff; border-color:#1E2633; }
.vx-ed-slideform { border:1px solid #BFDBFE; border-radius:12px; padding:12px 14px 14px; margin:0 0 12px; background:#fff; }
.vx-ed-slideform .vx-field { margin-bottom:10px; }
