:root {
  --ink: #172033;
  --navy: #0c2340;
  --navy-2: #16365c;
  --teal: #0f5c56;
  --copper: #8c4a1f;
  --paper: #f4f0e8;
  --card: #fffcf7;
  --line: #e3d9cc;
  --muted: #5c6573;
  --danger: #8d2b2b;
  --ok: #0f5c56;
  --shadow: 0 18px 40px rgba(23, 32, 51, 0.08);
  --serif: "Source Serif 4", Georgia, serif;
  --sans: "Outfit", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 100% -10%, rgba(140, 74, 31, 0.08), transparent 50%),
    var(--paper);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
}
img { max-width: 100%; }
a { color: var(--teal); }
.wrap { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: white;
  padding: 8px 12px;
  z-index: 20;
}
.skip:focus { top: 12px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(244, 240, 232, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding-bottom: 22px;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 74px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}
.logo { height: 54px; width: auto; display: block; }
.brand span { color: var(--muted); font-size: 0.82rem; letter-spacing: 0.04em; }
.nav { display: flex; gap: 18px; align-items: center; }
.nav a { color: var(--navy); text-decoration: none; font-size: 0.95rem; font-weight: 500; }
.nav a:hover { color: var(--copper); }
.nav-cta {
  position: relative;
  background: var(--navy) !important;
  color: white !important;
  padding: 10px 14px;
  border-radius: 999px;
  box-shadow: 0 0 0 3px rgba(140, 74, 31, 0.2);
  animation: course-glow 1.6s ease-in-out infinite;
}
.nav-cta .arrow-mark {
  position: absolute;
  left: 50%;
  bottom: -28px;
  color: var(--copper);
  filter: drop-shadow(0 2px 0 rgba(255, 252, 247, 0.9));
  animation: point-up 0.9s ease-in-out infinite;
  pointer-events: none;
}
@keyframes point-up {
  0%, 100% { transform: translateX(-50%) translateY(5px); }
  50% { transform: translateX(-50%) translateY(-3px); }
}
@keyframes course-glow {
  0%, 100% { box-shadow: 0 0 0 3px rgba(140, 74, 31, 0.18); }
  50% { box-shadow: 0 0 0 7px rgba(140, 74, 31, 0.12); }
}

.notice {
  background: var(--navy);
  color: #f7f1e6;
}
.notice .wrap { padding: 14px 0; display: flex; gap: 14px; align-items: flex-start; }
.notice b {
  flex: 0 0 auto;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  border: 1px solid rgba(255,255,255,0.35);
  padding: 4px 8px;
  border-radius: 999px;
}
.notice p { margin: 0; font-size: 0.95rem; }
.offer-prompt {
  background: #fff8ef;
  border-bottom: 1px solid var(--line);
  color: var(--navy);
}
.offer-prompt .wrap { padding: 14px 0; }
.offer-prompt p { margin: 0; font-size: 1rem; }
.offer-prompt a {
  color: var(--copper);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hero { padding: 64px 0 24px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 36px;
  align-items: end;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(2.5rem, 5vw, 4.4rem); line-height: 1.02; color: var(--navy); }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 40rem; }
.eyebrow {
  color: var(--copper);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.78rem;
  margin-bottom: 10px;
}
.hero-card, .panel, .step, .course-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.hero-card { padding: 22px; }
.hero-card ol { margin: 10px 0 0; padding-left: 18px; }
.hero-card li { margin: 6px 0; }

section { padding: 28px 0; }
#letter, #apply, #about, #steps, #schedule, #contact { scroll-margin-top: 96px; }
h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); margin-bottom: 8px; }
.section-copy { color: var(--muted); max-width: 46rem; margin-top: 0; }

.about-grid, .apply-grid, .course-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.panel { padding: 22px 24px; }
.panel p:last-child { margin-bottom: 0; }

.steps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 18px;
}
.step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  padding: 18px;
  position: relative;
}
.step-no {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--navy);
  color: white;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 1.2rem;
}
.step h3 { font-size: 1.15rem; margin-bottom: 4px; overflow-wrap: anywhere; }
.step p { margin: 0; color: var(--muted); overflow-wrap: anywhere; }
.step.is-here { outline: 2px solid var(--copper); }

