:root {
  --navy: #071c33;
  --blue: #0b67e3;
  --cyan: #18c2d9;
  --ice: #eef7fb;
  --ink: #10243a;
  --muted: #607286;
  --line: #d7e2ea;
  --white: #fff;
}

.training-profile { margin: 28px auto; max-width: 1180px; padding: 28px; border-radius: 24px; background: #fff; box-shadow: 0 12px 35px rgba(15,23,42,.08); display: grid; gap: 22px; grid-template-columns: 1fr 1.4fr; }
.training-profile h2 { margin: 6px 0 8px; }
.training-profile p { margin: 0; line-height: 1.6; }
.training-profile-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: end; }
.training-profile-form label { font-weight: 700; }
.training-profile-form input { display: block; width: 100%; margin-top: 7px; border: 1px solid #cbd5e1; border-radius: 12px; padding: 12px; font: inherit; }
.training-profile-form .primary { border: 0; cursor: pointer; }
#trainingProfileStatus { align-self: center; font-weight: 700; color: #166534; }
.quiz-link { display: inline-block; width: auto; text-decoration: none; }
.quiz-link.locked { background: #cbd5e1; color: #475569; cursor: not-allowed; }
@media (max-width: 700px) { .training-profile { grid-template-columns: 1fr; margin: 18px 14px; } .training-profile-form { grid-template-columns: 1fr; } }

body.credential-gate main { min-height: calc(100vh - 86px); display: grid; place-items: center; padding: 24px; background: linear-gradient(145deg, #071c33, #123f67); }
body.credential-gate main > section:not(.training-profile),
body.credential-gate footer,
body.credential-gate .mobile-course-nav { display: none !important; }
body.credential-gate .training-profile { width: min(900px, 100%); margin: 0; }

body.guided-course { padding-bottom: 92px; background: #f5f9fc; }
body.guided-course main > section:not(.guided-parent),
body.guided-course footer,
body.guided-course .mobile-course-nav { display: none !important; }
body.guided-course main > section.guided-parent { display: block !important; margin-top: 0; }
body.guided-course .equipment-lesson:not(.guided-active),
body.guided-course .paperwork-lesson:not(.guided-active),
body.guided-course .module:not(.guided-active) { display: none !important; }
body.guided-course .welcome-course .response-standard,
body.guided-course .equipment-course > .course-intro,
body.guided-course .equipment-course > .course-rule,
body.guided-course .paperwork-course > .paperwork-intro,
body.guided-course #path > .section-head { display: none !important; }
body.guided-course .guided-active { display: block !important; }
body.guided-course .equipment-lesson.guided-active .equipment-body,
body.guided-course .paperwork-lesson.guided-active .paperwork-body,
body.guided-course .module.guided-active .module-body { display: block; }
body.guided-course .module-grid { grid-template-columns: 1fr; }
body.guided-course .quiz-gate { max-width: 900px; margin: 38px auto !important; }

.guided-nav { position: fixed; z-index: 80; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: minmax(90px,1fr) minmax(160px,2fr) minmax(90px,1fr); align-items: center; gap: 14px; padding: 12px max(18px, calc((100vw - 1100px)/2)); background: #fff; border-top: 1px solid #dbe4ec; box-shadow: 0 -10px 30px rgba(7,28,51,.12); }
.guided-nav[hidden] { display: none !important; }
.guided-nav div { display: grid; text-align: center; }
.guided-nav span { color: #64748b; font-size: 13px; }
.guided-nav button { min-height: 48px; border: 0; border-radius: 999px; padding: 10px 18px; background: #0b3154; color: #fff; font: inherit; font-weight: 800; cursor: pointer; }
.guided-nav button:disabled { background: #d8e0e7; color: #718096; cursor: not-allowed; }

body.reference-mode .training-profile,
body.reference-mode #final-quiz,
body.reference-mode #legacy-final-quiz,
body.reference-mode a[href="#final-quiz"],
body.reference-mode [data-mobile-target="final-quiz"],
body.reference-mode .guided-nav,
body.reference-mode .equipment-complete,
body.reference-mode .paperwork-complete,
body.reference-mode .complete,
body.reference-mode .welcome-complete { display: none !important; }

@media (max-width: 700px) {
  body.credential-gate main { padding: 16px; }
  body.credential-gate .training-profile { margin: 0; padding: 22px 18px; }
  body.guided-course .mobile-course-home { display: none !important; }
  body.guided-course .course-intro, body.guided-course .section-head { padding-left: 18px; padding-right: 18px; }
  .guided-nav { grid-template-columns: 86px 1fr 86px; gap: 8px; padding: 9px 10px calc(9px + env(safe-area-inset-bottom)); }
  .guided-nav button { min-height: 44px; padding: 8px 10px; font-size: 14px; }
  .guided-nav strong { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  background: #f8fbfd;
  font-size: 16px;
}
.topbar {
  height: 82px;
  padding: 0 clamp(22px, 5vw, 76px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--navy);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.brandmark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #fff;
  background: var(--blue);
  border-radius: 8px;
  font-size: 15px;
}
.brand small {
  display: block;
  color: #708298;
  font-size: 9px;
  letter-spacing: 0.18em;
  margin-top: 3px;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}
.admin-login {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0 17px;
  border: 1px solid var(--blue);
  border-radius: 999px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}
.admin-login:hover,
.admin-login:focus-visible {
  background: var(--blue);
  color: var(--white);
}
.progress-wrap {
  width: 190px;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}
.progress {
  height: 5px;
  background: #e7eef3;
  border-radius: 8px;
  margin-top: 7px;
  overflow: hidden;
}
.progress i {
  display: block;
  width: 0;
  height: 100%;
  background: var(--cyan);
  transition: 0.3s;
}
.hero {
  min-height: 550px;
  padding: 88px clamp(22px, 7vw, 110px);
  background:
    radial-gradient(circle at 72% 25%, #124c78 0, transparent 32%),
    linear-gradient(125deg, #06182c, #0b3152);
  color: #fff;
  display: grid;
  grid-template-columns: 1.4fr 0.7fr;
  gap: 80px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.hero:after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  border: 1px solid #ffffff24;
  border-radius: 50%;
  right: -170px;
  bottom: -170px;
  box-shadow:
    0 0 0 70px #ffffff08,
    0 0 0 140px #ffffff05;
}
.eyebrow {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--cyan);
  margin: 0 0 18px;
}
.hero h1 {
  font-size: clamp(50px, 7vw, 88px);
  line-height: 0.94;
  letter-spacing: -0.055em;
  margin: 0;
  max-width: 770px;
}
.hero h1 em {
  font-style: normal;
  color: #78e1ed;
}
.lead {
  max-width: 610px;
  font-size: 20px;
  line-height: 1.6;
  color: #cbd9e5;
  margin: 28px 0 34px;
}
.primary,
.secondary {
  display: inline-flex;
  align-items: center;
  gap: 35px;
  padding: 16px 20px;
  background: var(--blue);
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 700;
}
.primary span {
  font-size: 22px;
}
.today-card {
  background: #ffffff0d;
  border: 1px solid #ffffff2e;
  border-radius: 16px;
  padding: 32px;
  backdrop-filter: blur(10px);
  position: relative;
  z-index: 1;
}
.today-card .status {
  font-size: 11px;
  letter-spacing: 0.15em;
  color: #76dce8;
}
.today-card strong {
  display: block;
  font-size: 28px;
  margin: 22px 0 9px;
}
.today-card p {
  line-height: 1.6;
  color: #cbd9e5;
}
.steps {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 35px;
}
.steps b {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid #ffffff52;
  border-radius: 50%;
}
.steps i {
  height: 1px;
  background: #ffffff52;
  flex: 1;
}
.quick {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: #fff;
  padding: 34px clamp(22px, 7vw, 110px);
  border-bottom: 1px solid var(--line);
}
.driveway-preview {
  padding: 34px clamp(22px, 7vw, 110px);
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.driveway-preview-head {
  max-width: 1500px;
  margin: 0 auto 20px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}
.driveway-preview h2 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(28px, 3vw, 42px);
  letter-spacing: -0.035em;
}
.driveway-preview-grid {
  max-width: 1500px;
  margin: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.driveway-preview-grid article {
  padding: 20px;
  background: #f4f8fb;
  border-left: 4px solid var(--cyan);
  border-radius: 8px;
}
.driveway-preview-grid article > span {
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
}
.driveway-preview-grid ul {
  margin: 12px 0 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.5;
}
.dual-checklists {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.checklist h3 {
  margin: 0 0 8px;
  color: #fff;
}
.quick > div {
  display: flex;
  gap: 18px;
  padding: 10px 34px;
  border-right: 1px solid var(--line);
}
.quick > div:first-child {
  padding-left: 0;
}
.quick > div:last-child {
  border: 0;
}
.quick span {
  color: var(--blue);
  font-weight: 800;
}
.quick p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}
.quick b {
  display: block;
  color: var(--ink);
  margin-bottom: 5px;
}
.training {
  padding: 90px clamp(22px, 7vw, 110px);
  max-width: 1500px;
  margin: auto;
}
.section-head {
  display: flex;
  justify-content: space-between;
  gap: 50px;
  align-items: end;
  margin-bottom: 42px;
}
.section-head h2,
.field-guide h2,
.help h2 {
  font-size: clamp(34px, 4vw, 55px);
  letter-spacing: -0.04em;
  margin: 0;
  color: var(--navy);
}
.section-head > p {
  max-width: 430px;
  color: var(--muted);
  line-height: 1.6;
}
.module-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.module {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  transition: 0.2s;
}
.module.done {
  border-color: #69ccd7;
  box-shadow: inset 4px 0 #18b7c9;
}
.module-head {
  width: 100%;
  display: grid;
  grid-template-columns: 54px 1fr 32px;
  align-items: center;
  gap: 16px;
  padding: 25px;
  background: none;
  border: 0;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
}
.num {
  font-size: 14px;
  font-weight: 800;
  color: var(--blue);
  width: 43px;
  height: 43px;
  border-radius: 50%;
  background: #edf5fe;
  display: grid;
  place-items: center;
}
.module-head small {
  display: block;
  font-size: 10px;
  letter-spacing: 0.15em;
  color: #7b8b9c;
  margin-bottom: 6px;
}
.module-head b {
  font-size: 20px;
}
.toggle {
  font-size: 28px;
  color: var(--blue);
  font-weight: 300;
}
.module-body {
  display: none;
  padding: 0 26px 28px 95px;
  color: var(--muted);
  line-height: 1.6;
}
.module.open .module-body {
  display: block;
}
.module.open .toggle {
  transform: rotate(45deg);
}
.module-body ul {
  padding-left: 20px;
}
.module-body li {
  margin: 8px 0;
}
.notice {
  background: var(--ice);
  border-left: 3px solid var(--cyan);
  padding: 15px 17px;
  margin: 18px 0;
  color: #294862;
}
.complete {
  margin-top: 10px;
  border: 1px solid var(--blue);
  color: var(--blue);
  background: #fff;
  padding: 11px 15px;
  border-radius: 5px;
  font-weight: 700;
  cursor: pointer;
}
.done .complete {
  background: #e8f9f7;
  border-color: #1aa9a8;
  color: #147775;
}
.programs {
  display: grid;
  gap: 10px;
}
.programs > div {
  padding: 14px;
  background: #f5f9fc;
  border-radius: 6px;
}
.programs p {
  margin: 5px 0 0;
}
.field-guide {
  margin: 0 clamp(22px, 7vw, 110px) 90px;
  background: var(--navy);
  color: #fff;
  border-radius: 18px;
  padding: 55px;
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 70px;
}
.field-guide h2 {
  color: #fff;
}
.checklist {
  display: grid;
  gap: 5px;
}
.checklist label {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px;
  border-bottom: 1px solid #ffffff1f;
  cursor: pointer;
}
.checklist input {
  position: absolute;
  opacity: 0;
}
.checklist label span {
  width: 21px;
  height: 21px;
  border: 1px solid #87a0b5;
  border-radius: 4px;
}
.checklist input:checked + span {
  background: var(--cyan);
  border-color: var(--cyan);
  box-shadow: inset 0 0 0 5px var(--navy);
}
.help {
  padding: 80px clamp(22px, 9vw, 150px);
  background: #dff5f7;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 50px;
}
.help > div {
  max-width: 760px;
}
.help p:last-child {
  line-height: 1.65;
  color: #456272;
  font-size: 18px;
}
.secondary {
  background: var(--navy);
  white-space: nowrap;
}
footer {
  padding: 28px clamp(22px, 7vw, 110px);
  display: flex;
  justify-content: space-between;
  gap: 30px;
  color: #687c8e;
  font-size: 13px;
  background: #fff;
}
footer span {
  font-weight: 800;
  color: var(--navy);
}
footer p {
  margin: 0;
  text-align: right;
}
@media (max-width: 850px) {
  .driveway-preview-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .driveway-preview-grid,
  .dual-checklists {
    grid-template-columns: 1fr;
  }
  .hero {
    grid-template-columns: 1fr;
    padding-top: 65px;
    gap: 40px;
  }
  .quick,
  .module-grid,
  .field-guide {
    grid-template-columns: 1fr;
  }
  .quick > div {
    padding: 18px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .section-head,
  .help,
  footer {
    align-items: flex-start;
    flex-direction: column;
  }
  .field-guide {
    padding: 35px;
    gap: 35px;
  }
  .module-body {
    padding-left: 25px;
  }
  .progress-wrap {
    display: none;
  }
  footer p {
    text-align: left;
  }
}
@media (max-width: 500px) {
  .topbar {
    height: 70px;
  }
  .admin-login {
    min-height: 38px;
    padding: 0 13px;
    font-size: 13px;
  }
  .hero {
    min-height: auto;
    padding: 55px 22px;
  }
  .lead {
    font-size: 17px;
  }
  .today-card {
    padding: 24px;
  }
  .training {
    padding: 65px 18px;
  }
  .module-head {
    padding: 20px 15px;
    grid-template-columns: 45px 1fr 25px;
  }
  .module-head b {
    font-size: 17px;
  }
  .field-guide {
    margin: 0 18px 60px;
    padding: 28px 20px;
  }
  .help {
    padding: 60px 22px;
  }
}
/* Quick FAQ entry point for returning technicians */
.top-faq-search {
  max-width: 1500px;
  margin: 0 auto;
  padding: 28px clamp(20px, 5vw, 80px);
  display: grid;
  grid-template-columns: minmax(250px, 0.8fr) minmax(320px, 1.2fr);
  align-items: center;
  gap: 28px;
  background: #f4f8fc;
  border-top: 1px solid #dbe6ef;
  border-bottom: 1px solid #dbe6ef;
}
.top-faq-search h2 { margin: 4px 0 6px; }
.top-faq-search p { margin: 0; }
@media (max-width: 760px) {
  .top-faq-search { grid-template-columns: 1fr; gap: 16px; }
}
