/* ============================================================
   AIS Springboard for Growth 2026 — Coaching Clinic Registration
   Typography: DB Heavent ONLY (embedded below)
   ============================================================ */

/* ---------- DB Heavent (Original weights) ---------- */
@font-face {
  font-family: "DB Heavent";
  src: url("fonts/DBHeavent-Regular.woff2") format("woff2"),
       url("fonts/DBHeavent-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DB Heavent";
  src: url("fonts/DBHeavent-Medium.woff2") format("woff2"),
       url("fonts/DBHeavent-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DB Heavent";
  src: url("fonts/DBHeavent-Bold.woff2") format("woff2"),
       url("fonts/DBHeavent-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DB Heavent";
  src: url("fonts/DBHeavent-Black.woff2") format("woff2"),
       url("fonts/DBHeavent-Black.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* ---------- Design tokens (sampled from AIS graphics) ---------- */
:root {
  --gold:        #E39A00;
  --gold-deep:   #C07E00;
  --gold-soft:   #FBE5BE;
  --amber-bg:    #FFF6E4;
  --amber-tint:  #FFFBF2;
  --green:       #7FB800;
  --green-deep:  #5E9200;
  --ink:         #2E2A20;
  --muted:       #857C6C;
  --line:        #ECE2CE;
  --white:       #ffffff;
  --danger:      #C0392B;
  --radius:      16px;
  --shadow:      0 6px 22px rgba(120, 90, 0, .10);
  --shadow-sm:   0 2px 8px rgba(120, 90, 0, .08);

  /* Only 3 font sizes are used anywhere on this page. */
  --fs-sm: 21pt;
  --fs-md: 22pt;
  --fs-lg: 24pt;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "DB Heavent", sans-serif;
  font-weight: 400;
  font-size: var(--fs-md);
  line-height: 1;
  color: var(--ink);
  background: linear-gradient(180deg, #FFFDF8 0%, #FFF3DC 100%) fixed;
  min-height: 100vh;
}

input, button, textarea, select { font-family: inherit; line-height: 1; }

img { max-width: 100%; }

a.link { color: var(--gold-deep); text-decoration: underline; overflow-wrap: anywhere; }
a.link:hover { color: var(--gold); }

.emoji { font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif; }

.page {
  max-width: none;
  margin: 0;
  padding: 20px 1in 48px;
}

/* ---------- Hero ---------- */
.hero {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--white);
  margin-bottom: 22px;
}
.hero__caption {
  padding: 18px 24px 22px;
  background: linear-gradient(100deg, var(--gold) 0%, #E8A020 60%, var(--gold-deep) 100%);
  color: #fff;
}
.hero__eyebrow {
  margin: 0 0 2px;
  font-weight: 700;
  font-size: var(--fs-sm);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.25);
}
.hero__title {
  margin: 0;
  font-weight: 800;
  font-size: var(--fs-lg);
  line-height: 1;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.25);
}
.hero__sub {
  margin: 4px 0 0;
  font-weight: 500;
  font-size: var(--fs-md);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.2);
}

/* ---------- Cards ---------- */
.main { display: flex; flex-direction: column; gap: 20px; }
.form { display: flex; flex-direction: column; gap: 20px; }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 22px 24px;
}
.card__head {
  margin: 0 0 12px;
  font-weight: 800;
  font-size: var(--fs-lg);
  line-height: 1;
  color: var(--ink);
}
.card__hint {
  margin: -4px 0 14px;
  color: var(--muted);
  font-size: var(--fs-sm);
}

/* ---------- Rules ---------- */
.rules { border-left: 6px solid var(--gold); }
.rules__list { margin: 0; padding: 0; list-style: none; }
.rules__list > li {
  position: relative;
  padding: 8px 0 8px 26px;
  border-bottom: 1px dashed var(--line);
}
.rules__list > li:last-child { border-bottom: 0; }
.rules__list > li::before {
  content: "";
  position: absolute;
  left: 2px; top: 16px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--gold);
}
.rules__list ul {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}
.rules__list ul li {
  position: relative;
  padding: 4px 0 4px 22px;
  font-size: var(--fs-sm);
  color: var(--muted);
}
.rules__list ul li::before {
  content: "";
  position: absolute;
  left: 2px; top: 12px;
  width: 6px; height: 6px;
  border-radius: 50%;
  border: 1.5px solid var(--gold-deep);
  background: transparent;
}
.rules__list ul li strong { color: var(--ink); }

/* mid-level sub-heading (e.g. "การเลือกหัวข้อเข้าร่วม...") — larger than the
   detail bullets nested beneath it, to show the extra hierarchy level */
.rules__subhead { font-size: var(--fs-md); padding-bottom: 2px; }

/* Rating-band colors, matched to the Strength / Area to Build On / Development
   Opportunity legend (green / orange / red) */
.hl-atbo { color: #E08A00; }
.hl-do   { color: #D32F2F; }

/* ---------- Program journey ---------- */
.journey { padding: 0; overflow: hidden; }
.journey__summary {
  cursor: pointer;
  padding: 18px 24px;
  font-weight: 700;
  font-size: var(--fs-md);
  color: var(--gold-deep);
  list-style: none;
}
.journey__summary::-webkit-details-marker { display: none; }
.journey__summary::before { content: "▸ "; }
.journey[open] .journey__summary::before { content: "▾ "; }
.journey__img { display: block; width: 100%; border-top: 1px solid var(--line); }

/* ---------- Fields ---------- */
.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; }
.req { color: var(--danger); }
.field input {
  width: 100%;
  padding: 11px 14px;
  font-size: var(--fs-md);
  color: var(--ink);
  background: var(--amber-tint);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.field input:focus {
  outline: none;
  background: var(--white);
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(227, 154, 0, .18);
}
.field input.invalid { border-color: var(--danger); background: #fff5f4; }

/* ---------- Topics ---------- */
.topics__headrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.counter {
  font-weight: 700;
  color: var(--gold-deep);
  background: var(--gold-soft);
  border-radius: 999px;
  padding: 4px 14px;
  white-space: nowrap;
}
.counter.counter--full { background: var(--green); color: #fff; }

.section { border: 0; margin: 16px 0 0; padding: 0; }
.section__legend { padding: 0; margin-bottom: 10px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.section__tag {
  font-weight: 500;
  font-size: var(--fs-md);
  padding: 3px 12px;
  border-radius: 8px;
  color: #3a2f00;
}
.section__tag--perf { background: linear-gradient(90deg, #F3B24C, #E39A00); }
.section__tag--pot  { background: linear-gradient(90deg, #F6C95A, #EDB100); }
.section__meta { color: var(--muted); font-size: var(--fs-sm); font-weight: 500; }

.topic {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 14px;
  margin-top: 10px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.topic:hover { border-color: var(--gold); background: var(--amber-tint); }

/* two checkboxes stacked: ผู้รับฟัง (always) / ผู้นำเสนอ (presenter mode only) */
.topic__checks { display: flex; flex-direction: column; gap: 8px; flex: 0 0 auto; }
.chk { display: flex; align-items: center; gap: 7px; cursor: pointer; }
.chk input { position: absolute; opacity: 0; width: 0; height: 0; }
.chk__box {
  flex: 0 0 auto;
  width: 22px; height: 22px;
  border: 2px solid #c7bda6;
  border-radius: 6px;
  position: relative;
  background: #fff;
  transition: border-color .15s, background .15s;
}
.chk__label { font-size: var(--fs-sm); font-weight: 700; color: var(--muted); white-space: nowrap; }

/* listen checkbox = gold */
.chk--listen input:checked ~ .chk__box { background: var(--gold); border-color: var(--gold); }
.chk--listen input:checked ~ .chk__box::after {
  content: ""; position: absolute; left: 7px; top: 2px;
  width: 5px; height: 11px; border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(45deg);
}
.chk--listen input:checked ~ .chk__label { color: var(--gold-deep); }

/* present checkbox = green; visible on every topic from the start */
.chk--present .chk__box--present { border-color: #b7cf80; }
.chk--present input:checked ~ .chk__box--present { background: var(--green); border-color: var(--green); }
.chk--present input:checked ~ .chk__box--present::after {
  content: ""; position: absolute; left: 7px; top: 2px;
  width: 5px; height: 11px; border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(45deg);
}
.chk--present input:checked ~ .chk__label { color: var(--green-deep); }
.chk input:disabled ~ .chk__box { opacity: .4; cursor: not-allowed; }
.chk input:disabled ~ .chk__label { opacity: .5; cursor: not-allowed; }
.chk input:focus-visible ~ .chk__box { box-shadow: 0 0 0 3px rgba(227,154,0,.35); }

.topic:has(.chk--listen input:checked) { border-color: var(--gold); background: #fffaf0; }
.topic:has(.chk--present input:checked) { border-color: var(--green); background: #f7fbee; box-shadow: 0 0 0 3px rgba(127,184,0,.14); }

.topic__body { display: flex; flex-direction: column; gap: 1px; }
.topic__time { font-weight: 700; color: var(--gold-deep); font-size: var(--fs-sm); }
.topic__name { font-weight: 800; font-size: var(--fs-md); }
.topic__desc { color: var(--muted); font-size: var(--fs-sm); }
.topic__status { font-weight: 700; font-size: var(--fs-sm); margin-top: 2px; }
.topic__status[data-full] { color: var(--danger); }

/* topic where presenter round is full — presenter checkbox disabled, listen still open */
.topic.is-full { background: #fffdf5; }

/* ---------- Presenter note ---------- */
.note { background: var(--amber-bg); border: 1px solid var(--gold-soft); border-left: 6px solid var(--gold); }
.note p { margin: 8px 0 0; }
.note p:first-of-type { margin-top: 0; }

/* ---------- Submit ---------- */
.form__error {
  color: var(--danger);
  font-weight: 700;
  background: #fff2f0;
  border: 1px solid #f3c9c3;
  border-radius: 10px;
  padding: 10px 14px;
  margin: 4px 0 0;
}
.submit-row { display: flex; justify-content: center; margin-top: 4px; }
.btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  font-weight: 800;
  font-size: var(--fs-lg);
  color: #fff;
  padding: 14px 54px;
  border-radius: 999px;
  background: linear-gradient(100deg, var(--gold) 0%, var(--gold-deep) 100%);
  box-shadow: 0 8px 20px rgba(227,154,0,.35);
  transition: transform .1s, box-shadow .15s, opacity .15s;
}
.btn:hover { box-shadow: 0 10px 26px rgba(227,154,0,.45); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: progress; }

/* ---------- Thank you ---------- */
.thankyou { text-align: center; border-top: 6px solid var(--green); }
.thankyou__check { font-size: var(--fs-lg); line-height: 1; }
.thankyou__title { margin: 6px 0 8px; font-weight: 800; font-size: var(--fs-lg); color: var(--green-deep); }
.thankyou__summary {
  text-align: left;
  display: inline-block;
  margin: 14px auto;
  padding: 14px 18px;
  background: var(--amber-tint);
  border: 1px solid var(--line);
  border-radius: 12px;
  min-width: min(100%, 420px);
}
.thankyou__summary h3 { margin: 12px 0 3px; font-size: var(--fs-md); }
.thankyou__summary h3:first-child { margin-top: 0; }
.thankyou__summary p { margin: 2px 0; line-height: 1; }
.thankyou__summary ul { margin: 3px 0 0; padding-left: 20px; }
.thankyou__summary li { margin: 2px 0; }
.thankyou__todo {
  text-align: left;
  background: var(--amber-bg);
  border-left: 6px solid var(--gold);
  border-radius: 10px;
  padding: 12px 16px;
  margin: 8px 0;
}
.thankyou__closing { font-weight: 700; margin-top: 16px; }

/* ---------- Footer ---------- */
.footer { margin-top: 30px; text-align: center; }
.footer__text { color: var(--muted); font-size: var(--fs-sm); margin-top: 10px; }

/* ---------- Responsive ---------- */
/* Font sizes stay fixed (--fs-sm/md/lg) at every breakpoint — only spacing changes. */
@media (max-width: 640px) {
  .page { padding: 12px 10px 36px; }
  .card { padding: 18px 16px; }
  .hero__caption { padding: 14px 16px 18px; }
  .btn { width: 100%; padding: 14px; }
}

/* ---------- Utility ---------- */
[hidden] { display: none !important; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