.course-pick-wrap { display: grid; gap: 14px; align-content: start; }
.aim[hidden],
#apply[hidden] { display: none !important; }
#apply { animation: reveal-form 0.35s ease; }
@keyframes reveal-form {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.aim {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--copper);
  font-weight: 700;
  letter-spacing: 0.04em;
}
.aim svg { animation: point-right 0.9s ease-in-out infinite; }
@keyframes point-right {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(8px); }
}
.course-card {
  padding: 26px;
  width: 100%;
  text-align: left;
  color: inherit;
  font: inherit;
  cursor: pointer;
  border: 2px solid var(--line);
  background: var(--card);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.course-card:hover { border-color: var(--copper); }
.course-card.is-selected {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(15, 92, 86, 0.16);
}
.pick-state {
  display: inline-block;
  margin-top: 8px;
  font-weight: 700;
  color: var(--copper);
}
#select-ceh { width: 100%; margin-top: 16px; }
.go-download {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--copper);
  color: white;
  text-decoration: none;
  font-weight: 700;
  padding: 14px 16px;
  border-radius: 14px;
  animation: callout 1.1s ease-in-out infinite;
}
.go-download svg { animation: point-down 0.9s ease-in-out infinite; }
@keyframes point-down {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(7px); }
}
@keyframes callout {
  0%, 100% { transform: translateY(0); box-shadow: 0 8px 0 rgba(140, 74, 31, 0.18); }
  50% { transform: translateY(-3px); box-shadow: 0 14px 24px rgba(140, 74, 31, 0.28); }
}
body.ceh-selected #enrol-form {
  border-color: var(--copper);
  animation: form-glow 1.3s ease-in-out infinite;
}
body.ceh-selected #download-btn {
  animation: btn-pop 1s ease-in-out infinite;
}
@keyframes form-glow {
  0%, 100% { box-shadow: 0 0 0 3px rgba(140, 74, 31, 0.2); }
  50% { box-shadow: 0 0 0 8px rgba(140, 74, 31, 0.12); }
}
@keyframes btn-pop {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); box-shadow: 0 10px 24px rgba(140, 74, 31, 0.35); }
}
.q3 {
  display: inline-block;
  background: #f3e2d4;
  color: var(--copper);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.75rem;
  padding: 5px 9px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; padding: 0; list-style: none; }
