/* SyncMAX Cybersecurity Training — navy & gold, matches syncmax.ca */
:root {
  --navy: #1E3A6E; --night: #0A1730; --gold: #C9A227; --ink: #16233A; --soft: #55627A;
  --paper: #FFFFFF; --surface: #F4F6FA; --line: #DCE2EC; --ok: #2E9E5B; --bad: #D9534F; --warn: #B7791F;
  --f-display: "Archivo", "Arial Narrow", system-ui, sans-serif; --f-body: "Public Sans", system-ui, sans-serif; --f-mono: "IBM Plex Mono", ui-monospace, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font-family: var(--f-body); color: var(--ink); background: var(--surface); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--navy); }
h1, h2 { font-family: var(--f-display); font-stretch: 110%; line-height: 1.1; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
h2 { font-size: 1.4rem; }
p { margin: 0; }
.wrap { max-width: 1180px; margin-inline: auto; padding-inline: clamp(16px, 4vw, 40px); }
.pad { padding-block: clamp(28px, 5vw, 56px); display: grid; gap: 24px; }
.narrow { max-width: 640px; }
.muted { color: var(--soft); }
.small { font-size: .85rem; }
.block { display: block; }
.mono { font-family: var(--f-mono); font-size: .88em; }
.eyebrow { font-family: var(--f-mono); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--soft); display: inline-flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 22px; height: 5px; background: var(--gold); border-radius: 1px; }
.lede { font-size: 1.08rem; color: var(--soft); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* top bar */
.top { background: var(--night); color: #fff; position: sticky; top: 0; z-index: 10; }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.brand b { font-family: var(--f-display); font-stretch: 118%; font-size: 1.25rem; display: block; line-height: 1; }
.brand em, .cert-brand em { font-style: normal; color: var(--gold); }
.brand small { font-family: var(--f-mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: #A9B7CF; }
.mark { display: grid; gap: 3px; width: 26px; }
.mark i { display: block; height: 5px; border-radius: 1px; background: #8FA9DA; }
.mark i:nth-child(1) { width: 60%; } .mark i:nth-child(2) { background: var(--gold); } .mark i:nth-child(3) { width: 75%; margin-left: 25%; background: var(--bad); }
.top nav { display: flex; gap: 16px; align-items: center; font-size: .92rem; }
.top nav a { color: #DCE4F2; }
.top .who { color: var(--gold); font-weight: 600; }
.foot { padding-block: 24px; color: var(--soft); font-size: .85rem; }

/* buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 700; padding: 12px 20px; border-radius: 8px; border: 1.5px solid var(--navy); background: var(--navy); color: #fff; text-decoration: none; cursor: pointer; transition: transform .2s, box-shadow .2s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px -12px rgba(16,32,64,.6); }
.btn.ghost { background: transparent; color: var(--navy); }
.btn-sm { padding: 8px 14px; font-size: .88rem; }
label { display: block; font-weight: 600; font-size: .9rem; margin: 14px 0 6px; }
input, select { font: inherit; width: 100%; padding: 12px; border: 1.5px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); }
input:focus, select:focus { border-color: var(--navy); outline: none; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: clamp(20px, 3vw, 34px); box-shadow: 0 24px 48px -32px rgba(16,32,64,.35); display: grid; gap: 10px; }
.card .btn { margin-top: 12px; justify-self: start; }
.alert { background: #FDECEA; color: #8A1F17; border: 1px solid #F5C2BD; padding: 10px 14px; border-radius: 8px; }
.note-ok { background: #E7F6EE; color: #1D5E39; border: 1px solid #BFE5CF; padding: 10px 14px; border-radius: 8px; }
.inline { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.inline input { flex: 1 1 220px; width: auto; }
.inline .btn { margin-top: 0; }
.badge { display: inline-block; font-size: .76rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--surface); color: var(--soft); border: 1px solid var(--line); }
.badge.ok { background: #E7F6EE; color: #1D5E39; border-color: #BFE5CF; }
.badge.warn { background: #FFF4DE; color: #7A4E0B; border-color: #F2D9A6; }
.badge.bad { background: #FDECEA; color: #8A1F17; border-color: #F5C2BD; }
.ic { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: rgba(201,162,39,.14); color: var(--gold); flex: none; }
.ic svg { width: 22px; height: 22px; }
.ic.big { width: 64px; height: 64px; border-radius: 16px; } .ic.big svg { width: 34px; height: 34px; }

/* login */
.login-hero { background: radial-gradient(120% 140% at 100% 0%, #2C5291 0%, var(--night) 60%); color: #fff; padding-block: clamp(40px, 7vw, 90px); }
.login-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.login-copy { display: grid; gap: 18px; }
.login-copy h1 { color: #fff; font-size: clamp(2.2rem, 4.6vw, 3.6rem); }
.login-copy h1 span { color: var(--gold); }
.login-copy .eyebrow, .login-copy .lede { color: #C5D0E4; }
.course-strip { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 10px; }
.course-strip li { display: flex; align-items: center; gap: 12px; font-weight: 600; animation: slidein .6s both; }
.course-strip li:nth-child(2) { animation-delay: .08s; } .course-strip li:nth-child(3) { animation-delay: .16s; } .course-strip li:nth-child(4) { animation-delay: .24s; } .course-strip li:nth-child(5) { animation-delay: .32s; }
@keyframes slidein { from { opacity: 0; transform: translateX(-14px); } }
.login-card { color: var(--ink); }
@media (max-width: 860px) { .login-grid { grid-template-columns: 1fr; } }

/* learner home */
.name-card { max-width: 560px; margin-inline: auto; }
.welcome { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.welcome > div { display: grid; gap: 6px; }
.progress-ring, .score-ring { --p: 0; width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--gold) calc(var(--p) * 1%), var(--line) 0); flex: none; }
.progress-ring span, .score-ring span { width: 94px; height: 94px; border-radius: 50%; background: var(--paper); display: grid; place-content: center; text-align: center; }
.progress-ring b, .score-ring b { font-family: var(--f-display); font-size: 1.6rem; line-height: 1; }
.progress-ring small, .score-ring small { font-size: .74rem; color: var(--soft); }
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.course-card { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 22px; display: grid; gap: 10px; align-content: start; transition: transform .3s, box-shadow .3s, border-color .3s; }
.course-card:hover { transform: translateY(-5px); box-shadow: 0 24px 48px -30px rgba(16,32,64,.5); border-color: var(--gold); }
.course-card.is-done { border-top: 4px solid var(--ok); }
.cc-top { display: flex; justify-content: space-between; align-items: center; }
.cc-top .num { font-family: var(--f-display); font-stretch: 120%; font-weight: 800; font-size: 2rem; color: transparent; -webkit-text-stroke: 1.2px var(--line); }
.course-card p { color: var(--soft); }
.course-card .meta { font-family: var(--f-mono); font-size: .74rem; }
.cc-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 6px; flex-wrap: wrap; }

/* course */
.course-head { background: var(--night); color: #fff; padding-block: 28px 0; }
.course-head h1 { color: #fff; }
.course-head .muted, .course-head .eyebrow { color: #A9B7CF; }
.back { color: #C5D0E4; text-decoration: none; font-size: .9rem; }
.ch-row { display: flex; gap: 18px; align-items: center; margin: 14px 0 22px; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; overflow-x: auto; }
.steps li { flex: 1 0 120px; font-size: .78rem; color: #A9B7CF; padding: 10px 8px 12px; border-top: 3px solid rgba(255,255,255,.15); transition: color .3s, border-color .3s; }
.steps li.on { color: #fff; border-color: var(--gold); }
.steps li.seen { color: #DCE4F2; border-color: rgba(201,162,39,.5); }
.lesson { animation: rise .45s cubic-bezier(.2,.7,.2,1); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.points { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 10px; }
.points li { position: relative; padding: 12px 14px 12px 44px; background: var(--surface); border-radius: 10px; }
.points li::before { content: ""; position: absolute; left: 16px; top: 20px; width: 14px; height: 5px; background: var(--gold); border-radius: 1px; }
.tip { background: rgba(30,58,110,.07); border-left: 4px solid var(--navy); padding: 12px 16px; border-radius: 0 10px 10px 0; }
.tip b { display: block; font-family: var(--f-mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--navy); }
.nav-row { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.nav-row .btn { margin-top: 0; }
.q { border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin: 0; display: grid; gap: 8px; }
.q legend { font-weight: 700; padding: 0 6px; display: flex; gap: 10px; }
.q legend span { font-family: var(--f-mono); color: var(--gold); }
.opt { display: flex; gap: 12px; align-items: flex-start; margin: 0; font-weight: 500; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 8px; cursor: pointer; transition: border-color .2s, background .2s; }
.opt input { width: auto; margin-top: 4px; accent-color: var(--navy); }
.opt:has(input:checked) { border-color: var(--navy); background: rgba(30,58,110,.06); }

/* result */
.result { grid-template-columns: auto 1fr; gap: 28px; align-items: center; }
.result.pass { border-top: 5px solid var(--ok); }
.result.fail { border-top: 5px solid var(--warn); }
.result-copy { display: grid; gap: 10px; }
.score-ring { width: 150px; height: 150px; animation: rise .6s; }
.score-ring span { width: 118px; height: 118px; }
.issue-form label { margin-top: 6px; }
.section-title { font-size: 1.2rem; margin-top: 8px; }
.review { display: grid; gap: 10px; }
.rv { background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--ok); border-radius: 10px; padding: 14px 16px; display: grid; gap: 4px; }
.rv.no { border-left-color: var(--bad); }
.rv-q { font-weight: 650; display: flex; gap: 10px; } .rv-q span { font-family: var(--f-mono); color: var(--gold); }
.rv-a { font-size: .92rem; } .rv-why { font-size: .9rem; color: var(--soft); }
@media (max-width: 640px) { .result { grid-template-columns: 1fr; justify-items: start; } }

/* verify */
.verify dl { display: grid; grid-template-columns: 120px 1fr; gap: 6px 14px; margin: 8px 0 0; }
.verify dt { color: var(--soft); } .verify dd { margin: 0; font-weight: 650; }

/* admin */
.stat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 18px; display: grid; gap: 4px; }
.stat b { font-family: var(--f-display); font-stretch: 112%; font-size: 2.2rem; line-height: 1; color: var(--navy); }
.stat.gold { background: var(--night); border-color: var(--night); } .stat.gold b { color: var(--gold); } .stat.gold span { color: #C5D0E4; }
.stat span { font-size: .85rem; color: var(--soft); }
@media (max-width: 900px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
.table-wrap { overflow-x: auto; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 640px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--f-mono); font-size: .7rem; letter-spacing: .07em; text-transform: uppercase; color: var(--soft); font-weight: 500; background: var(--surface); }
tr:last-child td { border-bottom: 0; }
.r { text-align: right; font-variant-numeric: tabular-nums; }
.records-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filters select, .filters input { width: auto; flex: 1 1 180px; padding: 9px 10px; }
.filters .btn { margin: 0; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.actions form { margin: 0; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 760px) { .grid3 { grid-template-columns: 1fr; } }
.creds { border: 2px solid var(--gold); }
.creds pre { background: var(--night); color: #fff; padding: 16px; border-radius: 10px; font-family: var(--f-mono); white-space: pre-wrap; margin: 0; }
.narrow-card { max-width: 520px; }

/* certificate */
body.bare { background: #E9EDF4; }
.cert-actions { display: flex; justify-content: center; gap: 10px; padding: 20px 16px 0; flex-wrap: wrap; }
.cert-wrap { padding: 20px 16px 40px; display: grid; place-items: center; overflow-x: auto; }
.certificate { width: 1000px; max-width: 100%; aspect-ratio: 1.414 / 1; background: #fff; padding: 22px; box-shadow: 0 30px 60px -30px rgba(16,32,64,.5); position: relative; overflow: hidden; }
.certificate::before { content: ""; position: absolute; width: 380px; height: 380px; right: -140px; top: -140px; border-radius: 50%; border: 50px solid rgba(201,162,39,.12); }
.certificate::after { content: ""; position: absolute; width: 300px; height: 300px; left: -120px; bottom: -150px; border-radius: 50%; border: 40px solid rgba(30,58,110,.07); }
.cert-border { position: relative; z-index: 1; height: 100%; border: 2px solid var(--navy); outline: 1px solid var(--gold); outline-offset: -10px; padding: 4% 7%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 1.2%; }
.cert-head { display: flex; align-items: center; gap: 10px; }
.cert-head .mark i { background: var(--navy); } .cert-head .mark i:nth-child(2) { background: var(--gold); } .cert-head .mark i:nth-child(3) { background: var(--bad); }
.cert-brand { font-family: var(--f-display); font-stretch: 118%; font-weight: 800; font-size: 1.6rem; color: var(--ink); }
.cert-kicker { font-family: var(--f-display); font-stretch: 125%; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; font-size: clamp(1rem, 2.4vw, 1.7rem); color: var(--navy); margin-top: 1.5%; }
.cert-small { color: var(--soft); font-size: clamp(.8rem, 1.4vw, 1rem); }
.cert-name { font-family: "Pinyon Script", "Brush Script MT", cursive; font-size: clamp(2.2rem, 6vw, 4.2rem); line-height: 1.1; color: var(--ink); border-bottom: 1.5px solid var(--gold); padding: 0 6% .5%; }
.cert-course { font-family: var(--f-display); font-stretch: 110%; font-weight: 800; font-size: clamp(1.1rem, 2.6vw, 1.9rem); color: var(--navy); }
.cert-foot { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 6%; width: 86%; margin-top: 3%; }
.cert-foot > div { display: grid; gap: 2px; font-size: .9rem; }
.cert-foot .line { display: block; height: 1px; background: var(--ink); margin-bottom: 6px; }
.cert-foot small { color: var(--soft); }
.seal { width: 96px; height: 96px; border-radius: 50%; background: radial-gradient(circle, #E3C55A 0%, var(--gold) 60%, #9C7B12 100%); display: grid; place-items: center; box-shadow: 0 0 0 5px #fff, 0 0 0 7px var(--gold); color: #2A2208; font-family: var(--f-display); font-weight: 800; font-size: .85rem; line-height: 1.15; text-transform: uppercase; }
.cert-id { font-family: var(--f-mono); font-size: .72rem; color: var(--soft); margin-top: 2%; }
@page { size: A4 landscape; margin: 0; }
@media print {
  body.bare { background: #fff; }
  .no-print, .foot { display: none !important; }
  .cert-wrap { padding: 0; }
  .certificate { width: 297mm; height: 210mm; max-width: none; aspect-ratio: auto; box-shadow: none; padding: 10mm; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 820px) { .two-col { grid-template-columns: 1fr; } }
textarea { font: inherit; width: 100%; padding: 12px; border: 1.5px solid var(--line); border-radius: 8px; resize: vertical; }
.mini-bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; margin-bottom: 4px; min-width: 70px; }
.mini-bar span { display: block; height: 100%; background: var(--gold); }
.rename { display: inline-block; }
.rename summary { list-style: none; }
.rename summary::-webkit-details-marker { display: none; }
.rename form { display: flex; gap: 6px; margin-top: 6px; }
.rename input { padding: 6px 8px; width: 170px; }
.stat-grid { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 1000px) { .stat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
