/* XTen Charter Onboarding — palette from stack.xten.au/Stack-Palette.md, type DM Sans (same as the sites). */
:root {
  --bg: #E8F4F2; --bg-alt: #DFF0EE; --surface: #F4FAFA; --surface-2: #FFFFFF;
  --accent: #1A7A6E; --accent-mid: #2A9D8F; --accent-light: #5BBFB5;
  --accent-ghost: rgba(26,122,110,0.08); --accent-border: rgba(26,122,110,0.15);
  --text-1: #0D1E1C; --text-2: #3A5C58; --text-3: #6B8C88; --border: rgba(13,30,28,0.08);
  --ok: #1E7A3D; --ok-bg: #E3F3E6; --warn: #97640C; --warn-bg: #FBEFDA; --err: #A3382A; --err-bg: #FBE6E2;
  --shadow: 0 1px 2px rgba(13,30,28,0.04), 0 8px 24px rgba(13,30,28,0.06); --radius: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text-1); font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-size: 16px; line-height: 1.55; padding-inline: max(20px, calc((100vw - 1080px) / 2)); padding-block: 0 72px; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.92em; }
code { background: var(--accent-ghost); padding: 1px 5px; border-radius: 4px; }
small { font-size: 13px; } .small { font-size: 14px; } .muted { color: var(--text-3); }
svg { width: 1em; height: 1em; fill: currentColor; vertical-align: -0.12em; }

/* top bar */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0 14px; border-bottom: 1px solid var(--border); margin-bottom: 36px; flex-wrap: wrap; }
.wordmark { font-weight: 700; font-size: 17px; letter-spacing: -0.01em; color: var(--text-1); } .wordmark:hover { text-decoration: none; }
.wordmark .dot { color: var(--accent); } .wordmark .sub { color: var(--text-3); font-weight: 500; }
.topbar nav { font-size: 14px; display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.topbar nav a { color: var(--text-2); font-weight: 500; } .topbar nav .who { color: var(--text-3); }
.topbar nav .pill { background: var(--accent-ghost); border: 1px solid var(--accent-border); color: var(--accent); padding: 2px 10px; border-radius: 100px; font-weight: 600; }
form.inline { display: inline; }
button.link { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; } button.link:hover { text-decoration: underline; }
button.link.small { font-size: 13.5px; color: var(--text-3); }

.flash { padding: 10px 16px; border-radius: 10px; margin: -12px 0 20px; font-size: 14.5px; border: 1px solid var(--accent-border); background: var(--accent-ghost); color: var(--text-2); }
.flash.ok { background: var(--ok-bg); color: var(--ok); border-color: rgba(30,122,61,0.2); }
.flash.error { background: var(--err-bg); color: var(--err); border-color: rgba(163,56,42,0.2); }
.flash.info { background: var(--warn-bg); color: var(--warn); border-color: rgba(151,100,12,0.2); }

/* type */
.eyebrow { font-size: 12.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: 10px; }
h1 { font-size: clamp(30px, 4.4vw, 46px); line-height: 1.06; letter-spacing: -0.02em; margin: 0 0 16px; font-weight: 700; }
h2 { font-size: 22px; letter-spacing: -0.01em; margin: 0 0 6px; }
.lede { font-size: 18px; color: var(--text-2); max-width: 58ch; margin: 0; } .lede.small { font-size: 15.5px; }
.section-note { color: var(--text-2); margin: 0 0 20px; max-width: 70ch; }

/* hero */
.hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: start; margin-bottom: 44px; }
.hero-side { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); }
.hero-side h3 { margin: 0 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); font-weight: 600; }
.hero-side ol { margin: 0; padding-left: 20px; color: var(--text-2); font-size: 15px; } .hero-side li { margin: 6px 0; } .hero-side li strong { color: var(--text-1); }
.progress-wrap { margin: 22px 0 18px; max-width: 520px; }
.progress { height: 10px; background: var(--bg-alt); border-radius: 100px; overflow: hidden; border: 1px solid var(--border); }
.progress .bar { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-mid)); border-radius: 100px; transition: width .4s ease; }
.progress-label { font-size: 13.5px; color: var(--text-3); margin-top: 7px; font-weight: 500; }