.meta li {
  background: #f6f1e8;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.92rem;
}
.fee-list, .plain-list { margin: 8px 0 0; padding-left: 18px; }
.fee-list li, .plain-list li { margin: 4px 0; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 18px; background: white; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); }
th { font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); background: #faf7f2; }
tr { cursor: pointer; }
tr:hover, tr.is-selected { background: #f3f7f6; }
tr.is-selected td:first-child { box-shadow: inset 3px 0 0 var(--teal); }
.hint { color: var(--muted); font-size: 0.92rem; }

form { display: grid; gap: 14px; }
fieldset { border: 0; margin: 0; padding: 0; }
legend { font-weight: 600; padding: 0; margin-bottom: 8px; }
label span { display: block; font-weight: 600; margin-bottom: 6px; }
input[type="text"], input[type="email"], input[type="tel"], select, textarea {
  width: 100%;
  border: 1px solid #d9d0c3;
  background: white;
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  color: inherit;
}
textarea { min-height: 96px; resize: vertical; }
.form-title { font-size: 1.35rem; margin: 0 0 16px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.wide { grid-column: 1 / -1; }
.req::after { content: " *"; color: var(--copper); }
.address-label { margin: 4px 0 0; font-weight: 600; }
.phone-row { display: flex; gap: 8px; align-items: center; }
.phone-code {
  flex: 0 0 auto;
  background: #f6f1e8;
  border: 1px solid #d9d0c3;
  border-radius: 12px;
  padding: 12px 12px;
  font-weight: 600;
}
.phone-row input { flex: 1; }
.note {
  margin: 0;
  background: #fff6e8;
  border: 1px solid #e6c89a;
  color: #6a4a1e;
  border-radius: 12px;
  padding: 12px 14px;
}
.consent {
  display: block;
  position: relative;
  padding: 4px 0 4px 36px;
  cursor: pointer;
}
.consent input {
  -webkit-appearance: none;
  appearance: none;
  position: absolute;
  left: 0;
  top: 4px;
  width: 22px;
  height: 22px;
  min-width: 22px;
  min-height: 22px;
  margin: 0;
  border: 2px solid var(--navy);
  border-radius: 5px;
  background: white center / 14px 14px no-repeat;
  cursor: pointer;
  touch-action: manipulation;
}
.consent input:checked {
  background-color: var(--navy);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M3 8.2 6.4 12 13 4'/%3E%3C/svg%3E");
}
.consent span { font-weight: 400; }
input:focus, textarea:focus { outline: 2px solid var(--teal); border-color: transparent; }
.intake-fields { display: grid; gap: 8px; }
.intake-option {
  display: flex;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: white;
  cursor: pointer;
}
.intake-option.is-selected { border-color: var(--teal); background: #f3f7f6; }
.intake-option span { display: flex; justify-content: space-between; gap: 12px; width: 100%; margin: 0; font-weight: 500; }
.intake-option em { font-style: normal; color: var(--muted); }
button {
  border: 0;
  background: var(--copper);
  color: white;
  font: inherit;
  font-weight: 600;
  padding: 14px 16px;
  border-radius: 12px;
  cursor: pointer;
}
button:hover { background: #733c18; }
button.course-card,
button.course-card:hover {
  background: var(--card);
  color: inherit;
  font-weight: 400;
}
button.course-card:hover { border-color: var(--copper); }
button:disabled { opacity: 0.7; cursor: wait; }
#download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
}
#download-btn.is-loading,
body.ceh-selected #download-btn.is-loading {
  animation: none;
  transform: none;
  opacity: 1;
  cursor: wait;
}
#download-btn.is-loading::before {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btn-spin 0.7s linear infinite;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }
.hp {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.form-msg { margin: 0; padding: 12px 14px; border-radius: 12px; }
.form-msg.error { background: #fdecec; color: var(--danger); }
.form-msg.ok { background: #e7f3f1; color: var(--ok); }

.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.contact-grid a { color: inherit; text-decoration: none; font-weight: 600; }
.whatsapp-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 10px 12px;
  border-radius: 999px;
  background: #075e54;
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 12px 28px rgba(7, 94, 84, 0.28);
}
.whatsapp-float svg {
  width: 22px;
  height: 22px;
  padding: 6px;
  border-radius: 50%;
  background: #25d366;
  box-sizing: content-box;
}
.whatsapp-float:hover { background: #054c44; color: white; }
@media (max-width: 640px) {
  .whatsapp-float span { display: none; }
  .whatsapp-float { right: 12px; bottom: 12px; padding: 10px; }
  #letter, #apply, #about, #steps, #schedule, #contact { scroll-margin-top: 12px; }
}
.site-footer { padding: 28px 0 40px; color: var(--muted); font-size: 0.92rem; }

.flow-bar {
  position: sticky;
  top: 74px;
  z-index: 9;
  background: rgba(244, 240, 232, 0.96);
  border-bottom: 1px solid var(--line);
}
.flow {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 0;
  padding: 12px 0;
}
.flow li {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 0;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: white;
  color: var(--muted);
}
.flow-no {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #efe8dc;
  font-weight: 700;
  flex: 0 0 auto;
}
.flow-kicker {
  display: block;
  font-style: normal;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}
.flow strong { display: block; color: inherit; }
.flow li.is-current {
  border-color: var(--copper);
  color: var(--ink);
  animation: course-glow 1.6s ease-in-out infinite;
}
.flow li.is-current .flow-no,
.flow li.is-done .flow-no { color: white; }
.flow li.is-current .flow-no { background: var(--copper); }
.flow li.is-current .flow-kicker { color: var(--copper); }
.flow li.is-done { border-color: var(--teal); color: var(--ink); }
.flow li.is-done .flow-no { background: var(--teal); }
.flow li.is-done .flow-kicker { color: var(--teal); }
#application-fields { border: 0; margin: 0; padding: 0; min-inline-size: 0; }
#application-fields[disabled] { opacity: 0.5; }

@media (prefers-reduced-motion: reduce) {
  .nav-cta,
  .nav-cta .arrow-mark {
    animation: none;
  }
}
@media (max-width: 860px) {
  .site-header { position: static; padding-bottom: 0; }
  .header-inner {
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
    gap: 10px;
    padding-top: 12px;
    padding-bottom: 12px;
  }
  .logo { height: 44px; }
  .brand span { font-size: 0.78rem; }
  .nav {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    padding-bottom: 0;
    justify-content: stretch;
  }
  .nav a {
    text-align: center;
    background: white;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 2px;
    font-size: 0.74rem;
  }
  .nav-cta {
    grid-column: 1 / -1;
    order: -1;
    box-shadow: none;
    padding: 12px 10px;
    font-size: 0.95rem;
  }
  .nav-cta .arrow-mark { display: none; }
  .hero-grid, .about-grid, .apply-grid, .course-layout, .steps, .contact-grid, .form-grid {
    grid-template-columns: 1fr;
  }
  .hero { padding: 28px 0 8px; }
  .notice .wrap { flex-direction: column; }
  h1 { font-size: clamp(2rem, 9vw, 2.6rem); }
  h2 { font-size: 1.7rem; }
  .panel, .hero-card, .step { padding: 16px; }
  .form-title { font-size: 1.15rem; }
  input[type="text"], input[type="email"], input[type="tel"], select, textarea { font-size: 16px; }
  .contact-grid a, .offer-prompt p, .form-title, .lede { overflow-wrap: anywhere; }
  table { min-width: 0; }
  thead { display: none; }
  #schedule-body tr {
    display: grid;
    gap: 2px;
    padding: 12px 14px;
  }
  #schedule-body td {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px 12px;
    border: 0;
    padding: 4px 0;
    min-width: 0;
  }
  #schedule-body td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    flex: 0 0 auto;
  }
  body { padding-bottom: 84px; }
  #letter, #apply, #about, #steps, #schedule, #contact { scroll-margin-top: 12px; }
}
