
:root {
  --orange: #FF4600;     /* Signal Orange: buttons, rules, icons, chart highlights */
  --ember: #B83200;      /* orange for small text and links on light backgrounds */
  --charcoal: #1E1F22;   /* body text, dark bands, logo ground */
  --paper: #F7F6F3;      /* page background */
  --silver: #E0E0E0;     /* light text on charcoal, table stripes */
  --steel: #CCCCCC;      /* borders and dividers */
  --pewter: #AEAEAE;     /* secondary text on charcoal */
  --graphite: #5C5D61;   /* secondary text on paper/white */
  --white: #FFFFFF;
  --tint: #FFF1EA;       /* faint orange wash for callouts */
  --on-accent: #1E1F22;  /* text on accent; client accents may switch this to white */

  /* Status: reserved, always shown with an icon + label */
  --good: #1E6B3A;  --good-bg: #E6F2EA;
  --warn: #8A5300;  --warn-bg: #FBF0DD;
  --bad:  #B42318;  --bad-bg:  #FBEAE8;
  --idle: #5C5D61;  --idle-bg: #ECEBE7;

  --radius: 4px;
  --sans: "Manrope", "Segoe UI", Arial, sans-serif;
  --mono: "DM Mono", ui-monospace, Consolas, monospace;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: var(--sans); font-size: 16px; background: var(--paper); color: var(--charcoal); line-height: 1.6; display: flex; flex-direction: column; min-height: 100vh; }
a { color: var(--ember); text-underline-offset: 2px; }
a:hover { color: var(--charcoal); }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
h1, h2, h3 { font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
h1 { font-size: 2rem; margin: 0 0 .35rem; }
h2 { font-size: 1.3rem; margin: 2rem 0 .85rem; }
h3 { font-size: 1.1rem; font-weight: 700; margin: 0 0 .5rem; }
.muted { color: var(--graphite); }
.small { font-size: .875rem; }
.eyebrow { font-family: var(--mono); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--ember); margin-bottom: .35rem; }
code, kbd, pre.mono { font-family: var(--mono); }

/* Charcoal band: logo + nav. One angled orange cut echoes the mark. */
header.top { background: var(--charcoal); color: var(--silver); position: relative; }
header.top::after { content: ""; position: absolute; left: 0; bottom: 0; width: min(240px, 40vw); height: 4px; background: var(--orange); clip-path: polygon(0 0, 100% 0, calc(100% - 6px) 100%, 0 100%); }
header.top .inner { max-width: 1180px; margin: 0 auto; padding: .85rem 1.25rem 0; display: flex; align-items: center; gap: .5rem 1.25rem; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: .75rem; color: var(--silver); text-decoration: none; }
.logo:hover { color: var(--white); }
.logo img { width: 40px; height: 40px; }
.logo .word { font-weight: 800; letter-spacing: -0.02em; font-size: 1.05rem; line-height: 1.1; }
.logo small { display: block; font-family: var(--mono); font-weight: 400; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--pewter); margin-top: 3px; }
/* Nav gets its own row under the logos so client branding never crowds it */
nav.main { order: 3; flex-basis: 100%; display: flex; gap: .15rem; flex-wrap: wrap; margin: 0 -.7rem; padding-bottom: .35rem; }
nav.main a { color: var(--pewter); text-decoration: none; padding: .55rem .7rem; border-radius: var(--radius); font-size: .92rem; font-weight: 600; }
nav.main a:hover { color: var(--white); }
nav.main a.active { color: var(--white); box-shadow: inset 0 -2px 0 var(--orange); border-radius: 0; }
.clientmark { display: flex; align-items: center; padding-left: 1.25rem; border-left: 1px solid var(--graphite); }
.clientmark img { height: 32px; max-width: 140px; object-fit: contain; background: var(--white); border-radius: var(--radius); padding: 4px 8px; }
.clientmark span { color: var(--silver); font-weight: 700; font-size: .92rem; }
.userbox { margin-left: auto; display: flex; align-items: center; gap: .75rem; font-size: .88rem; color: var(--silver); }
.userbox form { margin: 0; }
.userbox button { background: transparent; border: 1px solid var(--graphite); color: var(--silver); padding: .3rem .75rem; border-radius: var(--radius); cursor: pointer; font: inherit; font-size: .85rem; }
.userbox button:hover { border-color: var(--pewter); color: var(--white); }

.scopebar { background: var(--white); border-bottom: 1px solid var(--steel); font-size: .88rem; }
.scopebar .inner { max-width: 1180px; margin: 0 auto; padding: .5rem 1.25rem; display: flex; gap: 1rem; align-items: center; }
.devbar { background: var(--tint); border-bottom: 1px solid #F5CDB8; font-size: .82rem; color: var(--charcoal); }
.devbar .inner { max-width: 1180px; margin: 0 auto; padding: .4rem 1.25rem; }
.devbar b { font-family: var(--mono); font-weight: 500; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ember); margin-right: .5rem; }

