:root {
  --brand: #1f5fbf;
  --ink: #1d2433;
  --muted: #5b6475;
  --line: #dfe3ea;
  --bg: #f5f7fa;
  --card: #ffffff;
  --ok: #1d7a46;
  --warn: #9a6200;
  --bad: #b3261e;
  --radius: 10px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.5; font-size: 15px; background: var(--bg); }
a { color: var(--brand); }
h1 { font-size: 1.6rem; margin: 0.2em 0 0.5em; }
h2 { font-size: 1.15rem; margin: 0 0 0.6em; }
h3 { font-size: 1rem; margin: 1.2em 0 0.5em; }
code { background: #eef1f5; padding: 1px 5px; border-radius: 4px; font-size: 0.9em; }
code.warn { background: #fff1d6; }
small, .muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 0.87rem; font-weight: normal; display: block; margin: 2px 0 4px; }
.warn { color: var(--warn); }
.error { color: var(--bad); }
.ok { color: var(--ok); }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.mono { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 13px; }

.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); text-decoration: none; font-size: 1.1rem; }
.logo img { max-height: 34px; max-width: 140px; }
.logo small { font-weight: 500; }
.impersonation { background: #fff1d6; padding: 8px 24px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.page { max-width: 1180px; margin: 0 auto; padding: 24px; }
.foot { text-align: center; color: var(--muted); font-size: 0.8rem; padding: 24px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; }
.narrow { max-width: 420px; margin: 40px auto; }
.narrowish { max-width: 680px; }
.pagehead { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; }
.grid2 > .card { margin-bottom: 0; }
.grid2 + .card, .grid2 + section { margin-top: 20px; }
.span2 { grid-column: span 2; }
.row { display: flex; gap: 8px; align-items: flex-end; }
.row.wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack.tight { gap: 4px; }
.inline { display: inline; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }

label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 0.92rem; }
label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; }
input, select, textarea { font: inherit; padding: 8px 10px; border: 1px solid #c8ced8; border-radius: 7px; background: #fff; color: var(--ink); min-width: 0; width: 100%; }
label.check input, input[type="radio"], input[type="checkbox"] { width: auto; }
input[type="color"] { padding: 2px; height: 38px; width: 70px; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
textarea { resize: vertical; }
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin: 0; }
fieldset.plain { border: 0; padding: 0; }
fieldset.plain:disabled { opacity: 0.85; }
legend { font-weight: 600; padding: 0 6px; }
.w5 { width: 80px; } .w6 { width: 96px; } .w10 { width: 160px; } .w12 { width: 200px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 600; padding: 8px 14px; border-radius: 7px; border: 1px solid var(--brand); color: var(--brand); background: #fff; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { background: color-mix(in srgb, var(--brand) 8%, white); }
.btn.primary { background: var(--brand); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { border-color: var(--line); color: var(--ink); }
.btn.light { background: #fff; border-color: #ccc; color: var(--ink); }
.btn.danger { border-color: var(--bad); color: #fff; background: var(--bad); }
.btn.small { padding: 4px 10px; font-size: 0.85rem; }
.btn.big { padding: 12px 26px; font-size: 1.05rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.linkbtn { background: none; border: 0; color: var(--brand); cursor: pointer; padding: 0; font: inherit; font-size: 0.85rem; text-decoration: underline; }
.actions { white-space: nowrap; text-align: right; }
.actions > * { margin-left: 4px; }

.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; border: 1px solid; word-break: break-word; }
.flash.ok { background: #e7f5ec; border-color: #b6e0c5; color: #14532d; }
.flash.error { background: #fdecea; border-color: #f3c0bb; color: #7f1d1d; }
.flash.info { background: #eaf1fd; border-color: #c2d5f5; color: #1e3a8a; }

table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; color: var(--muted); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.02em; }
td.num, th.num { text-align: right; }
td.neg { color: var(--bad); } td.pos { color: var(--ok); }
.tablewrap { overflow-x: auto; }
table.edit td { padding: 4px; border-bottom: 0; }
table.edit textarea { min-height: 38px; }
table.compact { width: auto; }
tr.total td { font-weight: 700; border-top: 2px solid var(--line); }
table.heat td.num[style] { background: color-mix(in srgb, var(--brand) calc(var(--v) * 0.55%), white); }

.pill { display: inline-block; font-size: 0.75rem; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: #eef1f5; color: var(--muted); text-transform: capitalize; }
.pill.active, .pill.published, .pill.submitted { background: #e7f5ec; color: var(--ok); }
.pill.draft, .pill.in_progress { background: #eaf1fd; color: #1e40af; }
.pill.in_review { background: #fff1d6; color: var(--warn); }
.pill.suspended, .pill.disabled, .pill.retired, .pill.closed { background: #fdecea; color: var(--bad); }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.kpi b { display: block; font-size: 1.7rem; line-height: 1.1; }
.kpi span { color: var(--muted); font-size: 0.85rem; }
.kpi.warnbox { border-color: #f0c36d; background: #fffaf0; }
.hbar { display: grid; grid-template-columns: 180px 1fr 50px; gap: 10px; align-items: center; margin: 6px 0; }
.track { height: 10px; background: #e6e9ef; border-radius: 99px; overflow: hidden; }
.fill { height: 100%; background: var(--brand); border-radius: 99px; }
.progress { height: 6px; background: #e6e9ef; border-radius: 99px; overflow: hidden; width: 140px; }
.progress div { height: 100%; background: var(--brand); }
.chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { border: 1px solid var(--line); border-radius: 99px; padding: 4px 12px; }
.filter { margin-bottom: 14px; }
.filter input { width: 280px; }
.filter select, .filter label { width: auto; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.tabs a { padding: 8px 14px; text-decoration: none; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs a.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.builder { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; align-items: start; }
.builder-side { position: sticky; top: 16px; }
.counts { list-style: none; padding: 0; margin: 0 0 10px; }
.problems { padding-left: 18px; font-size: 0.85rem; max-height: 380px; overflow: auto; }
.section-edit { margin-bottom: 4px; }
.choices { display: grid; gap: 10px; }
.choice { flex-direction: row; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 8px; padding: 12px; font-weight: normal; }
.choice input { margin-top: 4px; }
.choice select { width: auto; padding: 2px 6px; }
.checklist { max-height: 280px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin-top: 8px; display: grid; gap: 4px; }
details.danger { margin-top: 20px; border: 1px solid #f3c0bb; border-radius: 8px; padding: 10px 14px; }
details.danger summary { cursor: pointer; color: var(--bad); font-weight: 600; }
details.mail { border-bottom: 1px solid var(--line); padding: 8px 0; }
.mailbody { padding: 10px; background: #fafbfc; border-radius: 6px; margin-top: 6px; }
.auth h1 { font-size: 1.3rem; }
.authlogo { display: block; max-height: 50px; margin: 0 auto 10px; }

.report-head { display: flex; gap: 16px; align-items: center; border-bottom: 3px solid var(--brand); padding-bottom: 12px; margin-bottom: 14px; }
.report-logo { max-height: 48px; max-width: 150px; }
.report h3 { color: var(--brand); }
.score { margin: 14px 0; }
.score.child { margin-left: 22px; }
.score-top { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.score-name { font-weight: 600; }
.score.child .score-name { font-weight: 500; }
.score-val { color: var(--muted); font-size: 0.9rem; }
.narrative { margin: 6px 0 0; }
.prose { white-space: pre-line; }
.answer { border-left: 3px solid var(--line); padding-left: 10px; margin: 10px 0; }


/* ---- TalentMeter brand ---- */
.logo img.tm-logo { max-height: 30px; max-width: 150px; height: auto; width: auto; }
.logo-sep { width: 1px; height: 28px; background: var(--line); }
.logo img.org-logo { max-height: 34px; max-width: 150px; }
.org-name { font-weight: 700; color: var(--ink); font-size: 1rem; }
.brandfoot { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 26px 16px 30px; color: var(--muted); }
.brandfoot img { opacity: 0.95; }
.brandfoot small { font-size: 0.75rem; letter-spacing: 0.01em; }
.authlogo.tm { max-height: 110px; }
.signup-cta { margin-top: 18px; padding: 14px 16px; border-radius: 10px; background: linear-gradient(100deg, #eef4ff, #e6fbf8); text-align: center; font-size: 0.92rem; }
.signup-cta a { font-weight: 700; }
.pill.premium { background: linear-gradient(90deg, #fde68a, #fbbf24); color: #78350f; }
.pill.cat { background: #e8effd; color: #0b2a63; text-transform: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.inline { display: inline; }
.between { justify-content: space-between; align-items: center; }
.prewrap { white-space: pre-line; }
.small { font-size: 0.85rem; }

.orgmeta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: -6px; }
.orgmeta-logo { max-height: 32px; max-width: 120px; }

/* Audit log */
.changes { margin: 0; padding-left: 16px; font-size: 0.88rem; }
.changes li { margin: 2px 0; }
.changes .from { color: var(--bad); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--bad) 50%, transparent); }
.changes .to { color: var(--ok); font-weight: 600; }
table.audit td { vertical-align: top; }

/* Branding */
.logo-preview { display: grid; place-items: center; min-height: 96px; border: 1px dashed var(--line); border-radius: 10px; margin-bottom: 14px; padding: 12px; background: repeating-conic-gradient(#f5f7fa 0 25%, #fff 0 50%) 0 0 / 16px 16px; }
.logo-preview img { max-height: 80px; max-width: 100%; }
.rules { margin: 4px 0 0; padding-left: 18px; color: var(--muted); font-size: 0.86rem; }
.field-msg { margin: 0; font-size: 0.88rem; min-height: 1.2em; }
details summary { cursor: pointer; color: var(--brand); font-weight: 600; margin: 4px 0; }

/* Assessment Library */
.tabs-row { gap: 8px; margin: 6px 0 18px; }
.chip-link { padding: 6px 14px; border-radius: 99px; border: 1px solid var(--line); background: #fff; text-decoration: none; color: var(--ink); font-size: 0.9rem; }
.chip-link.on { background: #0b2a63; border-color: #0b2a63; color: #fff; }
.libgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.libcard { --c: #1d4ed8; position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px 18px 16px; box-shadow: 0 6px 22px rgba(15, 35, 80, 0.05); overflow: hidden; transition: transform 0.15s, box-shadow 0.15s; }
.libcard::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--c, #1d4ed8); background: linear-gradient(90deg, var(--c), color-mix(in srgb, var(--c) 40%, #0ea5a4)); }
.libcard:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(15, 35, 80, 0.1); }
.cat-psychometric { --c: #8b5cf6; } .cat-cognitive { --c: #1d4ed8; } .cat-workplace_readiness { --c: #0ea5a4; } .cat-academic { --c: #65a30d; } .cat-skills { --c: #f59e0b; } .cat-behavioural { --c: #ec4899; } .cat-other { --c: #64748b; }
.libcard header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.libcat { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--c); }
.libcard h2 { font-size: 1.12rem; margin: 0 0 6px; }
.libcard h2 a { color: var(--ink); text-decoration: none; }
.libcard p { margin: 0 0 10px; color: var(--muted); font-size: 0.9rem; }
.libfacts { list-style: none; padding: 0; margin: 4px 0 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; font-size: 0.85rem; color: var(--muted); }
.libfacts b { color: var(--ink); }
.libdims { display: flex; flex-wrap: wrap; gap: 5px; }
.libdims span { font-size: 0.75rem; background: #eef3fb; background: color-mix(in srgb, var(--c) 10%, white); color: #334155; color: color-mix(in srgb, var(--c) 80%, black); padding: 2px 8px; border-radius: 99px; }
.libcard footer { margin-top: auto; display: flex; gap: 8px; justify-content: flex-end; padding-top: 10px; }
.libhero { display: flex; justify-content: space-between; gap: 20px; align-items: flex-end; flex-wrap: wrap; padding: 26px; border-radius: 18px; margin-bottom: 20px; color: #fff; background: linear-gradient(110deg, #0b2a63, color-mix(in srgb, var(--c, #1d4ed8) 85%, #0b2a63)); }
.libhero .libcat { color: rgba(255, 255, 255, 0.8); }
.libhero h1 { margin: 4px 0 6px; font-size: 1.9rem; }
.libhero p { margin: 0; max-width: 640px; opacity: 0.9; }
.libhero-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; max-width: 260px; text-align: right; }
.libhero .btn.primary { background: #fff; color: #0b2a63; border-color: #fff; }
.dimlist { list-style: none; padding: 0; margin: 0; }
.dimlist li { padding: 8px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; }
.dimlist li.child { padding-left: 18px; }
.dimlist span { color: var(--muted); font-size: 0.88rem; }

/* Credits */
.packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; margin: 10px 0 14px; }
.pack { position: relative; border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 4px; background: #fff; }
.pack.best { border-color: #0ea5a4; box-shadow: 0 8px 24px rgba(14, 165, 164, 0.15); }
.pack-flag { position: absolute; top: -10px; right: 14px; background: #0ea5a4; color: #fff; font-size: 0.72rem; font-weight: 700; padding: 3px 10px; border-radius: 99px; }
.pack h3 { margin: 0; font-size: 1rem; }
.pack-credits b { font-size: 1.8rem; color: #0b2a63; }
.pack-price { font-size: 1.2rem; font-weight: 700; }
.pack p { font-size: 0.85rem; color: var(--muted); margin: 6px 0; }
.pack form { margin-top: auto; padding-top: 8px; }
.pack .btn { width: 100%; }
.hbars { display: grid; gap: 8px; }
.hbar-row { display: grid; grid-template-columns: 110px 1fr 70px; gap: 10px; align-items: center; font-size: 0.88rem; }
.hbar-track { display: grid; gap: 3px; }
.ubar { height: 9px; border-radius: 99px; min-width: 2px; }
.ubar.used, .sw.used { background: #1d4ed8; }
.ubar.added, .sw.added { background: #65a30d; }
.hbar-val { text-align: right; line-height: 1.1; }
.legend .sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin: 0 4px 0 10px; }
.checkout { text-align: center; margin: 30px auto; }
.checkout .row { justify-content: center; }

/* Drives */
.lock { font-size: 0.8rem; color: var(--muted); white-space: nowrap; cursor: help; }
.addmod { margin-top: 10px; }
.addmod summary { list-style: none; display: inline-flex; }
.addmod summary::-webkit-details-marker { display: none; }
.addmod[open] summary { margin-bottom: 12px; }
td.actions { white-space: nowrap; text-align: right; }
.pill.not_started, .pill.none { background: #eef1f5; color: var(--muted); }

/* Candidate home */
.me-hero { padding: 22px 24px; border-radius: 18px; margin-bottom: 20px; color: #fff; background: linear-gradient(110deg, #0b2a63, #1d4ed8 60%, #0ea5a4); }
.me-hero h1 { margin: 0 0 4px; }
.me-hero p { margin: 0; opacity: 0.9; }
.drivecard { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px; margin-bottom: 18px; box-shadow: 0 6px 22px rgba(15, 35, 80, 0.05); }
.drivecard header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.drivecard h2 { margin: 0; }
.drivecard header p { margin: 2px 0 0; }
.ring { --p: 0; width: 58px; height: 58px; border-radius: 50%; flex: none; display: grid; place-items: center; background: conic-gradient(#0ea5a4 calc(var(--p) * 1%), #e6ebf3 0); }
.ring span { width: 44px; height: 44px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-weight: 700; font-size: 0.82rem; color: #0b2a63; }
.steps { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.step { display: flex; gap: 14px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.step-dot { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: #e8effd; color: #0b2a63; }
.step.done .step-dot { background: #16a34a; color: #fff; }
.step.resume .step-dot { background: #f59e0b; color: #fff; }
.step.done { background: #f6fdf8; }
.step-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.step-act { flex: none; }

/* Start page */
.startcard { max-width: 760px; margin: 0 auto; background: #fff; border-radius: 20px; overflow: hidden; box-shadow: 0 12px 40px rgba(15, 35, 80, 0.08); border: 1px solid var(--line); }
.start-hero { padding: 28px; color: #fff; background: linear-gradient(110deg, #0b2a63, #1d4ed8 60%, #0ea5a4); }
.start-kicker { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.8; font-weight: 700; }
.start-hero h1 { margin: 4px 0 6px; font-size: 1.9rem; }
.start-hero p { margin: 0; opacity: 0.9; }
.start-facts { list-style: none; padding: 0; margin: 18px 0 0; display: flex; gap: 12px; flex-wrap: wrap; }
.start-facts li { background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.22); border-radius: 12px; padding: 8px 14px; display: flex; flex-direction: column; min-width: 86px; }
.start-facts b { font-size: 1.4rem; line-height: 1.1; }
.start-facts span { font-size: 0.78rem; opacity: 0.85; }
.start-body { padding: 24px 28px 28px; }
.note { background: #f4f7fc; border-left: 4px solid #0ea5a4; padding: 10px 14px; border-radius: 8px; }
.note p { margin: 4px 0 0; }
.tips { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.tips li { display: flex; gap: 10px; align-items: flex-start; }
.consent { background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; align-items: flex-start !important; }
.consent input { margin-top: 3px; }
.donecard { max-width: 560px; margin: 30px auto; text-align: center; background: #fff; border-radius: 20px; padding: 36px 28px; box-shadow: 0 12px 40px rgba(15, 35, 80, 0.08); }
.done-badge { width: 74px; height: 74px; margin: 0 auto 10px; border-radius: 50%; display: grid; place-items: center; font-size: 2.2rem; color: #fff; background: linear-gradient(135deg, #22c55e, #0ea5a4); box-shadow: 0 10px 24px rgba(14, 165, 164, 0.3); animation: pop-in 0.5s ease; }
@keyframes pop-in { from { transform: scale(0.4); opacity: 0; } }
.next-up { display: flex; flex-direction: column; gap: 6px; align-items: center; padding: 16px; border-radius: 14px; background: #f4f7fc; margin: 18px 0; }
.next-up small { text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 700; font-size: 0.72rem; }

/* Report */
.report-head { justify-content: space-between; border-bottom: 0; position: relative; padding-bottom: 16px; }
.report-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; border-radius: 2px; background: linear-gradient(90deg, #0b2a63, #1d4ed8 60%, #0ea5a4); }
.report-title { text-align: right; }
.report-title h2 { margin: 0; color: #0b2a63; }
.report-title small { color: var(--muted); }
.report-info { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px 16px; background: #f4f7fc; padding: 14px 16px; border-radius: 10px; margin: 0 0 16px; }
.report-info dt { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.report-info dd { margin: 2px 0 0; font-weight: 600; word-break: break-word; }
.rsum { display: grid; grid-template-columns: auto 1fr 1.3fr; gap: 20px; align-items: center; border: 1px solid var(--line); border-left: 4px solid #0ea5a4; border-radius: 12px; padding: 16px 20px; margin-bottom: 18px; }
.rsum-score { --p: 0; width: 104px; height: 104px; border-radius: 50%; display: grid; place-content: center; text-align: center; background: radial-gradient(#fff 58%, transparent 59%), conic-gradient(#0ea5a4 calc(var(--p) * 1%), #e3e8f2 0); }
.rsum-score b { font-size: 1.9rem; color: #0b2a63; line-height: 1; }
.rsum-score small { font-size: 0.7rem; color: var(--muted); }
.rsum-main strong { display: block; font-size: 1.3rem; color: #0b2a63; }
.rsum-main p { margin: 4px 0 0; color: var(--muted); }
.kicker { display: block; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #1d4ed8; }
.kicker.good { color: #15803d; } .kicker.focus { color: #c2410c; }
.rsum-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rsum-lists ul { list-style: none; padding: 0; margin: 4px 0 0; }
.rsum-lists li { display: flex; align-items: center; gap: 6px; font-size: 0.9rem; padding: 2px 0; }
.rsum-lists li i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.rsum-lists li b { margin-left: auto; }
.rcharts { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; margin-bottom: 10px; }
.rcharts.one { grid-template-columns: 1fr; }
.rcharts figure { margin: 0; }
.rcharts figcaption { font-weight: 700; color: #0b2a63; margin-bottom: 6px; }
.chart { width: 100%; height: auto; }
.chart .g { stroke: #d6dbe5; stroke-dasharray: 3 3; }
.chart .t { font-size: 10px; fill: #9aa3b5; }
.chart .l { font-size: 12px; fill: #1d2433; }
.chart .v { font-size: 12px; font-weight: 700; fill: #0b2a63; }
.chart .tr { fill: #eef1f6; }
.chart .rg { fill: none; stroke: #dfe4ee; }
.chart .shape { fill: rgba(29, 78, 216, 0.2); stroke: #1d4ed8; stroke-width: 2; }
.areas { display: grid; gap: 12px; }
.area { border: 1px solid var(--line); border-left: 5px solid var(--c); border-radius: 10px; padding: 12px 16px; background: #fbfcfe; }
.area-top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.area-top > b { color: #0b2a63; font-size: 1.02rem; }
.area-top span b { color: var(--c); font-size: 1.05rem; }
.area-top em { font-style: normal; font-size: 0.75rem; font-weight: 700; background: var(--c); color: #fff; padding: 2px 8px; border-radius: 99px; margin-left: 4px; }
.area p { margin: 6px 0 0; }
.area-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 8px; }
.area-lists ul { margin: 4px 0 0; padding-left: 18px; font-size: 0.9rem; }
.review-table tr.right .res { background: #dcfce7; color: #15803d; }
.review-table tr.wrong .res { background: #fee2e2; color: #b91c1c; }
.review-table tr.skipped .res { background: #eef1f5; color: var(--muted); }
.review-table tr.wrong td:nth-child(4) { color: #b91c1c; }
.res { display: inline-block; padding: 2px 10px; border-radius: 99px; font-weight: 700; font-size: 0.78rem; }
.closing { background: #ecfdf5; color: #065f46; padding: 12px 14px; border-radius: 10px; }
.report-foot { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font-size: 0.78rem; border-top: 1px solid var(--line); margin-top: 18px; padding-top: 12px; }
.plain { padding-left: 18px; }

@media (max-width: 760px) {
  .rsum { grid-template-columns: 1fr; justify-items: start; }
  .rcharts, .area-lists, .rsum-lists { grid-template-columns: 1fr; }
  .report-head { flex-direction: column; align-items: flex-start; }
  .report-title { text-align: left; }
  .libhero-side { align-items: flex-start; text-align: left; }
  .hbar-row { grid-template-columns: 80px 1fr 60px; }
}

@media (max-width: 860px) {
  .grid2, .grid3, .builder { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
  .builder-side { position: static; }
  .page { padding: 16px; }
  .hbar { grid-template-columns: 110px 1fr 40px; }
  .filter input { width: 100%; }
}
/* Candidate home (v4) */
.me-hero2 { position: relative; overflow: hidden; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; padding: 28px 30px; border-radius: 22px; margin-bottom: 26px; color: #fff; background: radial-gradient(circle at 85% -20%, rgba(14, 165, 164, 0.85), transparent 55%), linear-gradient(115deg, #0b2a63, #1d4ed8 70%); box-shadow: 0 18px 40px -22px rgba(11, 42, 99, 0.7); }
.me-hero2::after { content: ""; position: absolute; right: -60px; bottom: -90px; width: 260px; height: 260px; border-radius: 50%; border: 40px solid rgba(255, 255, 255, 0.07); }
.me-hero-text { max-width: 600px; position: relative; z-index: 1; }
.me-kicker { color: rgba(255, 255, 255, 0.75); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.72rem; }
.me-hero2 h1 { margin: 4px 0 6px; font-size: 2rem; }
.me-hero2 p { margin: 0; opacity: 0.92; }
.me-stats { list-style: none; margin: 0; padding: 0; display: flex; gap: 10px; position: relative; z-index: 1; }
.me-stats li { min-width: 92px; padding: 10px 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.13); border: 1px solid rgba(255, 255, 255, 0.22); backdrop-filter: blur(4px); display: flex; flex-direction: column; }
.me-stats b { font-size: 1.6rem; line-height: 1.1; }
.me-stats span { font-size: 0.78rem; opacity: 0.85; }
.me-section { display: flex; align-items: center; gap: 8px; font-size: 1.15rem; margin: 6px 0 14px; color: #0b2a63; }
.me-section .count { font-size: 0.75rem; font-weight: 700; padding: 1px 9px; border-radius: 99px; background: #e8effd; color: #1d4ed8; }
.acards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; margin-bottom: 30px; }
.acard { position: relative; display: flex; flex-direction: column; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 20px 20px 18px; box-shadow: 0 8px 24px -14px rgba(15, 35, 80, 0.25); transition: transform 0.15s, box-shadow 0.15s; overflow: hidden; }
.acard::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: var(--c, #1d4ed8); background: linear-gradient(90deg, var(--c, #1d4ed8), color-mix(in srgb, var(--c, #1d4ed8) 40%, #0ea5a4)); }
.acard:hover { transform: translateY(-2px); box-shadow: 0 16px 32px -16px rgba(15, 35, 80, 0.35); }
.acard.is-resume { border-color: #f6c56b; box-shadow: 0 10px 28px -14px rgba(245, 158, 11, 0.55); }
.acard.is-soon { opacity: 0.85; }
.acard.is-done { background: linear-gradient(180deg, #fbfdfc, #fff); }
.acard-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.acard h3 { margin: 4px 0 0; font-size: 1.2rem; color: #0b1f4d; }
.acard-drive { margin: 0; font-size: 0.85rem; color: var(--muted); font-weight: 600; }
.acard-desc { margin: 2px 0 0; font-size: 0.9rem; color: #3a4a6b; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.acard-facts { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.acard-facts li { font-size: 0.8rem; padding: 4px 10px; border-radius: 99px; background: #f1f4f9; color: #334155; }
.acard-facts li.soon { background: #fff4dc; color: #92400e; }
.acard-facts li.urgent { background: #fde8e8; color: #b91c1c; font-weight: 700; }
.acard-progress { margin-top: 6px; }
.acard-progress .track { height: 8px; }
.acard-progress .fill { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.acard-progress small { font-size: 0.78rem; }
.acard-note { font-size: 0.85rem; margin-top: 4px; }
.acard-note summary { font-weight: 600; font-size: 0.85rem; }
.acard-note p { margin: 4px 0 0; color: #3a4a6b; }
.acard footer { margin-top: auto; padding-top: 12px; }
.acard-wait { display: block; font-size: 0.85rem; color: var(--muted); background: #f6f8fb; border-radius: 10px; padding: 9px 12px; }
.btn.block { width: 100%; }
span.btn[aria-disabled] { border-color: var(--line); color: var(--muted); cursor: default; background: #f6f8fb; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 0.72rem; font-weight: 700; padding: 3px 10px; border-radius: 99px; white-space: nowrap; }
.badge.blue { background: #e8effd; color: #1d4ed8; }
.badge.amber { background: #fff1d6; color: #b45309; }
.badge.green { background: #dcfce7; color: #15803d; }
.badge.gray { background: #eef1f5; color: var(--muted); }
.badge.premium { background: linear-gradient(90deg, #fde68a, #f59e0b); color: #5b2c00; box-shadow: 0 2px 8px -2px rgba(245, 158, 11, 0.6); }
.me-empty { text-align: center; padding: 40px 20px; }
.me-empty-icon { font-size: 2.4rem; }
.me-closed { margin: -10px 0 26px; }
.me-closed ul { margin: 8px 0 0; padding-left: 18px; font-size: 0.9rem; }
.me-help { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px 20px; border-radius: 16px; background: #fff; border: 1px dashed #c9d3e3; }
.me-help div { display: flex; flex-direction: column; }

/* Account pages */
.acct-hero { display: flex; align-items: center; gap: 16px; margin: 4px 0 20px; }
.acct-hero h1 { margin: 0; }
.acct-hero p { margin: 0; color: var(--muted); }
.avatar.big { width: 60px; height: 60px; font-size: 1.3rem; box-shadow: 0 8px 20px -8px rgba(29, 78, 216, 0.6); }
.facts { margin: 0; display: grid; gap: 10px; }
.facts dt { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; word-break: break-word; }
.chooser { margin: 30px auto; text-align: center; }
.chooser .authlogo { max-height: 56px; }
.acct-list { display: grid; gap: 10px; margin: 18px 0; text-align: left; }
.acct { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 14px 16px; font: inherit; color: var(--ink); background: #fff; border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s; }
.acct:hover:not(:disabled) { border-color: var(--brand); transform: translateY(-1px); box-shadow: 0 10px 24px -14px rgba(15, 35, 80, 0.4); }
.acct:disabled { cursor: default; background: #f6f8fb; }
.acct-logo { flex: none; width: 54px; height: 54px; border-radius: 12px; display: grid; place-items: center; background: #eef3fb; color: #0b2a63; font-weight: 800; font-size: 1.3rem; overflow: hidden; }
.acct-logo img { max-width: 48px; max-height: 48px; object-fit: contain; }
.acct-body { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.acct-body b { font-size: 1.02rem; }
.acct-body small { color: var(--muted); }
.acct-go { font-size: 1.2rem; color: var(--brand); font-weight: 700; }
.acct-list form { margin: 0; }
.acct-locked > summary { list-style: none; }
.acct-locked > summary::-webkit-details-marker { display: none; }
.acct-locked[open] > summary { border-color: var(--brand); border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.acct-unlock { border: 1.5px solid var(--brand); border-top: 0; border-radius: 0 0 14px 14px; }
.acct-pass { display: flex; gap: 8px; align-items: flex-end; padding: 12px 16px 4px; }
.acct-pass label { flex: 1; }
.acct-pass-help { margin: 0; padding: 4px 16px 12px; }
.acct-locked:not(:has(.acct-pass)) .acct-pass-help { padding-top: 12px; }
.acct.current .acct-go { font-size: 0.75rem; color: var(--muted); }
@media (max-width: 600px) {
  .me-hero2 { padding: 22px 20px; }
  .me-stats { width: 100%; }
  .me-stats li { flex: 1; min-width: 0; }
}

/* Assessment Library (v4) */
.lhero { position: relative; overflow: hidden; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; padding: 30px; border-radius: 22px; margin-bottom: 16px; color: #fff; background: radial-gradient(circle at 90% 0%, rgba(132, 204, 22, 0.45), transparent 45%), radial-gradient(circle at 0% 100%, rgba(14, 165, 164, 0.6), transparent 50%), linear-gradient(115deg, #0b2a63, #1d4ed8); box-shadow: 0 18px 40px -22px rgba(11, 42, 99, 0.7); }
.lhero-text { max-width: 640px; }
.lhero-kicker { color: rgba(255, 255, 255, 0.75); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.72rem; }
.lhero h1 { margin: 6px 0 8px; font-size: 2.1rem; letter-spacing: -0.01em; }
.lhero p { margin: 0; opacity: 0.92; }
.lhero-stats { list-style: none; padding: 0; margin: 16px 0 0; display: flex; gap: 8px; flex-wrap: wrap; }
.lhero-stats li { font-size: 0.85rem; padding: 5px 12px; border-radius: 99px; background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.22); }
.lhero-search { position: relative; flex: 0 1 340px; display: block; }
.lhero-search input { width: 100%; padding: 13px 16px 13px 42px; border: 0; border-radius: 14px; font-size: 1rem; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.45); }
.lhero-search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 0.95rem; opacity: 0.6; }
.lchips { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 22px; }
.lchip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 99px; border: 1px solid var(--line); background: #fff; text-decoration: none; color: var(--ink); font-size: 0.9rem; font-weight: 550; transition: border-color 0.15s, background 0.15s; }
.lchip span { font-size: 0.72rem; font-weight: 700; padding: 0 7px; border-radius: 99px; background: #eef1f5; color: var(--muted); }
.lchip:hover { border-color: #0b2a63; }
.lchip.on { background: #0b2a63; border-color: #0b2a63; color: #fff; }
.lchip.on span { background: rgba(255, 255, 255, 0.2); color: #fff; }
.libgrid2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.lcard { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 22px; border-radius: 20px; background: #fff; border: 1px solid var(--line); box-shadow: 0 8px 26px -16px rgba(15, 35, 80, 0.3); transition: transform 0.18s, box-shadow 0.18s; overflow: hidden; }
.lcard::after { content: ""; position: absolute; right: -50px; top: -50px; width: 140px; height: 140px; border-radius: 50%; background: rgba(29, 78, 216, 0.07); background: color-mix(in srgb, var(--c, #1d4ed8) 9%, transparent); pointer-events: none; }
.lcard:hover { transform: translateY(-3px); box-shadow: 0 20px 36px -18px rgba(15, 35, 80, 0.4); }
.lcard.premium { border: 2px solid transparent; background: linear-gradient(#fffdf6, #fff) padding-box, linear-gradient(135deg, #fbbf24, #f59e0b 40%, #fde68a 70%, #d97706) border-box; box-shadow: 0 12px 32px -16px rgba(217, 119, 6, 0.55); }
.lcard.premium::after { background: radial-gradient(rgba(251, 191, 36, 0.25), transparent 70%); }
.lcard-ribbon { position: absolute; top: 16px; right: -34px; z-index: 2; transform: rotate(45deg); width: 140px; text-align: center; padding: 4px 0; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #5b2c00; background: linear-gradient(90deg, #fde68a, #f59e0b); box-shadow: 0 4px 10px -4px rgba(180, 83, 9, 0.7); }
.lcard-top { display: flex; align-items: center; gap: 10px; position: relative; z-index: 1; }
.lcard-icon { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; font-size: 1.35rem; background: #eef3fb; background: color-mix(in srgb, var(--c, #1d4ed8) 13%, white); box-shadow: inset 0 0 0 1px rgba(29, 78, 216, 0.15); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c, #1d4ed8) 18%, transparent); }
.lcard-cat { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--c, #1d4ed8); }
.lcard h2 { margin: 6px 0 0; font-size: 1.22rem; position: relative; z-index: 1; }
.lcard h2 a { color: #0b1f4d; text-decoration: none; }
.lcard h2 a::before { content: ""; position: absolute; inset: 0; } /* the whole card opens the details */
.lcard-text { margin: 0; color: #3a4a6b; font-size: 0.92rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.lcard-facts { list-style: none; padding: 0; margin: 6px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.lcard-facts li { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 12px; background: #f5f7fb; }
.lcard-facts b { font-size: 1.15rem; color: #0b2a63; line-height: 1.1; }
.lcard-facts span { font-size: 0.72rem; color: var(--muted); }
.lcard.premium .lcard-facts li { background: #fff7e3; }
.lcard-dims { display: flex; flex-wrap: wrap; gap: 5px; margin: 2px 0 0; }
.lcard-dims span { font-size: 0.74rem; padding: 2px 9px; border-radius: 99px; background: #eef3fb; background: color-mix(in srgb, var(--c, #1d4ed8) 9%, white); color: #334155; color: color-mix(in srgb, var(--c, #1d4ed8) 75%, black); }
.lcard-dims span.more { background: #eef1f5; color: var(--muted); }
.lcard-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid #eef1f5; display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; position: relative; z-index: 1; }
.lcard-status { font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.lcard-status.ok { color: #15803d; }
.lcard-status.gold { color: #b45309; }
.lcard-actions { display: flex; gap: 6px; }
.lib-nomatch { text-align: center; padding: 30px; }
@media (max-width: 600px) {
  .lhero { padding: 22px 20px; }
  .lhero h1 { font-size: 1.6rem; }
  .lhero-search { flex: 1 1 100%; }
}

/* Public pages */
.pub-body { background: #f4f7fc; }
.pubbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 16px; padding: 10px 24px; background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.pubbar .logo img { max-height: 32px; }
.pubnav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.pubnav a:not(.btn) { padding: 8px 12px; border-radius: 9px; color: var(--ink); text-decoration: none; font-weight: 550; }
.pubnav a:not(.btn):hover, .pubnav a.active { background: #eef3fb; color: #0b2a63; }
.pub-cta { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 30px; padding: 24px 28px; border-radius: 20px; background: linear-gradient(110deg, #ecfdf5, #eef4ff); border: 1px solid #d6e4f5; }
.pub-cta h2 { margin: 0 0 4px; color: #0b2a63; }
.pub-cta p { margin: 0; color: var(--muted); }
.pubfoot-links { display: flex; gap: 14px; justify-content: center; font-size: 0.82rem; margin-top: -18px; padding-bottom: 26px; }
.pubfoot-links a { color: var(--muted); }
.terms-page { max-width: 820px; margin: 0 auto; }
.terms-text h3 { color: #0b2a63; margin-top: 1.4em; }
.terms-text ul { padding-left: 20px; }
.terms-text li { margin: 4px 0; }
.terms-meta { color: var(--muted); font-size: 0.88rem; }
@media (max-width: 600px) {
  .pubbar { padding: 8px 12px; gap: 8px; }
  .pubbar .logo img { max-height: 26px; }
  .pubnav a:not(.btn) { padding: 6px 8px; font-size: 0.9rem; }
  .pubnav .btn { padding: 6px 10px; font-size: 0.85rem; }
}

/* Report (v4) */
.rpt-toolbar { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.rpt { background: #fff; border: 1px solid var(--line); border-radius: 24px; overflow: hidden; margin-bottom: 24px; box-shadow: 0 18px 44px -26px rgba(15, 35, 80, 0.4); padding: 0 0 8px; }
.rpt > *:not(.rpt-hero) { margin-left: 28px; margin-right: 28px; }
.rpt-hero { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 30px 32px; color: #fff; background: radial-gradient(circle at 100% 0%, rgba(132, 204, 22, 0.35), transparent 40%), radial-gradient(circle at 70% 120%, rgba(14, 165, 164, 0.7), transparent 55%), linear-gradient(115deg, #0b2a63, #1d4ed8); }
.rpt-hero-main { min-width: 0; }
.rpt-brand { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.95); margin-bottom: 14px; }
.rpt-brand img { max-height: 36px; max-width: 160px; display: block; }
.rpt-brand b { color: #0b2a63; }
.rpt-kicker { display: block; color: rgba(255, 255, 255, 0.75); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.72rem; }
.rpt-hero h2 { margin: 4px 0 6px; font-size: 1.9rem; color: #fff; letter-spacing: -0.01em; }
.rpt-for { margin: 0; opacity: 0.9; }
.rpt-hero small { color: inherit; }
.rpt-gauge { --p: 0; flex: none; position: relative; width: 150px; height: 150px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#a3e635, #2dd4bf calc(var(--p) * 1%), rgba(255, 255, 255, 0.16) 0); box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.45); }
.rpt-gauge > div { width: 118px; height: 118px; border-radius: 50%; display: grid; place-content: center; text-align: center; background: #0f2f73; }
.rpt-gauge b { font-size: 2.6rem; line-height: 1; }
.rpt-gauge small { font-size: 0.72rem; color: rgba(255, 255, 255, 0.8); }
.rpt-band { position: absolute; bottom: -12px; left: 50%; transform: translateX(-50%); white-space: nowrap; padding: 4px 12px; border-radius: 99px; background: #fff; color: #0b2a63; font-weight: 800; font-size: 0.78rem; box-shadow: 0 6px 14px -6px rgba(0, 0, 0, 0.4); }
.rpt-info { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 20px; margin-bottom: 0; padding: 0 0 16px; border-bottom: 1px solid #eef1f5; }
.rpt-info div { min-width: 0; }
.rpt-info dt { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.rpt-info dd { margin: 1px 0 0; font-weight: 600; font-size: 0.92rem; word-break: break-word; }
.rpt-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 18px; }
.rpt-kpi { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 14px 16px; border-radius: 16px; background: linear-gradient(180deg, #f7f9fd, #f1f5fb); border: 1px solid #e5ebf5; }
.rpt-kpi span { grid-row: span 2; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: #fff; box-shadow: 0 4px 10px -6px rgba(15, 35, 80, 0.35); }
.rpt-kpi b { font-size: 1.3rem; color: #0b2a63; line-height: 1.1; }
.rpt-kpi small { color: var(--muted); font-size: 0.78rem; }
.rpt-intro { margin-top: 18px; color: #3a4a6b; font-size: 1rem; }
.rpt-panel { background: #fff; border: 1px solid #e5ebf5; border-radius: 18px; padding: 16px 18px; }
.rpt-panel.flush { padding: 0; overflow: auto; }
.rpt-hilo { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.rpt-panel h3 { margin: 0 0 10px; font-size: 0.95rem; }
.rpt-panel.good { background: linear-gradient(180deg, #f0fdf4, #fff 70%); border-color: #c9f0d6; }
.rpt-panel.good h3 { color: #15803d; }
.rpt-panel.focus { background: linear-gradient(180deg, #fff7ed, #fff 70%); border-color: #fbdcbc; }
.rpt-panel.focus h3 { color: #c2410c; }
.rpt-mini { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; margin: 8px 0; font-size: 0.92rem; }
.rpt-mini b { color: #0b2a63; }
.rpt-mini .rpt-bar { grid-column: span 2; }
.rpt-bar { height: 7px; border-radius: 99px; background: #edf1f7; overflow: hidden; }
.rpt-bar i { display: block; height: 100%; border-radius: 99px; background: var(--c, #1d4ed8); }
.rpt-bar.big { height: 10px; margin: 10px 0 6px; }
.rpt-bar.big i { background: var(--c, #1d4ed8); background: linear-gradient(90deg, color-mix(in srgb, var(--c) 70%, white), var(--c)); }
.rpt-charts { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; margin-top: 14px; align-items: start; }
.rpt-charts.one { grid-template-columns: 1fr; }
.rpt-charts figure { margin: 0; }
.rpt-charts figcaption { font-weight: 700; color: #0b2a63; margin-bottom: 6px; }
.rpt-h { margin-top: 26px; margin-bottom: 12px; color: #0b2a63; font-size: 1.1rem; }
.rpt-indices { display: flex; flex-wrap: wrap; gap: 10px; }
.rpt-indices div { display: flex; flex-direction: column; padding: 12px 16px; border-radius: 14px; background: #f5f7fb; min-width: 150px; }
.rpt-indices b { font-size: 1.4rem; color: #0b2a63; }
.rpt-indices span { font-size: 0.85rem; color: var(--muted); }
.rpt-indices em { font-style: normal; font-size: 0.75rem; font-weight: 700; color: #1d4ed8; }
.rpt-areas { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 14px; }
.rpt-area { position: relative; padding: 18px 20px; border-radius: 18px; border: 1px solid #e5ebf5; background: #fff; overflow: hidden; }
.rpt-area::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--c); }
.rpt-area header { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.rpt-area header > div:first-child { display: flex; flex-direction: column; }
.rpt-area header b { color: #0b1f4d; font-size: 1.05rem; }
.rpt-area header small { color: var(--muted); }
.rpt-area-score { flex: none; text-align: right; }
.rpt-area-score b { font-size: 1.7rem !important; color: var(--c) !important; line-height: 1; }
.rpt-area-score small { color: var(--muted); }
.rpt-tags { display: flex; gap: 8px; align-items: center; margin: 0; }
.rpt-tags em { font-style: normal; font-size: 0.74rem; font-weight: 800; color: #fff; background: var(--c); padding: 2px 10px; border-radius: 99px; }
.rpt-tags span { font-size: 0.78rem; color: var(--muted); }
.rpt-area p { margin: 8px 0 0; color: #334155; }
.rpt-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed #e2e8f0; }
.rpt-lists ul { list-style: none; margin: 6px 0 0; padding: 0; font-size: 0.9rem; display: grid; gap: 5px; }
.rpt-lists li { position: relative; padding-left: 22px; }
.rpt-lists ul.ticks li::before { content: "✓"; position: absolute; left: 0; top: 1px; width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; font-size: 0.65rem; font-weight: 800; background: #dcfce7; color: #15803d; }
.rpt-lists ul.arrows li::before { content: "→"; position: absolute; left: 0; top: 0; font-weight: 800; color: #1d4ed8; }
.rpt .closing { margin-top: 18px; }
.rpt-disclaimer { margin-top: 26px; padding: 16px 20px; border-radius: 16px; background: #f8fafc; border: 1px solid #e2e8f0; color: #475569; font-size: 0.8rem; line-height: 1.55; }
.rpt-disclaimer h4 { margin: 0 0 6px; font-size: 0.88rem; color: #0b2a63; }
.rpt-disclaimer p { margin: 6px 0 0; }
.rpt .report-foot { margin-bottom: 10px; }
@media (max-width: 760px) {
  .rpt > *:not(.rpt-hero) { margin-left: 16px; margin-right: 16px; }
  .rpt-hero { flex-direction: column; align-items: flex-start; padding: 22px 18px 30px; }
  .rpt-hero h2 { font-size: 1.5rem; }
  .rpt-gauge { align-self: center; }
  .rpt-hilo, .rpt-charts, .rpt-lists { grid-template-columns: 1fr; }
  .rpt-areas { grid-template-columns: 1fr; }
}
@media print {
  .rpt { box-shadow: none; border: 0; }
  .rpt-hero, .rpt-gauge, .rpt-kpi, .rpt-panel, .rpt-area::before, .rpt-bar i, .rpt-tags em { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Header and menus */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 18px; padding: 8px 24px; min-height: 60px; background: rgba(255, 255, 255, 0.92); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); box-shadow: 0 1px 0 color-mix(in srgb, var(--brand) 35%, transparent), 0 6px 20px -14px rgba(15, 35, 80, 0.35); }
.mainnav { display: flex; align-items: center; gap: 2px; flex: 1; min-width: 0; }
.navlink, .menu > summary { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 9px; text-decoration: none; color: var(--ink); font-weight: 550; font-size: 0.93rem; cursor: pointer; white-space: nowrap; }
.navlink:hover, .menu > summary:hover, .menu[open] > summary { background: #f1f4f9; color: var(--ink); }
.navlink.active, .menu.active > summary { color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, white); }
.menu { position: relative; }
.menu > summary { list-style: none; margin: 0; }
.menu > summary::-webkit-details-marker { display: none; }
.caret { width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); opacity: 0.55; transition: transform 0.15s; }
.menu[open] > summary .caret { transform: translateY(1px) rotate(-135deg); }
.menu-panel { position: absolute; top: calc(100% + 6px); left: 0; z-index: 40; min-width: 230px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 40px -12px rgba(15, 35, 80, 0.28); animation: menu-in 0.14s ease-out; }
.menu-panel.right { left: auto; right: 0; max-width: min(300px, calc(100vw - 24px)); }
@keyframes menu-in { from { opacity: 0; transform: translateY(-4px); } }
.menu-panel a { display: flex; flex-direction: column; padding: 8px 12px; border-radius: 8px; text-decoration: none; color: var(--ink); }
.menu-panel a b { font-weight: 600; font-size: 0.92rem; }
.menu-panel a small { font-size: 0.78rem; color: var(--muted); }
.menu-panel a:hover { background: #f1f4f9; }
.menu-panel a.active { background: color-mix(in srgb, var(--brand) 10%, white); }
.menu-panel a.active b { color: var(--brand); }
.usermenu { margin-left: auto; }
.usermenu > summary { padding: 4px 8px 4px 4px; border: 1px solid var(--line); border-radius: 99px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 0.8rem; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--brand), #0ea5a4); letter-spacing: 0.02em; }
.menu-who { display: flex; flex-direction: column; padding: 8px 12px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.menu-who small { color: var(--muted); font-size: 0.8rem; overflow-wrap: anywhere; }
.menu-signout { width: 100%; text-align: left; font: inherit; font-weight: 600; font-size: 0.92rem; padding: 9px 12px; margin-top: 4px; border: 0; border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; background: none; color: var(--bad); cursor: pointer; }
.menu-signout:hover { background: #fdf1f0; }
.navtoggle { display: none; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; place-items: center; }
.navtoggle-bars, .navtoggle-bars::before, .navtoggle-bars::after { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--ink); position: relative; transition: transform 0.2s, opacity 0.2s; }
.navtoggle-bars::before, .navtoggle-bars::after { content: ""; position: absolute; left: 0; }
.navtoggle-bars::before { top: -6px; } .navtoggle-bars::after { top: 6px; }
.nav-open .navtoggle-bars { background: transparent; }
.nav-open .navtoggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-open .navtoggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 980px) {
  .topbar { flex-wrap: wrap; gap: 10px; padding: 8px 16px; }
  .logo img.tm-logo { max-width: 120px; }
  .logo img.org-logo { max-width: 110px; max-height: 30px; }
  .who-name { display: none; }
  .logo { min-width: 0; flex: 0 1 auto; gap: 8px; }
  .usermenu > summary { padding: 3px 6px 3px 3px; }
  .topbar.has-toggle .navtoggle { display: grid; order: 2; margin-left: auto; }
  .topbar.has-toggle .usermenu { order: 3; margin-left: 0; }
  .topbar .mainnav { order: 4; flex: 1 1 100%; flex-wrap: wrap; }
  .topbar.has-toggle .mainnav { display: none; flex-direction: column; align-items: stretch; padding: 6px 0 4px; border-top: 1px solid var(--line); }
  .topbar.has-toggle.nav-open .mainnav { display: flex; }
  .topbar.has-toggle .mainnav .menu-panel { position: static; box-shadow: none; border: 0; padding: 0 0 0 10px; animation: none; min-width: 0; }
  .topbar.has-toggle .navlink, .topbar.has-toggle .mainnav .menu > summary { width: 100%; justify-content: space-between; }
}

@media (max-width: 600px) {
  .topbar .mainnav.single { display: none; }
}
@media (max-width: 480px) {
  .logo img.tm-logo { max-width: 100px; }
  .logo img.org-logo { max-width: 80px; max-height: 26px; }
  .logo-sep { height: 22px; }
  .topbar { gap: 8px; padding: 8px 12px; }
}

@media print {
  .topbar, .foot, .pagehead .btn, .btn { display: none !important; }
  body, .card { background: #fff; border: 0; }
}

/* ---- V5: personal accounts, codes, certificates, sharing, credits, stars, surveys ---- */
.grow { flex: 1 1 auto; min-width: 0; }
.small { font-size: 0.88rem; }
.plain-list { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 6px; }
.plain-list li { padding: 6px 0; border-bottom: 1px solid #eef1f5; }
.plain-list li:last-child { border-bottom: 0; }
.field-error { display: block; color: var(--bad); font-size: 0.85rem; font-weight: 500; margin-top: 2px; }
.hint-list { margin: 14px 0 0; padding-left: 18px; color: var(--muted); font-size: 0.87rem; display: grid; gap: 3px; }
.note.cost { padding: 10px 14px; border-radius: 10px; background: #eef4ff; border: 1px solid #d6e4f5; }

/* Assessment code under a module name */
.mcode { margin: 2px 0 6px; font-size: 0.82rem; color: var(--muted); letter-spacing: 0.02em; }
.mcode b { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; color: var(--ink); font-weight: 700; background: #eef1f5; padding: 1px 6px; border-radius: 5px; letter-spacing: 0.06em; }
.mcode.big { font-size: 0.92rem; }
.libhero .mcode, .mcode.light { color: rgba(255, 255, 255, 0.85); }
.libhero .mcode b, .mcode.light b { color: #fff; background: rgba(255, 255, 255, 0.16); }
.rpt-code { margin: 2px 0 0; font-size: 0.85rem; color: var(--muted); }
.rpt-code b { font-family: ui-monospace, Menlo, Consolas, monospace; color: var(--ink); }

/* Radio chips */
fieldset.radios { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
fieldset.radios legend { font-weight: 600; font-size: 0.92rem; margin-bottom: 6px; padding: 0; width: 100%; }
div.radios { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-chip { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; padding: 8px 14px; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.radio-chip:hover { border-color: #b9c7de; }
.radio-chip:has(input:checked) { border-color: var(--brand); background: #eef4ff; color: #0b2a63; }
.radio-chip:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 1px; }
fieldset:disabled .radio-chip { cursor: default; opacity: 0.8; }

/* Avatar */
.avatar { overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.xl { width: 128px; height: 128px; font-size: 2.4rem; }
.photo-preview { display: grid; place-items: center; margin: 4px 0 16px; }
.photo-preview img { width: 128px; height: 128px; border-radius: 50%; object-fit: cover; box-shadow: 0 10px 24px -12px rgba(15, 35, 80, 0.5); border: 4px solid #fff; }
.profile-grid { grid-template-columns: minmax(240px, 1fr) 2fr; align-items: start; }
@media (max-width: 760px) { .profile-grid { grid-template-columns: 1fr; } }

/* Location suggestions */
label:has(> .places-list) { position: relative; }
.places-list { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; list-style: none; margin: 4px 0 0; padding: 4px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 14px 30px -12px rgba(15, 35, 80, 0.35); max-height: 260px; overflow: auto; font-weight: normal; }
.places-list li { padding: 8px 10px; border-radius: 7px; cursor: pointer; }
.places-list li.on, .places-list li:hover { background: #eef4ff; }
.places-list li small { display: block; color: var(--muted); }

/* Share menu */
details.share { position: relative; display: inline-block; }
details.share > summary { list-style: none; cursor: pointer; }
details.share > summary::-webkit-details-marker { display: none; }
.share-panel { position: absolute; left: 0; top: calc(100% + 6px); z-index: 30; min-width: 190px; display: grid; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 34px -14px rgba(15, 35, 80, 0.4); }
.share.right .share-panel, .lcard-actions .share-panel { left: auto; right: 0; }
.share.up .share-panel { top: auto; bottom: calc(100% + 6px); }
.share-panel a, .share-panel button.sh-copy { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; font: inherit; font-size: 0.92rem; background: none; border: 0; text-align: left; cursor: pointer; }
.share-panel a:hover, .share-panel button.sh-copy:hover { background: #f1f5fb; }
.share-panel a::before, .share-panel button.sh-copy::before { content: ""; width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--sc, #94a3b8); }
.sh-li { --sc: #0a66c2; } .sh-fb { --sc: #1877f2; } .sh-x { --sc: #111; } .sh-wa { --sc: #25d366; } .sh-em { --sc: #ea580c; } .sh-copy { --sc: #64748b; }
.share.icon-only > summary { padding: 4px 9px; }
.share.light > summary { color: #fff; border-color: rgba(255, 255, 255, 0.5); background: rgba(255, 255, 255, 0.08); }
.share.mailer .mail-panel { min-width: min(340px, 86vw); padding: 14px; gap: 10px; }
.mail-panel label { font-size: 0.88rem; }

/* Report and certificate actions */
.rpt-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.acard-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.acard-btns .btn { flex: 1 1 auto; text-align: center; }
.pub-cta-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* Personal home */
.my-hero-actions { margin-top: 14px !important; display: flex; gap: 8px; flex-wrap: wrap; }
.btn.light { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.5); color: #fff; }
.btn.light:hover { background: rgba(255, 255, 255, 0.24); }
.my-orgs { margin-bottom: 26px; }
.my-org-list { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.my-org-list form { margin: 0; }

/* Credits review */
.code-form { align-items: flex-end; margin: 14px 0 10px; }
.code-form label { flex: 1 1 200px; }
.pricebox { width: 100%; border-collapse: collapse; margin: 14px 0 18px; }
.pricebox td { padding: 9px 4px; border-bottom: 1px solid #eef1f5; }
.pricebox tr.pos td { color: var(--ok); }
.pricebox tr.total td { font-weight: 800; font-size: 1.1rem; border-bottom: 0; border-top: 2px solid var(--ink); }

/* Stars */
.star-form { display: inline; margin: 0; }
button.star { background: none; border: 0; padding: 2px 4px; font-size: 1.25rem; line-height: 1; color: #c3cad6; cursor: pointer; border-radius: 6px; }
button.star:hover { color: #f59e0b; background: #fff7e6; }
button.star.on { color: #f59e0b; }
.starcol { width: 36px; text-align: center; }
.star-mark { color: #f59e0b; }
tr.starred td { background: #fffbeb; }

/* Public certificate page */
.certview { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(240px, 1fr); gap: 24px; align-items: start; margin: 10px 0 30px; }
.cert-paper { position: relative; text-align: center; padding: 44px 40px 34px; background: #fff; border-radius: 16px; border: 1px solid var(--line); box-shadow: 0 24px 50px -28px rgba(15, 35, 80, 0.45); overflow: hidden; }
.cert-paper::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 12px; background: linear-gradient(180deg, #1d4ed8, #0ea5a4); }
.cert-logo { height: 40px; margin-bottom: 18px; }
.cert-kicker { margin: 0; letter-spacing: 0.28em; text-transform: uppercase; font-weight: 800; color: #0b2a63; font-size: 0.95rem; }
.cert-small { margin: 14px 0 2px; color: var(--muted); }
.cert-name { font-size: 2.4rem; margin: 6px 0; color: #0b1f4d; font-family: Georgia, "Times New Roman", serif; }
.cert-module { font-size: 1.35rem; margin: 6px 0 4px; color: #1d4ed8; }
.cert-score { margin: 10px 0 0; }
.cert-meta { display: flex; justify-content: center; gap: 28px; flex-wrap: wrap; margin: 26px 0 0; padding-top: 18px; border-top: 1px solid #eef1f5; }
.cert-meta div { display: flex; flex-direction: column; }
.cert-meta dt { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.cert-meta dd { margin: 2px 0 0; font-weight: 600; }
.certview.premium .cert-paper { background: #fbf7ec; border: 10px solid #0b1f4d; outline: 2px solid #c9a227; outline-offset: -18px; }
.certview.premium .cert-paper::before { display: none; }
.certview.premium .cert-kicker { color: #8a6d12; }
.certview.premium .cert-module { color: #0b1f4d; }
.cert-side { display: grid; gap: 12px; }
.cert-verified { margin: 0; font-weight: 700; color: var(--ok); }
.cert-actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.cert-actions details.share > summary { width: 100%; justify-content: center; }
@media (max-width: 820px) { .certview { grid-template-columns: 1fr; } .cert-paper { padding: 34px 20px 26px; } .cert-name { font-size: 1.8rem; } }

/* Survey builder */
.sbuilder { display: grid; gap: 14px; }
.bq { display: grid; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfe; }
.bq-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bq-head select { width: auto; flex: 1 1 200px; }
.bq-tools { display: flex; gap: 4px; margin-left: auto; }
.bq-kinds { border: 0; padding: 0; margin: 0; }
.bq-kinds legend { font-weight: 600; font-size: 0.92rem; margin-bottom: 4px; padding: 0; }
.bq-mb { max-width: 220px; }
.builder-add { padding-top: 6px; border-top: 1px dashed var(--line); }
.builder-add select { width: auto; }

/* Filling in a survey */
.survey-intro { white-space: pre-wrap; margin: 0; }
.survey-fill .req { color: var(--bad); }
.survey-q { display: grid; gap: 6px; padding: 14px 0; border-bottom: 1px solid #eef1f5; }
.survey-q:last-of-type { border-bottom: 0; }
.survey-q fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.survey-q legend { font-weight: 600; font-size: 0.92rem; padding: 0; margin-bottom: 8px; }
.survey-q.has-error input, .survey-q.has-error select, .survey-q.has-error textarea { border-color: var(--bad); }
.file-kept { margin: 0; }
.survey-table th { min-width: 140px; }
.survey-cards { display: grid; gap: 10px; margin-bottom: 26px; }
.survey-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: #fff; border: 1.5px solid var(--line); border-radius: 14px; color: var(--ink); text-decoration: none; transition: border-color 0.15s, transform 0.15s; }
.survey-card:hover { border-color: var(--brand); transform: translateY(-1px); }
.survey-card.is-done { background: #f8fafc; }
.survey-card-icon { font-size: 1.5rem; }
@media (max-width: 560px) { .bq-tools { margin-left: 0; } }
.survey-card .btn { flex: none; }
.rpt-hero .rpt-code { color: rgba(255, 255, 255, 0.82); margin: 4px 0 2px; }
.rpt-hero .rpt-code b { color: #fff; background: rgba(255, 255, 255, 0.16); padding: 1px 6px; border-radius: 5px; }
.grid2 > * { min-width: 0; }
.discount-grid { grid-template-columns: 3fr 2fr; } @media (max-width: 900px) { .discount-grid { grid-template-columns: 1fr; } }
/* Library cards clip their corners, so the share menu opens upward, over the card. */
.lcard-actions .share-panel { top: auto; bottom: calc(100% + 6px); }
.lcard:has(details.share[open]) { transform: none; z-index: 3; }
.cert-issuer dd { display: flex; align-items: center; gap: 8px; }
.cert-a2b { width: 26px; height: auto; }
/* V5.2 certificate page, matching the PDF */
.cert-paper { background: #fcfcfd; border: 1.5px solid #0b2a63; outline: 1px solid #c7d2e3; outline-offset: 6px; margin: 8px; }
.cert-paper::before { inset: 0 auto auto 0; width: 150px; height: 100px; background: linear-gradient(135deg, #0b2a63, #1d4ed8); clip-path: polygon(0 0, 100% 0, 0 100%); }
.cert-paper::after { content: ""; position: absolute; right: 0; bottom: 0; width: 150px; height: 100px; background: linear-gradient(135deg, #1d4ed8, #0b2a63); clip-path: polygon(100% 100%, 0 100%, 100% 0); }
.cert-title { margin: 0; font-size: 2.3rem; font-weight: 800; letter-spacing: 0.3em; text-transform: uppercase; color: #0b2a63; padding-left: 0.3em; }
.cert-kicker { display: flex; align-items: center; justify-content: center; gap: 14px; color: #0ea5a4; font-size: 0.8rem; letter-spacing: 0.35em; }
.cert-kicker::before, .cert-kicker::after { content: ""; width: 60px; height: 1px; background: currentColor; }
.cert-name { font-size: 2.6rem; }
.cert-small { font-family: Georgia, "Times New Roman", serif; font-style: italic; font-size: 1.05rem; }
.cert-module { color: #1d2433; }
.certview.premium .cert-paper::after { display: none; }
.certview.premium .cert-title { font-family: Georgia, "Times New Roman", serif; color: #0a1a3a; }
.certview.premium .cert-kicker { color: #b8892b; text-transform: none; letter-spacing: 0.05em; font-family: Georgia, serif; font-style: italic; font-size: 1.05rem; }
.certview.premium .cert-name { font-style: italic; }
@media (max-width: 820px) { .cert-title { font-size: 1.6rem; } .cert-paper::before, .cert-paper::after { width: 90px; height: 60px; } }

/* Popular flag */
.pill.popular { background: linear-gradient(90deg, #ffe4d6, #fecaca); color: #9a3412; }
.badge.popular { background: linear-gradient(90deg, #fb923c, #ef4444); color: #fff; box-shadow: 0 2px 8px -2px rgba(239, 68, 68, 0.6); }
.badges { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.lcard-popular { position: absolute; top: 0; right: 22px; z-index: 2; padding: 5px 12px 6px; border-radius: 0 0 10px 10px; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #fff; background: linear-gradient(180deg, #fb923c, #ef4444); box-shadow: 0 6px 14px -6px rgba(239, 68, 68, 0.8); }
.lcard.premium .lcard-popular { right: auto; left: 50%; transform: translateX(-50%); }
.lcard.popular:not(.premium) { box-shadow: 0 10px 30px -16px rgba(239, 68, 68, 0.45); }
.popular-toggle { display: inline-flex; flex-direction: row; justify-content: center; cursor: pointer; }
.popular-toggle input { width: 18px; height: 18px; accent-color: #ef4444; cursor: pointer; }

/* ---- V5.2 surveys ---- */
.sv-back { margin: 0 0 10px; }
.sv-back a { text-decoration: none; font-weight: 600; }
.sv-hero { position: relative; overflow: hidden; display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; padding: 26px 28px; border-radius: 20px; color: #fff; background: radial-gradient(circle at 88% -30%, rgba(14, 165, 164, 0.8), transparent 55%), linear-gradient(115deg, #0b2a63, #1d4ed8 75%); box-shadow: 0 18px 40px -24px rgba(11, 42, 99, 0.7); }
.sv-hero::after { content: ""; position: absolute; right: -50px; bottom: -80px; width: 220px; height: 220px; border-radius: 50%; border: 36px solid rgba(255, 255, 255, 0.07); pointer-events: none; }
.sv-hero h1 { margin: 4px 0 8px; font-size: 1.8rem; color: #fff; }
.sv-hero p { margin: 0; opacity: 0.92; max-width: 640px; }
.sv-hero .btn.light { position: relative; z-index: 1; }
.sv-hero-list { margin-bottom: 26px; align-items: center; }
.sv-kicker { font-size: 0.75rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.8; }
.sv-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 0.9rem; align-items: center; }
.sv-meta span:not(.sv-status) { opacity: 0.9; }
.sv-status { display: inline-flex; align-items: center; gap: 6px; font-size: 0.78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: #dcfce7; color: #166534; }
.sv-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.sv-status.is-closed { background: #f1f5f9; color: #475569; }
.sv-tabs { display: flex; gap: 4px; margin: 16px 0 20px; padding: 5px; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow-x: auto; }
.sv-tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600; white-space: nowrap; }
.sv-tabs a:hover { background: #f1f5fb; }
.sv-tabs a.on { background: #0b2a63; color: #fff; }
.sv-tabs .count { font-size: 0.75rem; background: rgba(15, 35, 80, 0.1); padding: 1px 8px; border-radius: 999px; }
.sv-tabs a.on .count { background: rgba(255, 255, 255, 0.2); }
.sv-h2 { margin: 0; }
.sv-empty-card { text-align: center; padding: 34px 20px; }
.sv-empty-card > span { font-size: 2.2rem; }

/* Survey list */
.sv-templates { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; margin-bottom: 30px; }
.sv-template { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; text-align: left; font: inherit; color: var(--ink); padding: 20px; border-radius: 18px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; box-shadow: 0 8px 24px -16px rgba(15, 35, 80, 0.3); transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s; }
.sv-template:hover { transform: translateY(-2px); border-color: var(--brand); box-shadow: 0 16px 32px -18px rgba(15, 35, 80, 0.45); }
.sv-template-ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 1.5rem; background: linear-gradient(135deg, #e0ecff, #d1fae5); }
.sv-template.blank .sv-template-ico { background: #f1f5f9; color: var(--brand); font-weight: 800; }
.sv-template-body b { display: block; font-size: 1.08rem; margin-bottom: 4px; }
.sv-template-body small { color: var(--muted); font-size: 0.88rem; line-height: 1.45; }
.sv-template-go { margin-top: auto; color: var(--brand); font-weight: 700; font-size: 0.92rem; }
.sv-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.sv-item { display: flex; flex-direction: column; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 18px; box-shadow: 0 8px 24px -16px rgba(15, 35, 80, 0.25); }
.sv-item header { display: flex; justify-content: space-between; align-items: center; }
.sv-item h3 { margin: 6px 0 0; font-size: 1.1rem; }
.sv-item h3 a { color: #0b1f4d; text-decoration: none; }
.sv-item h3 a:hover { color: var(--brand); }
.sv-item p { margin: 0; }
.sv-item-facts { list-style: none; padding: 0; margin: 8px 0 4px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.sv-item-facts li { background: #f6f8fb; border-radius: 10px; padding: 8px; text-align: center; }
.sv-item-facts b { display: block; font-size: 1.1rem; color: #0b1f4d; }
.sv-item-facts span { font-size: 0.72rem; color: var(--muted); }
.sv-item-progress .track, .sv-progress .track { height: 6px; background: #e8edf5; border-radius: 99px; overflow: hidden; margin: 4px 0; }
.sv-item-progress .fill, .sv-progress .fill { height: 100%; background: linear-gradient(90deg, var(--brand), #0ea5a4); border-radius: 99px; }
.sv-item footer { display: flex; gap: 6px; margin-top: auto; padding-top: 10px; border-top: 1px solid #eef1f5; }

/* Share tab */
.sv-share { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 900px) { .sv-share { grid-template-columns: 1fr; } }
.sv-card { margin-bottom: 18px; }
.sv-card-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px; }
.sv-card-head h2 { margin: 0 0 2px; }
.sv-card-head p { margin: 0; }
.sv-card-ico { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 1.25rem; background: #eef4ff; }
.sv-progress { margin-bottom: 10px; }
.sv-progress-top { display: flex; justify-content: space-between; font-size: 0.92rem; }
.sv-who summary { cursor: pointer; color: var(--brand); font-weight: 600; margin-bottom: 8px; }
.sv-people { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 4px; }
.sv-people li { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; background: #f8fafc; }
.sv-avatar { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 0.78rem; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--brand), #0ea5a4); }
.sv-avatar.sq { border-radius: 10px; background: #e0ecff; }
.sv-legend { font-weight: 600; font-size: 0.92rem; margin-bottom: 6px; padding: 0; }

/* Builder */
.sb { padding-bottom: 80px; }
.sb-grid { display: grid; grid-template-columns: 230px minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.sb-palette, .sb-settings { position: sticky; top: 76px; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 16px; box-shadow: 0 8px 24px -18px rgba(15, 35, 80, 0.3); max-height: calc(100vh - 100px); overflow: auto; }
.sb-palette h2, .sb-settings h2 { font-size: 1rem; margin: 0 0 4px; }
.sb-group { margin: 14px 0 6px; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.sb-tiles { display: grid; gap: 6px; }
.sb-tile { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; font: inherit; font-size: 0.9rem; font-weight: 600; color: var(--ink); text-align: left; background: #f8fafc; border: 1px solid #e5e9f0; border-radius: 10px; cursor: grab; transition: border-color 0.12s, background 0.12s, transform 0.12s; }
.sb-tile:hover { border-color: var(--brand); background: #fff; transform: translateX(2px); }
.sb-tile:active { cursor: grabbing; }
.sb-ico { flex: none; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-size: 0.85rem; font-weight: 800; color: var(--brand); background: #fff; border: 1px solid #e5e9f0; }
.sb-canvas { min-width: 0; }
.sb-paper { background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 16px 40px -28px rgba(15, 35, 80, 0.45); overflow: hidden; }
.sb-paper-head { padding: 22px 24px 18px; border-top: 6px solid var(--brand); background: linear-gradient(180deg, #f8fbff, #fff); border-bottom: 1px solid #eef1f5; }
.sb-title-input { font-size: 1.5rem; font-weight: 800; color: #0b1f4d; border: 1px solid transparent; padding: 6px 8px; margin-left: -8px; background: transparent; }
.sb-desc-input { border: 1px solid transparent; padding: 6px 8px; margin-left: -8px; background: transparent; color: var(--muted); resize: vertical; }
.sb-title-input:hover, .sb-desc-input:hover { border-color: #e5e9f0; }
.sb-title-input:focus, .sb-desc-input:focus { background: #fff; border-color: var(--brand); }
.sb-list { list-style: none; margin: 0; padding: 14px; display: grid; gap: 10px; min-height: 40px; }
.sb-item { position: relative; padding: 14px 16px 16px; border: 1.5px solid transparent; border-radius: 14px; background: #fff; cursor: pointer; transition: border-color 0.12s, box-shadow 0.12s, background 0.12s; }
.sb-item:hover { border-color: #dbe3ef; background: #fbfcfe; }
.sb-item.is-selected { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px rgba(31, 95, 191, 0.12), 0 12px 24px -18px rgba(15, 35, 80, 0.5); }
.sb-item.is-dragging { opacity: 0.35; }
.sb-item:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.sb-item-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.sb-handle { cursor: grab; color: #a3adbd; font-weight: 800; letter-spacing: -2px; padding: 0 4px; user-select: none; }
.sb-num { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 0.75rem; font-weight: 800; color: #fff; background: #0b2a63; }
.sb-type { font-size: 0.75rem; font-weight: 700; color: var(--muted); background: #f1f5f9; padding: 2px 8px; border-radius: 999px; }
.sb-req-chip { font-size: 0.7rem; font-weight: 700; color: #b3261e; background: #fdecea; padding: 2px 8px; border-radius: 999px; }
.sb-item-tools { display: flex; gap: 2px; opacity: 0; transition: opacity 0.12s; }
.sb-item:hover .sb-item-tools, .sb-item.is-selected .sb-item-tools, .sb-item:focus-within .sb-item-tools { opacity: 1; }
.sb-icon-btn { width: 30px; height: 30px; display: inline-grid; place-items: center; font: inherit; font-size: 0.9rem; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.sb-icon-btn:hover:not(:disabled) { background: #f1f5f9; color: var(--ink); border-color: #e5e9f0; }
.sb-icon-btn.danger:hover:not(:disabled) { background: #fdecea; color: #b3261e; }
.sb-icon-btn:disabled { opacity: 0.35; cursor: default; }
.sb-q { margin: 0 0 4px; font-weight: 700; font-size: 1.02rem; color: var(--ink); }
.sb-q.empty { color: #a3adbd; font-style: italic; font-weight: 600; }
.sb-q .req { color: #b3261e; }
.sb-help { margin: 0 0 8px; color: var(--muted); font-size: 0.88rem; }
.sb-mock-input { padding: 9px 12px; border: 1px solid #dde3ec; border-radius: 9px; color: #a3adbd; font-size: 0.9rem; background: #fafbfd; }
.sb-mock-input.tall { height: 64px; }
.sb-mock-input.sel { position: relative; }
.sb-mock-input.sel::after { content: "▾"; position: absolute; right: 12px; color: #94a3b8; }
.sb-mock-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.sb-mock-opt { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border: 1px solid #dde3ec; border-radius: 999px; font-size: 0.88rem; color: var(--ink); background: #fafbfd; }
.sb-mock-opt::before { content: ""; width: 12px; height: 12px; border: 1.5px solid #94a3b8; border-radius: 50%; }
.sb-mock-opt.c::before { border-radius: 3px; }
.sb-mock-drop { padding: 14px; border: 1.5px dashed #c7d2e3; border-radius: 12px; text-align: center; color: var(--muted); font-size: 0.88rem; background: #fafbfd; }
.sb-line { height: 4px; border-radius: 4px; background: var(--brand); box-shadow: 0 0 0 4px rgba(31, 95, 191, 0.15); list-style: none; }
.sb-empty { margin: 0 14px 14px; padding: 14px; text-align: center; border: 2px dashed #d5deeb; border-radius: 14px; color: var(--muted); font-weight: 600; transition: border-color 0.12s, background 0.12s; }
.sb-empty.is-big { padding: 40px 14px; }
.sb-empty.is-over, .sb-dragging-new .sb-empty { border-color: var(--brand); background: #f1f6ff; color: var(--brand); }
.sb-settings-empty { text-align: center; color: var(--muted); padding: 30px 10px; }
.sb-settings-empty span { font-size: 1.8rem; }
.sb-settings-head { display: flex; align-items: center; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid #eef1f5; }
.sb-settings { display: grid; gap: 12px; }
.sb-settings.is-inline { position: static; max-height: none; border-color: var(--brand); margin: -4px 0 4px; }
.sb-field { display: flex; flex-direction: column; gap: 4px; font-weight: normal; }
.sb-field-label { font-weight: 700; font-size: 0.85rem; }
.sb-field .hint { margin: 0; }
.sb-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sb-opts { display: grid; gap: 6px; }
.sb-opt-row { display: flex; align-items: center; gap: 4px; }
.sb-opt-mark { flex: none; width: 14px; height: 14px; border: 1.5px solid #94a3b8; border-radius: 50%; margin-right: 4px; }
.sb-opt-row.c .sb-opt-mark { border-radius: 3px; }
.sb-opt-row.d .sb-opt-mark { border: 0; width: 6px; height: 6px; background: #94a3b8; }
.sb-opt-row input { padding: 6px 8px; }
.sb-opts .btn { justify-self: start; }
.sb-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.radio-chip.small { padding: 5px 10px; font-size: 0.85rem; }
.sb-switch { display: flex; flex-direction: row; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: #f8fafc; cursor: pointer; font-weight: normal; }
.sb-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sb-switch-ui { flex: none; position: relative; width: 40px; height: 22px; border-radius: 999px; background: #cbd5e1; transition: background 0.15s; }
.sb-switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: transform 0.15s; }
.sb-switch input:checked + .sb-switch-ui { background: var(--brand); }
.sb-switch input:checked + .sb-switch-ui::after { transform: translateX(18px); }
.sb-switch input:focus-visible + .sb-switch-ui { outline: 2px solid var(--brand); outline-offset: 2px; }
.sb-switch b { display: block; font-size: 0.9rem; }
.sb-panel-actions { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 10px; border-top: 1px solid #eef1f5; }
.danger-text { color: var(--bad) !important; border-color: #f3c0bb !important; }
.sb-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; align-items: center; gap: 10px; padding: 12px max(16px, calc((100vw - 1180px) / 2)); background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(8px); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px -18px rgba(15, 35, 80, 0.4); }
.sb-state { font-size: 0.9rem; color: var(--ok); font-weight: 600; }
.sb-state::before { content: "✓ "; }
.sb-state.is-dirty { color: var(--warn); }
.sb-state.is-dirty::before { content: "● "; }
.sb-state.is-error { color: var(--bad); }
.sb-state.is-error::before { content: "⚠ "; }
@media (max-width: 1180px) { .sb-grid { grid-template-columns: 200px minmax(0, 1fr) 280px; } }
@media (max-width: 980px) {
  .sb-grid { grid-template-columns: 1fr; }
  .sb-palette { position: static; max-height: none; padding: 12px; }
  .sb-palette .sb-group { display: none; }
  .sb-palette { display: flex; flex-direction: column; }
  .sb-palette .sb-tiles { display: inline-flex; gap: 6px; }
  .sb-palette { overflow: visible; }
  .sb-palette > .sb-tiles, .sb-palette > p.hint { margin: 0; }
  .sb-palette { flex-wrap: nowrap; }
  .sb-palette .sb-tiles { flex-wrap: wrap; }
  .sb-tile { width: auto; padding: 6px 10px 6px 6px; font-size: 0.82rem; }
  .sb-settings:not(.is-inline) { display: none; }
  .sb-item-tools { opacity: 1; }
  .sb-paper-head { padding: 18px 16px 14px; }
  .sb-list { padding: 10px; }
}

/* Survey as people see it */
.sf-shell { max-width: 760px; margin: 0 auto; }
.sf-hero { position: relative; overflow: hidden; padding: 28px 30px 24px; border-radius: 22px 22px 0 0; color: #fff; background: radial-gradient(circle at 90% -20%, rgba(14, 165, 164, 0.8), transparent 55%), linear-gradient(120deg, #0b2a63, var(--brand)); }
.sf-hero h1 { color: #fff; margin: 8px 0 6px; font-size: 1.75rem; }
.sf-logo { max-height: 40px; max-width: 180px; background: #fff; padding: 6px 10px; border-radius: 10px; }
.sf-org { display: inline-block; font-weight: 800; font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; background: rgba(255, 255, 255, 0.16); padding: 4px 10px; border-radius: 8px; }
.sf-intro { margin: 0 0 12px; opacity: 0.94; white-space: pre-wrap; }
.sf-facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.sf-facts span { font-size: 0.82rem; background: rgba(255, 255, 255, 0.14); padding: 4px 10px; border-radius: 999px; }
.sf-form { background: #fff; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 22px 22px; padding: 10px 26px 26px; box-shadow: 0 20px 44px -30px rgba(15, 35, 80, 0.5); }
.sf-legend { margin: 12px 0 4px; font-size: 0.85rem; color: var(--muted); }
.sf-form .req { color: var(--bad); }
.sf-q { display: flex; gap: 14px; padding: 18px 0; border-bottom: 1px solid #eef1f5; }
.sf-q:last-of-type { border-bottom: 0; }
.sf-num { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 0.8rem; font-weight: 800; color: var(--brand); background: #eef4ff; margin-top: 1px; }
.sf-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.sf-body fieldset { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.sf-label { font-weight: 700; font-size: 1rem; color: var(--ink); padding: 0; }
.sf-help { margin: 0; color: var(--muted); font-size: 0.88rem; }
.sf-body input:not([type=checkbox]):not([type=radio]):not([type=file]), .sf-body select, .sf-body textarea { padding: 11px 13px; border-radius: 10px; border-color: #d5dce7; background: #fbfcfe; transition: border-color 0.12s, background 0.12s, box-shadow 0.12s; }
.sf-body input:focus, .sf-body select:focus, .sf-body textarea:focus { background: #fff; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(31, 95, 191, 0.12); outline: none; }
.sf-options { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.sf-option { position: relative; flex-direction: row; align-items: center; gap: 0; font-weight: 500; cursor: pointer; }
.sf-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sf-option span { display: inline-flex; align-items: center; gap: 9px; padding: 9px 16px; border: 1.5px solid #d5dce7; border-radius: 12px; background: #fff; transition: border-color 0.12s, background 0.12s; }
.sf-option span::before { content: ""; flex: none; width: 15px; height: 15px; border: 1.5px solid #94a3b8; border-radius: 50%; transition: border-color 0.12s, box-shadow 0.12s; }
.sf-option input[type=checkbox] + span::before { border-radius: 4px; }
.sf-option:hover span { border-color: #a9b7cc; }
.sf-option input:checked + span { border-color: var(--brand); background: #eef4ff; color: #0b2a63; font-weight: 600; }
.sf-option input:checked + span::before { border-color: var(--brand); box-shadow: inset 0 0 0 3.5px #fff; background: var(--brand); }
.sf-option input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
fieldset:disabled .sf-option { cursor: default; opacity: 0.85; }
.sf-drop { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 20px 16px; border: 2px dashed #c7d2e3; border-radius: 14px; background: #fafbfd; text-align: center; font-weight: normal; cursor: pointer; transition: border-color 0.12s, background 0.12s; }
.sf-drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.sf-drop:hover, .sf-drop.is-over { border-color: var(--brand); background: #f1f6ff; }
.sf-drop.has-file { border-style: solid; border-color: var(--ok); background: #f0fdf4; }
.sf-drop.too-big { border-color: var(--bad); background: #fef2f2; }
.sf-drop.is-disabled { cursor: default; opacity: 0.7; }
.sf-drop-ico { font-size: 1.6rem; }
.sf-drop-text b { color: var(--brand); }
.sf-drop-rule { font-size: 0.8rem; color: var(--muted); }
.sf-drop-name { font-size: 0.88rem; font-weight: 700; color: var(--ok); }
.sf-drop.too-big .sf-drop-name { color: var(--bad); }
.sf-kept { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; padding: 8px 12px; border-radius: 10px; background: #f0fdf4; border: 1px solid #bbf7d0; }
.sf-q.has-error .sf-num { background: #fdecea; color: var(--bad); }
.sf-q.has-error input:not([type=checkbox]):not([type=radio]), .sf-q.has-error select, .sf-q.has-error textarea, .sf-q.has-error .sf-option span, .sf-q.has-error .sf-drop { border-color: var(--bad); }
.sf-submit { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 18px; border-top: 1px solid #eef1f5; }
.btn.big { padding: 12px 26px; font-size: 1rem; border-radius: 10px; }
.sf-note { max-width: 760px; margin-left: auto; margin-right: auto; }
@media (max-width: 600px) {
  .sf-hero { padding: 22px 18px 18px; border-radius: 18px 18px 0 0; }
  .sf-hero h1 { font-size: 1.4rem; }
  .sf-form { padding: 6px 16px 20px; border-radius: 0 0 18px 18px; }
  .sf-q { gap: 10px; }
  .sf-option { flex: 1 1 100%; }
  .sf-option span { width: 100%; }
  .sv-hero { padding: 22px 18px; }
  .sv-hero h1 { font-size: 1.4rem; }
}

/* Preview */
.sv-preview-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.sv-preview-bar p { margin: 0; }
.sv-device { display: inline-flex; padding: 4px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.sv-device button { font: inherit; font-weight: 600; font-size: 0.88rem; padding: 6px 14px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); cursor: pointer; }
.sv-device button.on { background: #0b2a63; color: #fff; }
.sv-frame { padding: 26px; border-radius: 24px; background: repeating-linear-gradient(45deg, #eef2f8, #eef2f8 12px, #f4f7fb 12px, #f4f7fb 24px); transition: padding 0.2s; }
.sv-frame.is-phone .sf-shell { max-width: 390px; border: 10px solid #0f172a; border-radius: 36px; overflow: hidden; box-shadow: 0 30px 60px -30px rgba(15, 23, 42, 0.6); }
.sv-frame.is-phone .sf-hero { border-radius: 0; padding: 22px 18px 18px; }
.sv-frame.is-phone .sf-hero h1 { font-size: 1.35rem; }
.sv-frame.is-phone .sf-form { border-radius: 0; padding: 6px 16px 20px; }
.sv-frame.is-phone .sf-option { flex: 1 1 100%; }
.sv-frame.is-phone .sf-option span { width: 100%; }
@media (max-width: 600px) { .sv-frame { padding: 10px; border-radius: 16px; } }
.sf-label { display: block; }

/* ---- V5.3: badges and public profile ---- */
.bdg { position: relative; display: inline-block; flex: none; line-height: 0; }
.bdg svg { width: 100%; height: 100%; filter: drop-shadow(0 4px 6px rgba(11, 42, 99, 0.18)); }
.bdg-sm { width: 40px; height: 46px; }
.bdg-md { width: 64px; height: 74px; }
.bdg-lg { width: 88px; height: 102px; }
.bdg.locked svg { filter: grayscale(1); opacity: 0.38; }
.bdg-lock { position: absolute; right: -2px; bottom: 2px; font-size: 14px; line-height: 1; background: #fff; border-radius: 50%; padding: 3px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18); }
.bdg-sm .bdg-lock { font-size: 10px; padding: 2px; }
.bdg-track { display: block; height: 7px; border-radius: 99px; background: #e5eaf3; overflow: hidden; margin: 6px 0 3px; }
.bdg-track > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #0ea5a4, #1d4ed8); }

.bdg-celebrate { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 18px; margin: -10px 0 22px; border-radius: 16px; color: #fff; background: linear-gradient(110deg, #7c3aed, #1d4ed8 60%, #0ea5a4); box-shadow: 0 14px 30px -18px rgba(76, 29, 149, 0.8); }
.bdg-celebrate > div:nth-child(2) { flex: 1; min-width: 200px; }
.bdg-celebrate p { margin: 2px 0 0; opacity: 0.9; font-size: 0.9rem; }
.bdg-celebrate-medals { display: flex; }
.bdg-celebrate-medals .bdg + .bdg { margin-left: -8px; }

.bdg-strip { display: grid; grid-template-columns: 1.1fr 1.3fr 1fr; gap: 14px; margin: -8px 0 26px; }
.bdg-strip > * { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: #fff; color: var(--ink); text-decoration: none; min-width: 0; }
.bdg-strip > a:hover { border-color: #b9c8e6; box-shadow: 0 8px 20px -16px rgba(11, 42, 99, 0.5); }
.bdg-level-num { flex: none; width: 54px; height: 54px; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; background: linear-gradient(135deg, #0b2a63, #1d4ed8); line-height: 1; }
.bdg-level-num small { color: #cfe0ff; font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.08em; }
.bdg-level-num b { font-size: 1.5rem; margin-top: 2px; }
.bdg-level-body, .bdg-goal-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bdg-level-body small, .bdg-goal-body small { font-size: 0.78rem; }
.bdg-goal-body > small:first-child { text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.68rem; font-weight: 700; color: #0e8f8e; }
.bdg-recent { flex-direction: column; align-items: flex-start !important; justify-content: center; gap: 6px !important; }
.bdg-recent-medals { display: flex; }
.bdg-recent-medals .bdg + .bdg { margin-left: -6px; }
.bdg-recent a { font-size: 0.88rem; font-weight: 600; text-decoration: none; }

.bdg-hero-level { display: flex; align-items: center; gap: 22px; position: relative; z-index: 1; flex-wrap: wrap; }
.bdg-ring { --p: 0; flex: none; width: 112px; height: 112px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#5eead4 calc(var(--p) * 1%), rgba(255, 255, 255, 0.16) 0); }
.bdg-ring > span { width: 90px; height: 90px; border-radius: 50%; background: #0d2f6e; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.bdg-ring small { color: #b8cdf5; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em; }
.bdg-ring b { font-size: 2.3rem; margin-top: 3px; }
details.share.on-dark > summary { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.5); color: #fff; padding: 10px 16px; font-size: 0.95rem; }
details.share.on-dark .share-panel { color: var(--ink); }

.bdg-goals { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-bottom: 28px; }
.bdg-goalcard { position: relative; display: flex; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.bdg-goalcard > div { flex: 1; min-width: 0; }
.bdg-goalcard p { margin: 2px 0 4px; }
.bdg-goalcard p:last-child { margin-top: 10px; }
.bdg-pts { position: absolute; top: 12px; right: 12px; font-size: 0.72rem; font-weight: 700; color: #7c3aed; background: #f3edff; border-radius: 99px; padding: 2px 8px; }

.bdg-tracks { display: grid; gap: 14px; margin-bottom: 24px; }
.bdg-trackrow { padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.bdg-trackrow.complete { background: linear-gradient(180deg, #f6fffb, #fff); border-color: #bfe8d4; }
.bdg-trackrow > header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.bdg-trackrow > header > div { flex: 1; min-width: 0; }
.bdg-trackrow h3 { margin: 0; font-size: 1.02rem; color: #0b2a63; }
.bdg-trackrow header p { margin: 1px 0 0; }
.bdg-track-ico { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; font-size: 1.3rem; background: #eef3fd; }
.bdg-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.bdg-steps li { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 10px 6px; border-radius: 12px; }
.bdg-steps li.earned { background: #f7f9fe; }
.bdg-steps li b { font-size: 0.86rem; margin-top: 4px; }
.bdg-steps li small { font-size: 0.74rem; line-height: 1.3; }
.bdg-steps li small.ok { color: var(--ok); font-weight: 600; }
.bdg-howto summary { cursor: pointer; }
.bdg-howto p { margin: 12px 0; color: var(--muted); }
.bdg-levels { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.bdg-levels li { padding: 8px 10px; border-radius: 10px; background: #f5f7fa; font-size: 0.86rem; display: flex; flex-direction: column; }
.bdg-levels li.past { background: #eef6f2; }
.bdg-levels li.current { background: #1d4ed8; color: #fff; }
.bdg-levels li.current small { color: #dbe6ff; }

.done-badges { margin: 18px auto; padding: 16px; border-radius: 16px; background: linear-gradient(180deg, #f5f0ff, #fff); border: 1px solid #e4d8ff; max-width: 560px; }
.done-badges > small { display: block; font-weight: 700; color: #6d28d9; margin-bottom: 10px; }
.done-badge-row { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; margin-bottom: 10px; }
.done-badge-item { display: flex; flex-direction: column; align-items: center; max-width: 130px; }
.done-badge-item b { font-size: 0.88rem; margin-top: 6px; }
.done-badge-item span { font-size: 0.76rem; color: var(--muted); }

.pp-card .pp-head { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.pp-card .pp-head h2 { margin-top: 0; }
.pp-url { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.pp-url > span { padding: 9px 4px 9px 10px; background: #f5f7fa; color: var(--muted); font-size: 0.9rem; white-space: nowrap; border-right: 1px solid var(--line); }
.pp-url input { border: 0; border-radius: 0; flex: 1; min-width: 0; }

.pp-hero { position: relative; overflow: hidden; display: flex; align-items: center; gap: 26px; flex-wrap: wrap; padding: 30px; border-radius: 22px; margin-bottom: 22px; color: #fff; background: radial-gradient(circle at 90% -30%, rgba(14, 165, 164, 0.85), transparent 55%), linear-gradient(115deg, #0b2a63, #1d4ed8 70%); box-shadow: 0 18px 40px -22px rgba(11, 42, 99, 0.7); }
.pp-hero::after { content: ""; position: absolute; right: -60px; bottom: -100px; width: 280px; height: 280px; border-radius: 50%; border: 40px solid rgba(255, 255, 255, 0.07); }
.pp-photo { flex: none; width: 128px; height: 128px; border-radius: 50%; padding: 4px; background: linear-gradient(135deg, #5eead4, #fff); position: relative; z-index: 1; }
.pp-photo img, .pp-photo span { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: grid; place-items: center; background: #0d2f6e; font-size: 2.6rem; font-weight: 700; }
.pp-id { flex: 1; min-width: 240px; position: relative; z-index: 1; }
.pp-id h1 { margin: 6px 0 2px; font-size: 2.1rem; line-height: 1.15; }
.pp-level { display: inline-block; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 10px; border-radius: 99px; background: rgba(94, 234, 212, 0.2); color: #a7f3e7; border: 1px solid rgba(94, 234, 212, 0.4); }
.pp-headline { margin: 0 0 6px; font-size: 1.05rem; opacity: 0.95; }
.pp-facts { margin: 0 0 12px; display: flex; gap: 16px; flex-wrap: wrap; font-size: 0.88rem; opacity: 0.85; }
.pp-stats { align-self: flex-end; }
.pp-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.pp-main .card h2, .pp-side .card h2 { margin-top: 0; display: flex; align-items: center; gap: 8px; font-size: 1.1rem; color: #0b2a63; }
.pp-main .card h2 .count { font-size: 0.75rem; font-weight: 700; padding: 1px 9px; border-radius: 99px; background: #e8effd; color: #1d4ed8; }
.pp-about p { white-space: pre-line; margin: 0; }
.pp-badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
.pp-badge { margin: 0; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 14px 8px; border-radius: 14px; background: #f8faff; }
.pp-badge figcaption { display: flex; flex-direction: column; margin-top: 8px; gap: 1px; }
.pp-badge figcaption b { font-size: 0.9rem; }
.pp-badge figcaption small { font-size: 0.76rem; line-height: 1.3; }
.pp-certs { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pp-certs a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); }
.pp-certs a:hover { border-color: #b9c8e6; background: #f8faff; }
.pp-cert-ico { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 10px; background: #fff7e6; font-size: 1.2rem; }
.pp-cert-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pp-cert-go { font-size: 0.85rem; font-weight: 600; color: var(--brand); white-space: nowrap; }
.pp-side .btn.block + .btn.block { margin-top: 8px; }

@media (max-width: 900px) {
  .bdg-strip { grid-template-columns: 1fr 1fr; }
  .bdg-recent { grid-column: 1 / -1; flex-direction: row !important; align-items: center !important; justify-content: space-between; }
  .pp-layout { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .bdg-strip { grid-template-columns: 1fr; }
  .bdg-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bdg-levels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bdg-ring { width: 92px; height: 92px; }
  .bdg-ring > span { width: 74px; height: 74px; }
  .bdg-ring b { font-size: 1.9rem; }
  .pp-hero { padding: 22px 18px; text-align: center; justify-content: center; }
  .pp-facts { justify-content: center; }
  .pp-id h1 { font-size: 1.7rem; }
  .pp-stats { align-self: center; width: 100%; justify-content: center; }
  .pp-stats li { min-width: 0; flex: 1; }
  .pp-badges { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pp-url > span { font-size: 0.78rem; }
}
.bdg-goalcard > div > b { display: block; padding-right: 62px; }
.pp-preview { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 16px; border-radius: 14px; background: #fff7e6; border: 1px solid #f3d28b; color: #6b4a00; }
.pp-preview b { margin-right: 6px; }
/* ---- V5.4: Free assessments ---- */
.pill.free { background: #dcfce7; color: #166534; }
.badge.free { background: linear-gradient(90deg, #22c55e, #059669); color: #fff; box-shadow: 0 2px 8px -2px rgba(5, 150, 105, 0.6); }
.lcard-free { position: absolute; top: 0; left: 22px; z-index: 2; padding: 5px 12px 6px; border-radius: 0 0 10px 10px; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #fff; background: linear-gradient(180deg, #22c55e, #059669); box-shadow: 0 6px 14px -6px rgba(5, 150, 105, 0.8); }
.lcard-status.free { color: #047857; font-weight: 700; }
.free-toggle input { accent-color: #059669; }

/* ---- V5.4: dark mode switch and theme ---- */
.theme-toggle { display: inline-flex; align-items: center; flex: none; margin-left: auto; text-decoration: none; border-radius: 99px; }
.usermenu + .theme-toggle, .pubnav .theme-toggle { margin-left: 10px; }
.pubnav .theme-toggle { margin: 0 6px 0 0; }
.tt-track { position: relative; display: inline-flex; align-items: center; justify-content: space-between; width: 54px; height: 28px; padding: 0 6px; border-radius: 99px; background: #e8edf5; border: 1px solid #d5dce8; font-size: 12px; transition: background 0.2s; }
.tt-thumb { position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(15, 23, 42, 0.3); transition: transform 0.2s; }
[data-theme="dark"] .tt-track { background: #24304a; border-color: #34425f; }
[data-theme="dark"] .tt-thumb { transform: translateX(26px); background: #cbd5e1; }
.theme-toggle:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e4e9f2;
  --muted: #9aa5b8;
  --line: #2a3446;
  --bg: #0d121b;
  --card: #151c28;
  --ok: #4ade80;
  --warn: #fbbf24;
  --bad: #f87171;
}
[data-theme="dark"] body { color: var(--ink); }
:where([data-theme="dark"]) a { color: #7fa8ff; }
[data-theme="dark"] .topbar, [data-theme="dark"] .pubbar { background: #111826; border-color: #222c3d; }

[data-theme="dark"] .btn.primary { color: #fff; }
[data-theme="dark"] .menu-panel { background: #182132; border-color: #2a3446; }
[data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3 { color: inherit; }
/* The certificate keeps its paper look. */
[data-theme="dark"] .cert-paper { color-scheme: light; --ink: #1d2433; --muted: #5b6475; --line: #dfe3ea; color: #1d2433; }
[data-theme="dark"] img.org-logo, [data-theme="dark"] .acct-logo img { background: #fff; border-radius: 6px; padding: 2px; }
.theme-dark-only { display: none !important; }
[data-theme="dark"] .theme-light-only { display: none !important; }
[data-theme="dark"] img.theme-dark-only { display: inline !important; }
[data-theme="dark"] img.authlogo.theme-dark-only { display: block !important; }
:where([data-theme="dark"]) .btn { color: #9dbdff; border-color: #3b5797; }
:where([data-theme="dark"]) .btn:hover { background: #1c2740; }
[data-theme="dark"] .navlink.active, [data-theme="dark"] .menu.active > summary, [data-theme="dark"] .menu-panel a.active { color: #a9c4ff; background: #1c2a46; }
[data-theme="dark"] .cat-psychometric { --c: #a78bfa; } [data-theme="dark"] .cat-cognitive { --c: #6f98ff; } [data-theme="dark"] .cat-workplace_readiness { --c: #2dd4bf; } [data-theme="dark"] .cat-academic { --c: #a3e635; } [data-theme="dark"] .cat-skills { --c: #fbbf24; } [data-theme="dark"] .cat-behavioural { --c: #f472b6; } [data-theme="dark"] .cat-other { --c: #94a3b8; }
[data-theme="dark"] .pl-body { --pl-bg: #0d121b; --ink-navy: #a9c1ff; }
[data-theme="dark"] .q-chip, [data-theme="dark"] .opt-key, [data-theme="dark"] .review h2, [data-theme="dark"] .pl-btn.map { color: #a9c1ff; }
[data-theme="dark"] .su-intro h1 { background: linear-gradient(90deg, #9cc0ff, #38bdf8 60%, #86efac); -webkit-background-clip: text; background-clip: text; }