/* buttons & forms */
.btn { display: inline-block; padding: 10px 18px; border-radius: 10px; border: 1px solid var(--accent-border); background: var(--surface-2); color: var(--accent); font: inherit; font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none; }
.btn:hover { text-decoration: none; background: var(--accent-ghost); }
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); } .btn.primary:hover { background: #166a5f; }
.btn.danger { color: var(--err); border-color: rgba(163,56,42,0.3); } .btn.danger:hover { background: var(--err-bg); }
.stack { display: flex; flex-direction: column; gap: 14px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: var(--text-2); }
label small { font-weight: 500; color: var(--text-3); }
label.check { flex-direction: row; align-items: center; gap: 10px; font-weight: 500; }
input[type=text], input[type=email], input[type=password] { font: inherit; font-size: 15.5px; padding: 10px 12px; border: 1px solid rgba(13,30,28,0.18); border-radius: 10px; background: var(--surface-2); color: var(--text-1); }
input:focus { outline: 2px solid var(--accent-light); outline-offset: 1px; border-color: var(--accent); }
input.copy { width: 100%; font-family: ui-monospace, Menlo, monospace; font-size: 13.5px; }

/* auth pages */
.auth { display: grid; place-items: center; padding: 20px 0 40px; }
.auth-card { width: min(460px, 100%); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px 30px 24px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 30px; } .auth-card .lede { margin-bottom: 18px; } .auth-card .flash { margin: 0 0 16px; }
.auth-card p.muted { margin: 18px 0 0; }

/* module cards */
.modules { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.card { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .15s ease, box-shadow .15s ease; position: relative; }
.card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(13,30,28,0.05), 0 14px 32px rgba(13,30,28,0.10); }
.card.next { border-color: var(--accent-mid); box-shadow: 0 0 0 3px rgba(42,157,143,0.18), var(--shadow); }
.card .thumb { position: relative; aspect-ratio: 16/9; background: var(--bg-alt); display: block; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card.done .thumb img { filter: saturate(0.6) brightness(0.92); }
.card .thumb .play { position: absolute; inset: 0; display: grid; place-items: center; }
.card .thumb .play span { width: 52px; height: 52px; border-radius: 50%; background: rgba(255,255,255,0.92); display: grid; place-items: center; box-shadow: 0 4px 14px rgba(13,30,28,0.25); }
.card .thumb .play svg { width: 22px; height: 22px; fill: var(--accent); margin-left: 2px; }
.card.done .thumb .play span { background: var(--ok); } .card.done .thumb .play svg { fill: #fff; margin-left: 0; }
.card .thumb .dur { position: absolute; right: 10px; bottom: 10px; background: rgba(13,30,28,0.78); color: #fff; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 6px; font-variant-numeric: tabular-nums; }
.card .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card .num { font-size: 12.5px; color: var(--accent); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.card h3 { margin: 0; font-size: 18px; line-height: 1.25; letter-spacing: -0.01em; } .card h3 a { color: var(--text-1); }
.card p { margin: 0; color: var(--text-2); font-size: 14.5px; flex: 1; }
.card .links { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13.5px; margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--border); } .card .links a { font-weight: 600; }

.status { display: inline-block; font-size: 11.5px; font-weight: 600; letter-spacing: 0.02em; text-transform: none; padding: 2px 9px; border-radius: 100px; border: 1px solid transparent; }
.status.done, .status.active { background: var(--ok-bg); color: var(--ok); border-color: rgba(30,122,61,0.2); }
.status.next, .status.invited { background: var(--warn-bg); color: var(--warn); border-color: rgba(151,100,12,0.2); }
.status.disabled { background: var(--err-bg); color: var(--err); }

/* module page */
.crumbs { font-size: 14px; color: var(--text-3); margin-bottom: 18px; } .crumbs a { color: var(--text-2); }
.mod-head { margin-bottom: 22px; }
.mod-head .meta { display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; color: var(--text-3); margin-top: 10px; align-items: center; } .mod-head .meta b { color: var(--text-2); font-weight: 600; }
.player { background: #0D1E1C; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 16/9; margin-bottom: 30px; }
.player video { width: 100%; height: 100%; display: block; background: #0D1E1C; }
.two-col { display: grid; grid-template-columns: 1.55fr 1fr; gap: 32px; align-items: start; }
.panel { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); }
.panel + .panel { margin-top: 18px; }
.panel h2 { font-size: 18px; margin-bottom: 12px; }
.panel ul, .panel ol { margin: 0; padding-left: 20px; color: var(--text-2); } .panel li { margin: 9px 0; } .panel li strong { color: var(--text-1); }
.panel p.intro { margin: 0 0 14px; color: var(--text-2); }
.panel.complete { border-color: var(--accent-border); background: var(--accent-ghost); }
.panel.complete.is-done { background: var(--ok-bg); border-color: rgba(30,122,61,0.2); } .panel.complete.is-done h2 { color: var(--ok); }
.companion { display: flex; flex-direction: column; gap: 8px; }
.companion a, .companion .soon { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border: 1px solid var(--accent-border); border-radius: 10px; background: var(--accent-ghost); font-weight: 600; font-size: 14.5px; }
.companion a:hover { text-decoration: none; background: rgba(26,122,110,0.14); }
.companion .soon { color: var(--text-3); border-style: dashed; background: transparent; font-weight: 500; } .companion small { color: var(--text-3); font-weight: 500; }
.callout { border-left: 3px solid var(--accent); padding: 10px 16px; background: var(--accent-ghost); border-radius: 0 10px 10px 0; color: var(--text-2); margin-top: 18px; }
.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--border); }
.pager a { display: flex; flex-direction: column; gap: 3px; max-width: 46%; } .pager a:hover { text-decoration: none; }
.pager a small { color: var(--text-3); font-weight: 500; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.06em; } .pager a span { font-weight: 600; color: var(--text-1); }
.pager a.next { text-align: right; align-items: flex-end; margin-left: auto; }

/* documents */
.doc-group { font-size: 15px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); margin: 28px 0 12px; } .doc-group:first-of-type { margin-top: 0; }
.doclist { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.doclist .panel + .panel { margin-top: 0; } .doc h2 a { color: var(--text-1); }
.doc .links { display: flex; gap: 14px; font-size: 14px; font-weight: 600; }
.prose { max-width: 78ch; font-size: 16.5px; line-height: 1.65; }
.prose h2, .prose h3, .prose h4 { margin: 1.6em 0 0.5em; letter-spacing: -0.01em; } .prose h2 { font-size: 24px; } .prose h3 { font-size: 19px; } .prose h4 { font-size: 16.5px; color: var(--text-2); }
.prose p, .prose li { color: var(--text-1); } .prose blockquote { border-left: 3px solid var(--accent-light); margin: 1em 0; padding: 4px 18px; color: var(--text-2); }
.prose pre { background: var(--bg-alt); padding: 14px; border-radius: 10px; overflow-x: auto; font-size: 13.5px; }
.prose li.task { list-style: none; margin-left: -20px; } .prose hr { border: 0; border-top: 1px solid var(--border); margin: 2em 0; }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-3); font-weight: 600; background: var(--surface); }

/* certificate */
.certificate { max-width: 760px; margin: 10px auto 0; background: var(--surface-2); border: 1px solid var(--accent-border); border-radius: 18px; padding: 48px 52px; box-shadow: var(--shadow); text-align: center; position: relative; }
.certificate::before { content: ''; position: absolute; inset: 12px; border: 1px solid var(--accent-border); border-radius: 12px; pointer-events: none; }
.certificate .lede { margin: 0 auto 10px; max-width: 60ch; }
.cert-name { font-size: clamp(30px, 5vw, 44px); font-weight: 700; letter-spacing: -0.02em; margin: 6px 0 14px; color: var(--accent); }
.cert-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin: 28px 0 22px; text-align: left; }
.cert-meta dt { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); font-weight: 600; } .cert-meta dd { margin: 3px 0 0; font-weight: 600; } .cert-meta dd.code { font-family: ui-monospace, Menlo, monospace; font-size: 20px; color: var(--accent); }
.cert-foot { font-size: 13px; color: var(--text-3); margin: 0; }
@media print { body { background: #fff; padding: 0; } .topbar, footer, .crumbs, .flash, .print { display: none !important; } .certificate { box-shadow: none; margin: 0; } }

/* admin */
.admin-grid { grid-template-columns: 1.7fr 1fr; }
table.agents td.prog { min-width: 140px; } table.agents td.prog .progress { height: 7px; margin-bottom: 4px; } table.agents tr.dim { opacity: 0.55; }
.invite-box { border-color: var(--accent-mid); background: var(--accent-ghost); margin-bottom: 22px; }
.modules-table { margin-top: 14px; } .modules-table td.num { color: var(--accent); font-weight: 600; white-space: nowrap; font-size: 13px; } .modules-table tr.ok td { background: rgba(30,122,61,0.04); } .modules-table td.act { text-align: right; white-space: nowrap; }
.events { list-style: none; padding: 0; } .events li { margin: 6px 0; font-size: 14px; color: var(--text-2); } .events .type { font-weight: 600; color: var(--text-1); }
.checklist { list-style: none; padding: 0; } .checklist li { display: flex; gap: 8px; align-items: baseline; font-size: 14px; margin: 6px 0; }
.checklist li.ok svg { color: var(--ok); } .checklist li.missing { color: var(--text-3); } .checklist .x { color: var(--err); font-weight: 700; }
.checklist.plain li::before { content: '\2610'; color: var(--text-3); }
.panel.certify.is-ready { border-color: var(--accent-mid); background: var(--accent-ghost); } .panel.certify.is-done { background: var(--ok-bg); border-color: rgba(30,122,61,0.2); } .panel.certify.is-done h2 { color: var(--ok); }

/* per-item tick-offs (module page: exercises, materials) */
.ticklist { list-style: none; padding: 0; margin: 0; counter-reset: tick; }
.ticklist li { display: flex; gap: 12px; align-items: flex-start; margin: 10px 0; color: var(--text-2); }
.ticklist li.ok { color: var(--text-3); }
.tick, button.tick { flex: 0 0 22px; width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid rgba(13,30,28,0.28); background: var(--surface-2); display: inline-grid; place-items: center; padding: 0; cursor: pointer; margin-top: 2px; color: #fff; font: inherit; }
button.tick:hover { border-color: var(--accent); background: var(--accent-ghost); }
.ticklist li.ok .tick { background: var(--ok); border-color: var(--ok); } .tick svg { width: 15px; height: 15px; }
.tick.static { cursor: default; }
ol.ticklist li > span:last-child::before { counter-increment: tick; content: counter(tick) '. '; color: var(--text-3); font-weight: 600; }
.do-panel h2 small { font-size: 13px; font-weight: 500; margin-left: 6px; }
.companion a.opened { border-color: rgba(30,122,61,0.3); background: var(--ok-bg); color: var(--ok); } .companion a.opened small { color: var(--ok); }
.doclinks { list-style: none; padding: 0; margin: 0; } .doclinks li { margin: 7px 0; font-size: 15px; }

/* admin: exercises & readings block, checklist summary */
.items-block { border-top: 1px solid var(--border); padding: 8px 0; } .items-block summary { cursor: pointer; font-weight: 600; font-size: 14.5px; } .items-block summary .num { color: var(--accent); font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.06em; margin-right: 6px; }
.checklist.items li, .checklist.sections li { align-items: center; } .checklist .box { flex: 0 0 14px; width: 14px; height: 14px; border: 1.5px solid rgba(13,30,28,0.28); border-radius: 4px; display: inline-block; }
.checklist.items li .lbl { flex: 1; } .checklist.items li form { margin-left: auto; } .checklist li.part svg { color: var(--warn); }
.checklist.sections li a { color: var(--text-1); font-weight: 500; }

/* admin: the per-agent onboarding checklist page */
.cl-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 26px; position: sticky; top: 0; background: var(--bg); padding: 10px 0; z-index: 2; border-bottom: 1px solid var(--border); }
.cl-nav a { font-size: 13px; font-weight: 600; padding: 5px 11px; border-radius: 100px; border: 1px solid var(--accent-border); background: var(--surface-2); color: var(--text-2); }
.cl-nav a:hover { text-decoration: none; background: var(--accent-ghost); } .cl-nav a.ok { background: var(--ok-bg); color: var(--ok); border-color: rgba(30,122,61,0.2); } .cl-nav a small { color: var(--text-3); margin-left: 4px; }
.cl-section { margin-bottom: 34px; scroll-margin-top: 110px; } .cl-section .doc-group { margin-top: 0; }
.cl-item { margin-top: 14px; scroll-margin-top: 110px; } .cl-item.is-done { background: var(--ok-bg); border-color: rgba(30,122,61,0.2); }
.cl-head { display: flex; gap: 14px; align-items: flex-start; }
.cl-tick { flex: 0 0 26px; width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; background: var(--surface); border: 1.5px solid rgba(13,30,28,0.2); color: #fff; margin-top: 2px; }
.cl-item.is-done .cl-tick { background: var(--ok); border-color: var(--ok); } .cl-tick svg { width: 17px; height: 17px; }
.cl-title { flex: 1; } .cl-title h3 { margin: 0 0 4px; font-size: 16.5px; line-height: 1.3; } .cl-title p { margin: 4px 0 0; }
.cl-docs { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 13.5px; font-weight: 600; }
.cl-status { flex: 0 0 auto; white-space: nowrap; }
.cl-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px 16px; margin-top: 16px; }
.cl-fields label.wide { grid-column: 1 / -1; }
.cl-fields input[type=date], .cl-fields select, .cl-fields input[type=file] { font: inherit; font-size: 15px; padding: 9px 12px; border: 1px solid rgba(13,30,28,0.18); border-radius: 10px; background: var(--surface-2); color: var(--text-1); }
.cl-fields input[type=text] { font-size: 15px; padding: 9px 12px; } .cl-fields input[readonly] { background: var(--surface); color: var(--text-2); }
.cl-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 14px; grid-column: 1 / -1; }
table.files td.act { text-align: right; white-space: nowrap; } .upload { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }

footer { margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--border); color: var(--text-3); font-size: 13.5px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

@media (max-width: 800px) {
  .hero, .two-col, .admin-grid { grid-template-columns: 1fr; } .hero { gap: 22px; }
  .pager a { max-width: 100%; } .certificate { padding: 32px 22px; }
}

/* ASIC Banned & Disqualified search inside the checklist item (app/views/_asic_bd.php) */
.bd { margin-top: 16px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.bd-head { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.bd-search { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0 4px; }
.bd-search input[type=search] { flex: 1 1 260px; min-width: 0; font: inherit; font-size: 15px; padding: 9px 12px; border: 1px solid rgba(13,30,28,0.18); border-radius: 10px; background: var(--surface-2); color: var(--text-1); }
.bd .flash { margin: 10px 0; }
table.bd-rows { font-size: 14px; margin-top: 6px; } table.bd-rows td { vertical-align: top; }
table.bd-rows tr.ended { opacity: 0.7; }
table.bd-rows details { margin-top: 4px; } table.bd-rows details p { margin: 4px 0 0; max-width: 60ch; }