main { max-width: 1180px; width: 100%; margin: 0 auto; padding: 2.25rem 1.25rem 4rem; flex: 1; }
.pagehead { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.pagehead p { margin: 0; }
.pagehead .actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.pagehead .actions form { margin: 0; }

footer.bottom { background: var(--charcoal); color: var(--pewter); font-size: .85rem; }
footer.bottom .inner { max-width: 1180px; margin: 0 auto; padding: 1.25rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
footer.bottom a { color: var(--silver); }
footer.bottom .mono { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }

.card { background: var(--white); border: 1px solid var(--steel); border-radius: var(--radius); padding: 1.25rem; }
.grid { display: grid; gap: 1rem; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.tile .label { font-family: var(--mono); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--graphite); }
.tile .value { font-family: var(--mono); font-size: 2.1rem; font-weight: 500; line-height: 1.25; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; margin-top: .25rem; }
.tile .sub { color: var(--graphite); font-size: .85rem; }

/* Buttons: charcoal on Signal Orange (4.8:1). White on orange fails contrast. */
.btn { display: inline-flex; align-items: center; gap: .4rem; background: var(--orange); color: var(--on-accent); border: 1px solid var(--orange); padding: .55rem 1.05rem; border-radius: var(--radius); font: inherit; font-weight: 700; font-size: .92rem; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { filter: brightness(1.07); color: var(--on-accent); }
.btn.secondary { background: var(--white); color: var(--charcoal); border-color: var(--steel); }
.btn.secondary:hover { border-color: var(--charcoal); }
.btn.small { padding: .3rem .7rem; font-size: .82rem; }
.btn.danger { background: var(--white); color: var(--bad); border-color: var(--steel); }
.btn.block { width: 100%; justify-content: center; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

form.stack { display: grid; gap: 1rem; }
label { font-weight: 600; font-size: .9rem; display: block; }
label .hint { font-weight: 400; color: var(--graphite); font-size: .82rem; }
input[type=text], input[type=email], input[type=date], input[type=number], select, textarea {
  width: 100%; padding: .55rem .7rem; border: 1px solid var(--steel); border-radius: var(--radius); font: inherit; font-weight: 400; background: var(--white); color: var(--charcoal); margin-top: .3rem; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--orange); outline-offset: 0; border-color: var(--orange); }
input[type=checkbox], input[type=radio] { accent-color: var(--orange); }
textarea { min-height: 110px; font-family: var(--mono); font-size: .85rem; }
.check { display: flex; gap: .5rem; align-items: center; font-weight: 400; }
.row { display: flex; gap: .75rem; flex-wrap: wrap; align-items: end; }
.row > * { flex: 1; min-width: 160px; }

table { width: 100%; border-collapse: collapse; background: var(--white); font-size: .9rem; }
th, td { text-align: left; padding: .65rem .8rem; border-bottom: 1px solid var(--silver); vertical-align: middle; }
th { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--graphite); font-weight: 500; background: var(--white); border-bottom: 1px solid var(--charcoal); }
tbody tr:hover { background: #FBFAF8; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.num { font-family: var(--mono); font-size: .85rem; }
/* Keep orange scarce: table links read as charcoal until hovered. */
td a { color: var(--charcoal); font-weight: 600; text-decoration: none; }
td a:hover { color: var(--ember); text-decoration: underline; }
.tablewrap { border: 1px solid var(--steel); border-radius: var(--radius); overflow: auto; }

.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .12rem .5rem; border-radius: var(--radius); font-size: .78rem; font-weight: 700; white-space: nowrap; }
.badge.completed { color: var(--good); background: var(--good-bg); }
.badge.overdue { color: var(--bad); background: var(--bad-bg); }
.badge.in_progress { color: var(--warn); background: var(--warn-bg); }
.badge.not_started { color: var(--idle); background: var(--idle-bg); }
.badge.tag { color: var(--graphite); background: var(--white); border: 1px solid var(--steel); font-family: var(--mono); font-weight: 500; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.badge.req { color: var(--silver); background: var(--charcoal); font-family: var(--mono); font-weight: 500; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }

.meter { display: flex; align-items: center; gap: .6rem; }
.meter .track { flex: 1; height: 8px; border-radius: 4px; background: var(--idle-bg); overflow: hidden; min-width: 80px; }
.meter .fill { height: 100%; background: var(--orange); border-radius: 4px; }
.meter .val { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: .82rem; min-width: 3.2em; text-align: right; }

/* Users grouped by department */
.dept-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: -.5rem 0 1.25rem; }
.dept-chips a { font-size: .85rem; font-weight: 600; color: var(--charcoal); text-decoration: none; border: 1px solid var(--steel); background: var(--white); border-radius: var(--radius); padding: .25rem .6rem; }
.dept-chips a:hover { border-color: var(--charcoal); }
.dept-chips span { font-family: var(--mono); font-weight: 500; color: var(--graphite); margin-left: .25rem; }
.dept-group { margin-bottom: 1.75rem; scroll-margin-top: 1rem; }
.dept-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: .6rem; padding-top: .9rem; border-top: 3px solid var(--orange); }
.dept-head h2 { margin: 0 0 .15rem; }
.dept-head .actions { display: flex; gap: .5rem; flex-wrap: wrap; }
details.dept-group summary { cursor: pointer; font-weight: 600; }
.who > .check { margin-top: .75rem; }
.who .pick { margin: .35rem 0 0 1.6rem; padding: .5rem; border: 1px solid var(--steel); border-radius: var(--radius); }

/* Setup guide for client IT admins */
.guide { max-width: 860px; }
.guide-pick { display: flex; flex-direction: column; gap: .4rem; text-decoration: none; color: inherit; }
.guide-pick:hover { border-color: var(--charcoal); }
.guide-pick h3 { margin: 0; }
.guide-pick p { margin: 0 0 .5rem; }
.guide-pick .btn { align-self: flex-start; }
ol.guide-steps { list-style: none; counter-reset: step; padding: 0; margin: 1.5rem 0; }
ol.guide-steps > li { counter-increment: step; position: relative; padding: 0 0 1.5rem 3.25rem; margin: 0; border-left: 2px solid var(--steel); margin-left: 1rem; padding-left: 2.25rem; }
ol.guide-steps > li:last-child { border-left-color: transparent; }
ol.guide-steps > li::before { content: counter(step); position: absolute; left: -1.05rem; top: -.1rem; width: 2rem; height: 2rem; border-radius: 50%; background: var(--charcoal); color: var(--white); font-family: var(--mono); font-weight: 500; display: grid; place-items: center; }
ol.guide-steps h3 { margin: .15rem 0 .5rem; }
ol.guide-steps p, ol.guide-steps li li { line-height: 1.6; }
ol.guide-steps ol, ol.guide-steps ul { padding-left: 1.2rem; }
dl.faq dt { font-weight: 700; margin-top: 1rem; }
dl.faq dd { margin: .25rem 0 0; color: var(--graphite); }

/* Client form: sign-in method choices reveal their own settings */
.form-section { padding: 1.25rem 0; border-top: 1px solid var(--silver); }
.form-section:first-of-type { border-top: 0; padding-top: 0; }
.form-section > h3 { margin: 0 0 .25rem; }
.form-section > .lead { margin: 0 0 1rem; color: var(--graphite); font-size: .9rem; }
.methods { display: grid; gap: .6rem; }
.method { border: 1px solid var(--steel); border-radius: var(--radius); padding: .85rem 1rem; background: var(--white); }
.method:has(> .check input:checked) { border-color: var(--charcoal); }
.method > .check { font-weight: 700; align-items: flex-start; }
.method > .check input { margin-top: .25rem; }
.method .desc { display: block; font-weight: 400; color: var(--graphite); font-size: .88rem; margin-top: .1rem; }
.method .extra { margin: .85rem 0 0 1.6rem; display: grid; gap: .35rem; }
.method:has(> .check input:not(:checked)) .extra { display: none; }
.hint { font-weight: 400; color: var(--graphite); font-size: .82rem; }
.chip { display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem; padding: .1rem .45rem; border-radius: var(--radius); border: 1px solid var(--steel); background: var(--white); margin: 0 .25rem .25rem 0; white-space: nowrap; }
.chip.warn { border-color: #E8C58C; background: var(--warn-bg); color: var(--warn); }

.flash { padding: .75rem 1rem; border-radius: var(--radius); margin-bottom: 1.25rem; background: var(--good-bg); color: var(--good); border: 1px solid #BFDCC8; font-weight: 600; }
.flash.err { background: var(--bad-bg); color: var(--bad); border-color: #F0C2BD; }

.course { display: flex; flex-direction: column; gap: .55rem; }
.course .meta { display: flex; gap: .4rem; flex-wrap: wrap; }
.course p { margin: 0; color: var(--graphite); font-size: .92rem; flex: 1; }
.course .foot { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-top: .5rem; padding-top: .75rem; border-top: 1px solid var(--silver); }

.lesson { max-width: 780px; margin: 0 auto; }
.lesson .content { font-size: 17px; line-height: 1.65; }
.lesson .content li { margin: .35rem 0; }
.callout { background: var(--tint); border-left: 3px solid var(--orange); padding: .85rem 1.1rem; border-radius: 0 var(--radius) var(--radius) 0; margin: 1.25rem 0; }
.scenario { background: var(--paper); border: 1px solid var(--steel); padding: .9rem 1.1rem; border-radius: var(--radius); margin: 1.25rem 0; }
kbd { background: var(--paper); border: 1px solid var(--steel); border-radius: 3px; padding: 0 .3rem; font-size: .85em; }
.steps { display: flex; gap: 4px; margin: .75rem 0 1.25rem; }
.steps span { flex: 1; height: 4px; border-radius: 2px; background: var(--steel); }
.steps span.done { background: var(--orange); }
.lesson-nav { display: flex; justify-content: space-between; margin-top: 2rem; }
/* Minimum reading time: Next stays quiet until the slide has had its time, with a thin bar filling along the bottom */
.btn.locked { background: var(--white); color: var(--graphite); border-color: var(--steel); cursor: default; position: relative; overflow: hidden; }
.btn.locked:hover { filter: none; color: var(--graphite); }
.btn.locked::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: var(--fill, 0%); background: var(--orange); transition: width .25s linear; }
.btn .t { font-family: var(--mono); font-weight: 500; font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.q { margin-bottom: 1.25rem; }
.q legend { font-weight: 700; margin-bottom: .5rem; }
.q fieldset { border: 0; padding: 0; margin: 0; }
.q .opt { display: flex; gap: .6rem; align-items: flex-start; padding: .6rem .8rem; border: 1px solid var(--steel); border-radius: var(--radius); margin: .35rem 0; font-weight: 400; cursor: pointer; }
.q .opt:hover { border-color: var(--charcoal); }
.q .opt:has(input:checked) { border-color: var(--orange); background: var(--tint); }
.q .opt.right { border-color: var(--good); background: var(--good-bg); }
.q .opt.wrong { border-color: var(--bad); background: var(--bad-bg); }
.q .explain { font-size: .9rem; color: var(--graphite); margin-top: .4rem; }

.result-hero { text-align: center; padding: 2rem 1rem; }
.result-hero .score { font-family: var(--mono); font-size: 3.75rem; font-weight: 500; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; margin: .5rem 0; }

/* Sign-in: charcoal stage for the mark, then a light card. */
.login { max-width: 440px; margin: 0 auto; }
.login-hero { background: var(--charcoal); color: var(--silver); border-radius: var(--radius) var(--radius) 0 0; padding: 2rem 1.5rem 1.5rem; text-align: center; position: relative; }
.login-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--orange); }
.login-hero img { width: 72px; height: 72px; }
.login-hero h1 { color: var(--white); font-size: 1.5rem; margin: .75rem 0 .2rem; }
.login-hero p { color: var(--pewter); margin: 0; font-size: .92rem; }
.login .card.attached { border-top: 0; border-radius: 0 0 var(--radius) var(--radius); }
.divider { display: flex; align-items: center; gap: .75rem; color: var(--graphite); font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; margin: 1.25rem 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--steel); }
.sso { display: grid; gap: .6rem; }
.sso svg { width: 18px; height: 18px; }

.cert { background: var(--white); max-width: 900px; margin: 0 auto; border: 1px solid var(--steel); text-align: center; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.cert .band { background: var(--charcoal); color: var(--silver); padding: 1.75rem; display: flex; align-items: center; justify-content: center; gap: 1rem; position: relative; }
.cert .band::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--orange); }
.cert .band img { width: 64px; height: 64px; }
.cert .band .word { font-weight: 800; font-size: 1.3rem; letter-spacing: -0.02em; text-align: left; }
.cert .band small { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--pewter); font-weight: 400; }
.cert .body { padding: 2.5rem 3rem 3rem; }
.cert h1 { font-size: 2.4rem; }
.cert .name { font-size: 2rem; font-weight: 800; letter-spacing: -0.02em; margin: 1rem 0; border-bottom: 1px solid var(--charcoal); display: inline-block; padding: 0 2rem .35rem; }
.cert .cert-client { max-height: 56px; max-width: 220px; object-fit: contain; margin: .25rem 0 .5rem; }
.logo-preview { min-height: 72px; display: flex; align-items: center; padding: 1rem; background: var(--paper); border: 1px dashed var(--steel); border-radius: var(--radius); }
.logo-preview img { max-height: 64px; max-width: 100%; }
.cert .meta { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--graphite); }
@media print {
  header.top, .scopebar, .devbar, footer.bottom, .noprint { display: none !important; }
  main { padding: 0; } body { background: #fff; }
}
