:root {
  color-scheme: light;
  --ink: #14181f;
  --ink-soft: #3a4250;
  --line: #c9ced6;
  --accent: #123a6b;
  --accent-hover: #0c2a4f;
  --warn: #a33a00;
  --focus: #b3261e;
}

* { box-sizing: border-box; }

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: "Noto Sans Thai", "Leelawadee UI", "Sukhumvit Set", Thonburi, Tahoma, sans-serif;
  font-size: 20px;
  line-height: 1.7;
}

.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 16px 16px 40px;
}

h1, h2, p, ul, ol { margin: 0; }

a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

/* ปุ่ม */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 8px 18px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
}
.btn:hover { background: var(--accent-hover); }

.btn-contact {
  width: 100%;
  font-size: 22px;
  overflow-wrap: anywhere;
}

/* ส่วนเปิดหน้า */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.phase {
  flex: none;
  padding: 4px 12px;
  border: 2px solid var(--accent);
  border-radius: 8px;
  color: var(--accent);
  font-size: 22px;
  font-weight: 700;
  white-space: nowrap;
}

.org { color: var(--ink-soft); font-size: 18px; line-height: 1.5; }

h1 {
  margin-top: 4px;
  font-size: 27px;
  line-height: 1.32;
  text-wrap: balance;
}

.place {
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 19px;
  line-height: 1.55;
}

/* แถบสีภาพความร้อน จากเอกสารต้นฉบับ */
.thermal {
  height: 8px;
  margin: 10px 0;
  border-radius: 4px;
  background: linear-gradient(90deg, #1b1b5e, #2152d6, #0f9d7a, #eab308, #f97316, #dc2626);
}

.facts {
  display: grid;
  gap: 8px;
  padding: 0;
  list-style: none;
}

.fact {
  padding: 5px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  line-height: 1.4;
}
.fact strong { display: block; font-size: 22px; }
.fact span { display: block; font-size: 18px; color: var(--ink-soft); }

/* เนื้อหา */
.section {
  margin-top: 36px;
  scroll-margin-top: 16px;
}

h2 {
  margin-bottom: 10px;
  font-size: 25px;
  line-height: 1.4;
}

.para + .para { margin-top: 10px; }

.notice {
  margin-top: 16px;
  padding: 14px 16px;
  border: 2px solid var(--warn);
  border-left-width: 8px;
  border-radius: 8px;
  font-weight: 700;
}

.emphasis {
  padding: 14px 16px;
  border: 2px solid var(--accent);
  border-left-width: 8px;
  border-radius: 8px;
  font-weight: 700;
}

.bullets { padding-left: 26px; }
.bullets li + li { margin-top: 8px; }

/* ขั้นตอนเรียงแนวตั้งเสมอ */
.steps {
  display: block;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li {
  position: relative;
  min-height: 44px;
  padding-left: 58px;
  counter-increment: step;
}
.steps li + li { margin-top: 16px; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  line-height: 44px;
  text-align: center;
}

.channels {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

/* คณะกรรมการจริยธรรม แยกจากทีมวิจัย */
.ethics {
  padding: 16px;
  border: 2px dashed var(--ink-soft);
  border-radius: 10px;
}
.ethics h2 { font-size: 22px; }
.separate-note { margin-top: 8px; color: var(--ink-soft); font-size: 18px; }

.tel-link {
  color: var(--accent);
  font-weight: 700;
  white-space: nowrap;
}

.footer {
  margin-top: 28px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1.55;
}

.backup-note {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 2px solid var(--ink-soft);
  border-radius: 8px;
  font-size: 18px;
  line-height: 1.5;
}

@media (min-width: 720px) {
  .page { padding-top: 28px; }
  h1 { font-size: 38px; }
  .facts { grid-template-columns: repeat(3, 1fr); }
  .channels { grid-template-columns: repeat(2, 1fr); }
}
