/* MaxKnowledge – change the brand colours here */
:root {
  --brand: #12395b;
  --brand-2: #1f6f8b;
  --accent: #f2a541;
  --bg: #f4f6f9;
  --card: #ffffff;
  --text: #1d2733;
  --muted: #64748b;
  --line: #e2e8f0;
  --ok: #2e7d32;
  --ok-bg: #e8f5e9;
  --warn: #a15c00;
  --warn-bg: #fff4e0;
  --bad: #b23a48;
  --bad-bg: #fdecee;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 2px 8px rgba(15, 23, 42, .05);
  --nav-w: 248px;
  --top-h: 60px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { font: 15px/1.55 "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; color: var(--text); background: var(--bg); }
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.25rem; } h3 { font-size: 1.05rem; }
img { max-width: 100%; height: auto; }
.muted { color: var(--muted); } .small { font-size: .85rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }

/* ---------- shell */
.topbar { position: fixed; top: 0; left: 0; right: 0; height: var(--top-h); background: var(--brand); color: #fff; display: flex; align-items: center; gap: 16px; padding: 0 16px; z-index: 30; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 1.1rem; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand img { width: 32px; height: 32px; }
.top-search { flex: 1; max-width: 520px; margin-left: 24px; }
.top-search input[type=search] { width: 100%; border: 0; border-radius: 20px; padding: 8px 16px; background: rgba(255,255,255,.15); color: #fff; font: inherit; }
.top-search input[type=search]::placeholder { color: rgba(255,255,255,.7); }
.top-search input[type=search]:focus { outline: 2px solid var(--accent); background: rgba(255,255,255,.25); }
.user-chip { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--brand); display: grid; place-items: center; font-weight: 700; }
.uname { display: flex; flex-direction: column; line-height: 1.2; font-size: .9rem; }
.uname small { opacity: .75; font-size: .75rem; }
.nav-toggle { display: none; background: none; border: 0; color: #fff; font-size: 1.4rem; cursor: pointer; }
.sidebar { position: fixed; top: var(--top-h); bottom: 0; left: 0; width: var(--nav-w); background: #fff; border-right: 1px solid var(--line); overflow-y: auto; padding: 12px 10px; z-index: 20; }
.nav-group { padding: 6px 0; border-bottom: 1px solid var(--line); }
.nav-group:last-child { border: 0; }
.nav-title { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 8px 12px 4px; }
.sidebar a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px; color: var(--text); font-size: .93rem; }
.sidebar a:hover { background: var(--bg); text-decoration: none; }
.sidebar a.active { background: #e6eef6; color: var(--brand); font-weight: 600; }
.ni { width: 22px; text-align: center; }
.nav-backdrop { display: none; }
.main { padding: 24px 28px 60px; max-width: 1280px; }
.has-nav .main { margin-left: var(--nav-w); margin-top: var(--top-h); }
.main.wide { max-width: none; }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .top-search { display: none; }
  .uname { display: none; }
  .sidebar { transform: translateX(-100%); transition: transform .2s; }
  .nav-open .sidebar { transform: none; }
  .nav-open .nav-backdrop { display: block; position: fixed; inset: var(--top-h) 0 0 0; background: rgba(0,0,0,.3); z-index: 15; }
  .has-nav .main { margin-left: 0; }
  .main { padding: 16px 16px 48px; }
}

/* ---------- building blocks */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { margin: 0; }
.page-head p { margin: 4px 0 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 20px; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.card.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.row { display: flex; gap: 20px; align-items: flex-start; }
.row > .grow { flex: 1; min-width: 0; }
@media (max-width: 900px) { .row { flex-direction: column; } .row > * { width: 100%; } }

.btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--brand); background: var(--brand); color: #fff; padding: 8px 16px; border-radius: 8px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { filter: brightness(1.1); text-decoration: none; }
.btn.secondary { background: #fff; color: var(--brand); }
.btn.danger { background: var(--bad); border-color: var(--bad); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--brand-2); padding: 6px 8px; }
.btn.sm { padding: 4px 10px; font-size: .85rem; }
.btn.lg { padding: 12px 24px; font-size: 1.05rem; }
.btn[disabled], .btn.disabled { opacity: .5; pointer-events: none; }
button.link { background: none; border: 0; color: var(--brand-2); cursor: pointer; font: inherit; padding: 0; }
button.link.danger { color: var(--bad); }

.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; border: 1px solid; }
.alert.success { background: var(--ok-bg); border-color: #b7dfb9; color: var(--ok); }
.alert.error { background: var(--bad-bg); border-color: #f2c2c8; color: var(--bad); }
.alert.info { background: #e8f1fb; border-color: #bcd6f2; color: var(--brand); }
.alert.warn { background: var(--warn-bg); border-color: #f5d8a5; color: var(--warn); }

.badge { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: .78rem; font-weight: 600; background: var(--bg); color: var(--muted); white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.brand { background: #e6eef6; color: var(--brand); }

.progress { height: 8px; background: var(--line); border-radius: 8px; overflow: hidden; min-width: 80px; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand-2), #2a9d8f); border-radius: 8px; }

/* ---------- forms */
label { display: block; font-weight: 600; margin: 14px 0 6px; font-size: .92rem; }
label.inline { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; margin: 8px 16px 8px 0; }
input[type=text], input[type=email], input[type=number], input[type=url], input[type=date], input[type=search], input[type=file], select, textarea {
  width: 100%; padding: 9px 12px; border: 1px solid #cbd5e1; border-radius: 8px; font: inherit; background: #fff; color: var(--text);
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid #9cc3e6; border-color: var(--brand-2); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 16px; }
.form-actions { margin-top: 20px; display: flex; gap: 10px; flex-wrap: wrap; }
.hint { font-size: .82rem; color: var(--muted); margin-top: 4px; }
.inline-form { display: inline; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 16px; }
.filters > div { min-width: 160px; }
.filters label { margin-top: 0; }

/* ---------- tables */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.data th, table.data td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
table.data th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: #f8fafc; white-space: nowrap; }
table.data tr:hover td { background: #fafcff; }
table.data td.num, table.data th.num { text-align: right; }

/* ---------- stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.stat .label { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.stat .value { font-size: 1.8rem; font-weight: 700; color: var(--brand); line-height: 1.2; margin-top: 4px; }
.stat .sub { font-size: .82rem; color: var(--muted); }
.chart-box { position: relative; height: 280px; }

/* ---------- course cards */
.cat-card { display: block; border-radius: var(--radius); padding: 18px; color: #fff; box-shadow: var(--shadow); min-height: 120px; position: relative; overflow: hidden; }
.cat-card:hover { text-decoration: none; transform: translateY(-2px); transition: transform .15s; }
.cat-card .ico { font-size: 1.8rem; }
.cat-card h3, .cat-card .count, .course-hero h1, .course-hero p, .course-hero .small { text-shadow: 0 1px 3px rgba(0,0,0,.45); }
.cat-card h3 { margin: 8px 0 2px; color: #fff; }
.cat-card .count { opacity: .85; font-size: .85rem; }
.course-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; color: var(--text); }
.course-card:hover { text-decoration: none; box-shadow: 0 4px 16px rgba(15,23,42,.1); }
.course-card .band { height: 8px; }
.course-card .band.thumb { height: 120px; }
.course-card .body { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.course-card h3 { margin: 0; }
.course-card .summary { color: var(--muted); font-size: .9rem; flex: 1; }
.course-card .meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: .82rem; color: var(--muted); }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs a { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid var(--line); color: var(--text); font-size: .9rem; }
.tabs a.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.tabs a:hover { text-decoration: none; }

/* ---------- course flow */
.course-hero { border-radius: var(--radius); padding: 28px; color: #fff; margin-bottom: 20px; }
.course-hero h1 { color: #fff; margin: 6px 0; }
.course-hero p { margin: 0; opacity: .9; }
.course-hero .progress { background: rgba(255,255,255,.3); margin-top: 16px; max-width: 360px; }
.course-hero .progress span { background: #fff; }
.outline { list-style: none; padding: 0; margin: 0; }
.outline li { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.outline li:last-child { border: 0; }
.outline .step { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--bg); font-weight: 700; flex: none; font-size: .9rem; }
.outline .done .step { background: var(--ok); color: #fff; }
.outline .current .step { background: var(--brand-2); color: #fff; }
.outline .locked { opacity: .55; }
.outline .grow { flex: 1; min-width: 0; }
.outline .sub { font-size: .82rem; color: var(--muted); }
.side-outline { width: 300px; flex: none; position: sticky; top: calc(var(--top-h) + 16px); }
@media (max-width: 900px) { .side-outline { width: 100%; position: static; } }
.content { font-size: 1rem; line-height: 1.7; overflow-wrap: anywhere; }
.content img { border-radius: 6px; }
.content table { border-collapse: collapse; }
.content td, .content th { border: 1px solid var(--line); padding: 6px 10px; }
.content blockquote { border-left: 4px solid var(--accent); margin: 1em 0; padding: 4px 16px; background: #fffaf2; }
.content iframe, .video { width: 100%; aspect-ratio: 16/9; border: 0; border-radius: 8px; height: auto; }
.content .ql-align-center { text-align: center; } .content .ql-align-right { text-align: right; } .content .ql-align-justify { text-align: justify; }
.content .ql-indent-1 { padding-left: 3em; } .content .ql-indent-2 { padding-left: 6em; }
.content li[data-list=bullet] { list-style-type: disc; }

/* ---------- quiz */
.question { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 14px; background: #fff; }
.question .qtext { font-weight: 600; margin-bottom: 10px; }
.question .qnum { color: var(--muted); font-weight: 600; margin-right: 6px; }
.option { display: flex; gap: 10px; align-items: flex-start; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; margin: 6px 0; cursor: pointer; font-weight: 400; }
.option:hover { background: #f8fafc; }
.option input { margin-top: 4px; }
.option.correct { border-color: #9fd3a3; background: var(--ok-bg); }
.option.wrong { border-color: #f2c2c8; background: var(--bad-bg); }
.question.is-correct { border-left: 4px solid var(--ok); }
.question.is-wrong { border-left: 4px solid var(--bad); }
.explanation { margin-top: 8px; font-size: .9rem; color: var(--muted); background: var(--bg); padding: 8px 12px; border-radius: 6px; }
.score-ring { width: 140px; height: 140px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 12px; font-size: 2rem; font-weight: 700; }

/* ---------- quiz editor */
.q-edit { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; background: #fcfdfe; }
.q-edit .q-top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.q-edit .q-top select, .q-edit .q-top input[type=number] { width: auto; }
.opt-row { display: flex; gap: 8px; align-items: center; margin: 6px 0; }
.opt-row input[type=text] { flex: 1; }

/* ---------- library */
.lib-layout { display: flex; gap: 20px; align-items: flex-start; }
.lib-tree { width: 270px; flex: none; position: sticky; top: calc(var(--top-h) + 16px); max-height: calc(100vh - var(--top-h) - 32px); overflow-y: auto; }
.lib-tree a { display: block; padding: 6px 10px; border-radius: 6px; color: var(--text); font-size: .92rem; }
.lib-tree a:hover { background: var(--bg); text-decoration: none; }
.lib-tree a.active { background: #e6eef6; color: var(--brand); font-weight: 600; }
.lib-main { flex: 1; min-width: 0; }
@media (max-width: 900px) { .lib-layout { flex-direction: column-reverse; } .lib-tree { width: 100%; position: static; max-height: none; } }
.big-search { display: flex; gap: 8px; margin-bottom: 20px; }
.big-search input { font-size: 1.05rem; padding: 12px 16px; }
.doc-list { list-style: none; margin: 0; padding: 0; }
.doc-item { display: flex; gap: 14px; padding: 14px 4px; border-bottom: 1px solid var(--line); }
.doc-item:last-child { border: 0; }
.doc-item .dicon { font-size: 1.8rem; line-height: 1; }
.doc-item .grow { flex: 1; min-width: 0; }
.doc-item h3 { margin: 0 0 2px; font-size: 1rem; }
.crumbs { font-size: .82rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.hit { font-size: .88rem; margin-top: 6px; padding: 6px 10px; background: #f8fafc; border-left: 3px solid var(--accent); border-radius: 4px; }
.hit a { font-weight: 600; margin-right: 6px; white-space: nowrap; }
mark { background: #ffe58a; color: inherit; padding: 0 1px; border-radius: 2px; }

/* ---------- document viewer */
.viewer-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; position: sticky; top: var(--top-h); z-index: 5; }
.viewer-bar input[type=number] { width: 70px; padding: 5px 8px; }
.viewer { background: #525659; border-radius: 0 0 var(--radius) var(--radius); padding: 16px; min-height: 70vh; overflow: auto; }
.viewer .pdf-page { position: relative; margin: 0 auto 16px; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.4); }
.viewer .pdf-page canvas { display: block; }
.viewer .doc-paper { background: #fff; max-width: 860px; margin: 0 auto; padding: 48px 56px; box-shadow: 0 2px 8px rgba(0,0,0,.4); }
@media (max-width: 700px) { .viewer { padding: 6px; } .viewer .doc-paper { padding: 20px; } }
.textLayer { position: absolute; inset: 0; overflow: hidden; line-height: 1; opacity: 1; }
.textLayer span, .textLayer br { color: transparent; position: absolute; white-space: pre; cursor: text; transform-origin: 0 0; }
.textLayer ::selection { background: rgba(0, 100, 255, .3); }
.textLayer .hl { background: rgba(255, 200, 0, .45); border-radius: 2px; }

/* ---------- login */
.no-nav { background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%); min-height: 100vh; }
.login-wrap { min-height: calc(100vh - 80px); display: grid; place-items: center; }
.login-card { background: #fff; border-radius: 16px; padding: 40px 36px; width: 100%; max-width: 420px; text-align: center; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.login-logo { width: 72px; height: 72px; }
.ms-btn { width: 100%; justify-content: center; background: #2f2f2f; border-color: #2f2f2f; padding: 12px; margin-top: 12px; }
.dev-login { margin-top: 24px; padding-top: 16px; border-top: 1px dashed var(--line); display: grid; gap: 8px; }

/* ---------- editor */
.editor-wrap { background: #fff; border-radius: 8px; }
.editor-wrap .ql-toolbar { border-radius: 8px 8px 0 0; border-color: #cbd5e1; }
.editor-wrap .ql-container { border-radius: 0 0 8px 8px; border-color: #cbd5e1; font: inherit; font-size: 1rem; }
.editor-wrap .ql-editor { min-height: 260px; line-height: 1.65; }

/* ---------- print (attendance register) */
.print-only { display: none; }
@media print {
  .topbar, .sidebar, .no-print, .nav-backdrop { display: none !important; }
  .has-nav .main { margin: 0; padding: 0; max-width: none; }
  body { background: #fff; font-size: 11pt; }
  .card { box-shadow: none; border: 0; padding: 0; }
  .print-only { display: block; }
  table.data th { background: #eee !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  table.data td, table.data th { border: 1px solid #999; padding: 6px 8px; }
  @page { size: A4 landscape; margin: 12mm; }
}
.sign-cell { min-width: 140px; }
.register-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid var(--brand); padding-bottom: 10px; margin-bottom: 14px; }
.register-head img { height: 48px; }
.signoff { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 40px; }
.signoff div { border-top: 1px solid #333; padding-top: 6px; font-size: .9rem; }

/* ---------- lesson player (same layout as the MaxProf AI Awareness course) */
.eyebrow { display: block; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--brand-2); margin-bottom: 4px; }
.module-head { margin-bottom: 14px; }
.module-head h1 { margin: 2px 0 6px; }
.lead { font-size: 1.08rem; color: #334155; max-width: 70ch; }
.lesson-steps ol { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.lesson-steps a { display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--line); background: #fff; color: var(--text); border-radius: 999px; padding: 5px 12px 5px 5px; font-size: .85rem; }
.lesson-steps a:hover { text-decoration: none; border-color: var(--brand-2); }
.lesson-steps a span { width: 22px; height: 22px; border-radius: 50%; background: var(--bg); display: grid; place-items: center; font-size: .72rem; font-weight: 700; color: var(--muted); flex: none; }
.lesson-steps a.seen span { background: var(--ok-bg); color: var(--ok); }
.lesson-steps a[aria-current="step"] { border-color: var(--brand-2); background: #e6f1f5; font-weight: 600; }
.lesson-steps a[aria-current="step"] span { background: var(--brand-2); color: #fff; }
.lesson-steps a.disabled { opacity: .5; cursor: not-allowed; }
.lesson.card { padding: clamp(18px, 3vw, 32px); }
.lesson h2 { margin-bottom: 10px; }
.pager { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 4px 0 24px; }
.pager .btn { white-space: normal; text-align: left; }
.track-box { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.track-box select { max-width: 420px; }

/* content blocks used in lessons */
.content .takeaway { background: #e6f1f5; border-left: 4px solid var(--brand-2); border-radius: 10px; padding: 14px 16px; margin: 16px 0; font-weight: 500; }
.content .example { background: #f1f5f9; border-radius: 10px; padding: 14px 16px; margin: 16px 0; }
.content .takeaway > :last-child, .content .example > :last-child { margin-bottom: 0; }
.content .note { background: var(--warn-bg); border-radius: 8px; padding: 10px 14px; }
.content .tablewrap { overflow-x: auto; margin: 12px 0; }
.content .tablewrap table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.content th { background: #f8fafc; text-align: left; }
.content ol.steps { list-style: none; counter-reset: step; padding: 0; display: grid; gap: 10px; margin: 14px 0; }
.content ol.steps li { counter-increment: step; position: relative; padding: 10px 12px 10px 48px; background: #f8fafc; border-radius: 10px; }
.content ol.steps li::before { content: counter(step); position: absolute; left: 12px; top: 10px; width: 26px; height: 26px; border-radius: 50%; background: var(--brand-2); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .85rem; }
.content ol.steps li b:first-child { display: block; }
.content details { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 12px 0; background: #fff; }
.content details summary { cursor: pointer; font-weight: 600; color: var(--brand-2); }
.content details[open] summary { margin-bottom: 8px; }
.content .practice { border: 1.5px dashed #9cc3e6; border-radius: 12px; padding: 14px 16px; margin: 16px 0; background: #fbfdff; }
.content .case, .content .prompt { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 12px 0; background: #fff; }
.content .prompt pre { white-space: pre-wrap; margin: 6px 0 0; font-size: .86rem; background: #f8fafc; padding: 10px; border-radius: 8px; }
.content .red-flag { background: #fdecee; border-bottom: 2px solid var(--bad); padding: 0 2px; }
.content .mail { border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; background: #fafafa; }

/* ---------- certificate */
.certificate { background: #fff; border: 10px double var(--brand); border-radius: 6px; max-width: 900px; margin: 0 auto; padding: 48px 40px; text-align: center; box-shadow: var(--shadow); }
.cert-logo { width: 72px; height: 72px; margin-bottom: 8px; }
.certificate .eyebrow { font-size: .9rem; letter-spacing: .2em; }
.cert-name { font-size: 2.2rem; font-weight: 700; color: var(--brand); margin: 6px 0 12px; border-bottom: 2px solid var(--accent); display: inline-block; padding: 0 24px 6px; }
.cert-course { font-size: 1.4rem; font-weight: 700; margin: 4px 0; }
.cert-meta { display: flex; justify-content: center; gap: 40px; flex-wrap: wrap; margin: 24px 0; }
.cert-meta div { display: flex; flex-direction: column; }
.cert-meta span { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.cert-meta strong { font-size: 1.1rem; }
.cert-sign { display: flex; justify-content: center; margin: 36px 0 20px; }
.cert-sign div { border-top: 1px solid #333; padding-top: 6px; min-width: 240px; }
@media print { .certificate { box-shadow: none; margin-top: 20mm; } }
.editor-mode { display: flex; gap: 4px; margin-bottom: 6px; }
.editor-mode button { border: 1px solid #cbd5e1; background: #fff; border-radius: 6px; padding: 3px 10px; font: inherit; font-size: .82rem; cursor: pointer; }
.editor-mode button.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.html-source { width: 100%; min-height: 420px; font: 13px/1.5 Consolas, "Courier New", monospace; padding: 10px; border: 1px solid #cbd5e1; border-radius: 8px; }
.content .light { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
.content .light div { border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 6px; font-size: .92rem; }
.content .light .g { background: #e8f5e9; } .content .light .g b { color: #2e7d32; }
.content .light .a { background: #fff4e0; } .content .light .a b { color: #a15c00; }
.content .light .r { background: #fdecee; } .content .light .r b { color: #b23a48; }
.content .check { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 14px 0; }
.content .check div { border: 1px solid var(--line); border-radius: 10px; padding: 12px; font-size: .88rem; display: flex; flex-direction: column; gap: 4px; }
.content .check span { font-size: 1.6rem; font-weight: 700; color: var(--brand-2); line-height: 1; }
.content .mail { line-height: 1.9; }
@media (max-width: 760px) { .content .light, .content .check { grid-template-columns: 1fr; } }
.cat-edit { border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; margin: 6px 0; background: #fff; }
.cat-edit summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; }
.cat-edit summary::-webkit-details-marker { display: none; }
.cat-swatch { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-size: .95rem; flex: none; }
.cat-look { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin-top: 6px; }
.cat-look label { margin: 0; font-size: .75rem; font-weight: 600; color: var(--muted); display: flex; flex-direction: column; gap: 2px; }
.cat-look input[type=color] { width: 100%; height: 38px; padding: 2px; border: 1px solid #cbd5e1; border-radius: 8px; }
.content figure { margin: 16px 0; }
.content figure img { display: block; width: 100%; border-radius: 12px; border: 1px solid var(--line); }
.content figcaption { font-size: .85rem; color: var(--muted); margin-top: 6px; text-align: center; }
