@font-face {
  font-family: "GE Inspira";
  src: url("/static/fonts/GEInspira.ttf") format("truetype");
  font-display: swap;
}

:root {
  --enx-blue: #003366;
  --enx-blue-2: #1a4d8c;
  --enx-red: #c8102e;
  --enx-grey-50: #f7f8fa;
  --enx-grey-100: #eef0f4;
  --enx-grey-300: #c9cfd9;
  --enx-grey-600: #5a6273;
  --enx-grey-800: #1f2532;
  --enx-green: #1e7d44;
  --enx-amber: #c98a00;
  --enx-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "GE Inspira", "Helvetica Neue", Arial, sans-serif;
  background: var(--enx-grey-50);
  color: var(--enx-grey-800);
  line-height: 1.55;
}

a { color: var(--enx-blue); }
a:hover { color: var(--enx-red); }

header.topbar {
  background: var(--enx-blue);
  color: #fff;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--enx-shadow);
}
header.topbar .brand {
  display: flex; align-items: center; gap: 12px;
  color: #fff; text-decoration: none; font-size: 20px; letter-spacing: 1px;
}
header.topbar .brand img { height: 32px; }
header.topbar nav a {
  color: #fff; margin-left: 18px; text-decoration: none; opacity: 0.85;
}
header.topbar nav a:hover { opacity: 1; }

main {
  max-width: 980px;
  margin: 32px auto;
  padding: 0 24px;
}

.card {
  background: #fff;
  border: 1px solid var(--enx-grey-100);
  border-radius: 10px;
  padding: 28px 32px;
  box-shadow: var(--enx-shadow);
  margin-bottom: 24px;
}

h1, h2, h3 { color: var(--enx-blue); margin-top: 0; }
h1 { font-size: 32px; }
h2 { font-size: 24px; }
h3 { font-size: 18px; }

.subtle { color: var(--enx-grey-600); }

.btn {
  display: inline-block;
  background: var(--enx-blue);
  color: #fff;
  padding: 10px 22px;
  border-radius: 6px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  transition: background 0.15s;
}
.btn:hover { background: var(--enx-blue-2); color: #fff; }
.btn.secondary { background: #fff; color: var(--enx-blue); border: 1px solid var(--enx-blue); }
.btn.secondary:hover { background: var(--enx-grey-100); }
.btn.danger { background: var(--enx-red); }
.btn.success { background: var(--enx-green); }
.btn.lg { font-size: 17px; padding: 13px 28px; }

input[type=text], input[type=email], input[type=password], select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--enx-grey-300);
  border-radius: 6px;
  font-family: inherit;
  font-size: 15px;
  background: #fff;
}
label { font-size: 14px; color: var(--enx-grey-600); display: block; margin: 12px 0 6px; }

.flash { padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; }
.flash.error { background: #fde7e9; color: #8b0d20; border: 1px solid #f5c2c8; }
.flash.success { background: #e2f5ea; color: #1e6c3b; border: 1px solid #b7e0c4; }

/* progress bar */
.progress-bar {
  background: var(--enx-grey-100);
  border-radius: 999px;
  overflow: hidden;
  height: 10px;
  margin: 6px 0;
}
.progress-bar > span {
  display: block; height: 100%; background: var(--enx-blue);
  transition: width 0.3s;
}

/* module list */
.module-list { list-style: none; padding: 0; margin: 0; }
.module-list li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px; border: 1px solid var(--enx-grey-100); border-radius: 8px;
  margin-bottom: 10px; background: #fff; transition: transform 0.1s;
}
.module-list li:hover { transform: translateX(2px); border-color: var(--enx-blue); }
.module-list .left { display: flex; align-items: center; gap: 14px; }
.module-list .num {
  background: var(--enx-blue); color: #fff; font-weight: 700;
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
}
.module-list .num.done { background: var(--enx-green); }
.module-list .meta { font-size: 13px; color: var(--enx-grey-600); }

/* module body */
.module-body {
  font-size: 16px; line-height: 1.7;
}
.module-body img { max-width: 100%; height: auto; border-radius: 6px; }
.module-body table { border-collapse: collapse; width: 100%; margin: 14px 0; }
.module-body th, .module-body td { border: 1px solid var(--enx-grey-300); padding: 8px 12px; text-align: left; }
.module-body th { background: var(--enx-grey-100); }
.module-body code { background: var(--enx-grey-100); padding: 2px 6px; border-radius: 4px; font-size: 0.92em; }
.module-body pre { background: var(--enx-grey-800); color: #e6e9ef; padding: 14px; border-radius: 6px; overflow-x: auto; }
.module-body blockquote { border-left: 4px solid var(--enx-blue); margin-left: 0; padding-left: 14px; color: var(--enx-grey-600); }

/* quiz */
.quiz-question {
  border: 1px solid var(--enx-grey-100); border-radius: 8px;
  padding: 18px; margin-bottom: 14px; background: #fff;
}
.quiz-question .qprompt { font-weight: 600; margin-bottom: 12px; }
.quiz-question label { display: block; padding: 8px 10px; border-radius: 5px; cursor: pointer; color: var(--enx-grey-800); margin: 4px 0; }
.quiz-question label:hover { background: var(--enx-grey-100); }
.quiz-question input[type=radio], .quiz-question input[type=checkbox] { margin-right: 8px; }

.match-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; margin: 6px 0; }
.match-row select { width: 100%; }

/* result */
.result-summary {
  text-align: center; padding: 28px;
  border-radius: 10px; margin-bottom: 18px;
}
.result-summary.pass { background: #e2f5ea; color: var(--enx-green); }
.result-summary.fail { background: #fde7e9; color: var(--enx-red); }
.result-summary .big { font-size: 48px; font-weight: 700; }

.q-feedback { padding: 14px; border-radius: 8px; margin-bottom: 10px; border-left: 4px solid; }
.q-feedback.ok { background: #f1faf4; border-left-color: var(--enx-green); }
.q-feedback.bad { background: #fff3f4; border-left-color: var(--enx-red); }

/* admin */
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { padding: 10px 12px; border-bottom: 1px solid var(--enx-grey-100); text-align: left; }
.admin-table th { background: var(--enx-blue); color: #fff; }
.admin-table tr:hover { background: var(--enx-grey-50); }

footer {
  text-align: center; color: var(--enx-grey-600);
  font-size: 13px; padding: 22px 0 30px;
}
