:root {
  color-scheme: light;
  --ink: #183128;
  --muted: #66756e;
  --green: #13854f;
  --green-dark: #0a633a;
  --green-soft: #eaf6ef;
  --cream: #f5f1e8;
  --line: #dce5df;
  --danger: #c9362b;
  --white: #fff;
  --shadow: 0 22px 64px rgba(20, 64, 43, .10);
  font-family: "IBM Plex Sans Thai", "Noto Sans Thai", "Leelawadee UI", Tahoma, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: #fff; line-height: 1.55; }
button, input, select, textarea { font: inherit; }
button, label, select { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
.skip-link { position: fixed; top: -80px; left: 16px; z-index: 50; background: var(--ink); color: white; padding: 10px 16px; border-radius: 8px; }
.skip-link:focus { top: 16px; }

.shell { min-height: 100vh; display: grid; grid-template-columns: minmax(340px, 42%) minmax(560px, 58%); }
.brand-panel { min-height: 100vh; position: sticky; top: 0; align-self: start; height: 100vh; overflow: hidden; color: #f8fff9; background: radial-gradient(circle at 92% 8%, #27a96d 0, transparent 32%), linear-gradient(145deg, #0b673c, #063f29 82%); }
.brand-inner { position: relative; z-index: 2; height: 100%; max-width: 600px; margin-left: auto; padding: clamp(32px, 6vw, 88px); display: flex; flex-direction: column; }
.brand { color: inherit; display: inline-flex; gap: 13px; align-items: center; text-decoration: none; align-self: flex-start; letter-spacing: .04em; }
.brand-logo { display: block; width: clamp(190px, 18vw, 240px); height: auto; }
.eyebrow { margin-top: auto; color: #bce5cd; text-transform: uppercase; letter-spacing: .14em; font-weight: 700; font-size: .78rem; display: flex; align-items: center; gap: 10px; }
.eyebrow span { display: block; width: 28px; height: 2px; background: #6bd498; }
.brand-panel h1 { font-size: clamp(2.6rem, 5vw, 5rem); line-height: 1.06; letter-spacing: -.045em; margin: 22px 0; font-weight: 750; }
.lead { max-width: 540px; font-size: 1.08rem; color: #d3eadc; margin: 0; }
blockquote { margin: 36px 0 28px; padding: 18px 22px; border-left: 3px solid #66d195; background: rgba(255,255,255,.07); border-radius: 0 12px 12px 0; font-size: 1.08rem; }
blockquote cite { display: block; color: #b8d9c5; font-size: .78rem; margin-top: 7px; font-style: normal; }
.culture { margin-top: auto; }
.culture > p { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: #a9d2ba; }
.culture-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.culture-tags span { padding: 7px 11px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06); border-radius: 999px; font-size: .78rem; }
.company-story { margin-top: 22px; border-top: 1px solid rgba(255,255,255,.13); padding-top: 16px; color: #cae3d5; font-size: .84rem; }
.company-story summary { cursor: pointer; color: white; font-weight: 700; }
.company-story p { margin-bottom: 0; }
.brand-orbit { position: absolute; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; }
.orbit-one { width: 420px; height: 420px; top: -190px; right: -180px; }
.orbit-two { width: 260px; height: 260px; top: -110px; right: -100px; }

.form-panel { min-height: 100vh; background: radial-gradient(circle at 84% 8%, rgba(19,133,79,.055), transparent 28%), linear-gradient(180deg, #f8fbf9 0, #fff 36%); }
.form-wrap { width: min(830px, calc(100% - 48px)); margin: 0 auto; padding: clamp(45px, 7vw, 84px) 0 32px; }
.form-header .kicker, .kicker { margin: 0 0 8px; color: var(--green); letter-spacing: .16em; font-size: .72rem; font-weight: 800; }
.form-header h2, .success h2 { margin: 0; font-size: clamp(2rem, 3vw, 3rem); letter-spacing: -.035em; line-height: 1.25; }
.form-header > p:last-child { color: var(--muted); margin: 10px 0 0; }
.required-mark, em { color: var(--danger); font-style: normal; }

.stepper { display: grid; grid-template-columns: auto 1fr auto 1fr auto 1fr auto; align-items: start; margin: 38px 0 44px; }
.step { appearance: none; border: 0; background: transparent; padding: 0; text-align: center; cursor: pointer; min-width: 76px; }
.step span { width: 36px; height: 36px; display: grid; place-items: center; margin: 0 auto; border-radius: 50%; border: 1px solid var(--line); background: white; color: #7e8a85; font-weight: 700; transition: .2s ease; }
.step b { display: block; margin-top: 7px; color: #87938e; font-size: .72rem; white-space: nowrap; }
.step.active span, .step.completed span { border-color: var(--green); background: var(--green); color: white; box-shadow: 0 0 0 5px var(--green-soft); }
.step.active b { color: var(--green-dark); }
.step.completed span { background: white; color: var(--green); box-shadow: none; }
.stepper > i { height: 1px; background: var(--line); margin-top: 18px; }
.stepper > i.completed { background: var(--green); }

form { position: relative; overflow: visible; background: rgba(255,255,255,.96); border: 1px solid #dfe9e3; border-radius: 24px; padding: clamp(24px, 4vw, 42px); box-shadow: var(--shadow); }
.form-step { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 24px 18px; min-width: 0; animation: enter .25s ease both; }
.form-step[hidden] { display: none; }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } }
legend { grid-column: 1 / -1; width: 100%; display: flex; align-items: center; gap: 14px; padding: 0 0 25px; margin-bottom: 4px; border-bottom: 1px solid #edf1ee; }
legend > span { color: var(--green); font-weight: 800; font-size: .82rem; letter-spacing: .08em; }
legend div { display: flex; flex-direction: column; }
legend b { font-size: 1.25rem; }
legend small { color: var(--muted); font-size: .82rem; font-weight: 400; }
.full { grid-column: 1 / -1; }
.field { min-width: 0; }
.field label, .label { display: block; margin-bottom: 8px; font-size: .88rem; font-weight: 700; }
input, select, textarea { width: 100%; color: var(--ink); background: #fff; border: 1px solid #cfdad4; border-radius: 11px; padding: 12px 14px; outline: none; transition: border-color .18s, box-shadow .18s, background .18s; }
input, select { min-height: 49px; }
textarea { resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: #9bb3a6; }
input:focus, select:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
input.invalid, select.invalid, textarea.invalid { border-color: var(--danger); background: #fffafa; }
input::placeholder, textarea::placeholder { color: #a5aea9; }
.hint { color: var(--muted); display: block; margin-top: 6px; font-size: .73rem; }
.field-error { color: var(--danger); display: block; min-height: 0; margin-top: 5px; font-size: .75rem; font-weight: 650; }
.field-error:empty { margin: 0; }
.input-with-icon { position: relative; }
.input-with-icon > span { position: absolute; top: 50%; left: 13px; transform: translateY(-50%); color: #7a8881; padding-right: 10px; border-right: 1px solid var(--line); }
.input-with-icon input { padding-left: 62px; }
.phone-input input { padding-left: 52px; }
.field-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: .75rem; }
.email-autocomplete { position: relative; }
.email-domain-list { position: absolute; z-index: 20; top: calc(100% + 7px); left: 0; right: 0; max-height: 246px; overflow-y: auto; padding: 6px; border: 1px solid #cbdcd2; border-radius: 12px; background: white; box-shadow: 0 16px 36px rgba(17, 67, 43, .16); }
.email-domain-list[hidden] { display: none; }
.email-domain-option { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 11px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; text-align: left; }
.email-domain-option:hover, .email-domain-option.active, .email-domain-option[aria-selected="true"] { color: var(--green-dark); background: var(--green-soft); }
.email-domain-option b { font-size: .86rem; }
.email-domain-option small { color: var(--muted); font-size: .68rem; }
.quick-options { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.quick-options button { appearance: none; border: 1px solid #cfe0d7; border-radius: 999px; padding: 6px 10px; background: #f8fbf9; color: #52645a; cursor: pointer; font-size: .72rem; line-height: 1.35; transition: .16s; }
.quick-options button:hover { border-color: var(--green); color: var(--green-dark); background: var(--green-soft); }
.quick-options button.active { border-color: var(--green); color: white; background: var(--green); }

.choice-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.field label.choice { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr) 24px; align-items: center; gap: 12px; min-height: 76px; margin: 0; cursor: pointer; border: 1px solid #d8e4dd; border-radius: 15px; padding: 12px 14px; background: linear-gradient(145deg, #fff, #fbfdfc); box-shadow: 0 4px 12px rgba(21,70,47,.035); transition: border-color .18s, box-shadow .18s, background .18s, transform .18s; }
.choice:hover { border-color: #8fbea4; background: #fbfefc; box-shadow: 0 8px 22px rgba(19,133,79,.08); transform: translateY(-1px); }
.choice:focus-within { border-color: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.choice:has(input:checked) { border-color: var(--green); background: linear-gradient(145deg, #eaf7ef, #f7fcf9); box-shadow: inset 0 0 0 1px var(--green), 0 8px 22px rgba(19,133,79,.10); }
.choice input { position: absolute; width: 1px; height: 1px; min-height: 1px; opacity: 0; pointer-events: none; }
.choice-code { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; color: var(--green-dark); background: var(--green-soft); font-size: .68rem; font-weight: 800; letter-spacing: .04em; transition: .18s; }
.choice:has(input:checked) .choice-code { color: #fff; background: var(--green); }
.choice-copy { display: flex; flex-direction: column; min-width: 0; }
.choice-copy b { font-size: .86rem; line-height: 1.35; }
.choice-copy small { color: var(--muted); font-size: .68rem; margin-top: 2px; }
.choice-check { width: 22px; height: 22px; display: grid; place-items: center; border: 1.5px solid #c8d7cf; border-radius: 50%; color: transparent; background: #fff; font-size: .72rem; font-weight: 800; transition: .18s; }
.choice:has(input:checked) .choice-check { border-color: var(--green); color: #fff; background: var(--green); }

.wfh-panel { border: 1px solid #b9dbc8; background: linear-gradient(135deg, #effaf4, #f9fcfa); border-radius: 15px; padding: 18px; }
.wfh-title { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.wfh-title > span { width: 37px; height: 37px; display: grid; place-items: center; color: white; background: var(--green); border-radius: 10px; font-size: 1.2rem; }
.wfh-title div { display: flex; flex-direction: column; }
.wfh-title small { color: var(--muted); }
#wfh-requirements { display: grid; gap: 8px; }
.check-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; background: rgba(255,255,255,.78); border-radius: 9px; cursor: pointer; font-size: .86rem; }
.check-row input { width: 18px; min-height: 18px; accent-color: var(--green); margin: 2px 0 0; }

.appointment-note { display: flex; gap: 12px; padding: 15px; border-radius: 12px; background: #f2f8f4; border: 1px solid #d6e9dd; }
.appointment-note > span { flex: 0 0 auto; width: 27px; height: 27px; display: grid; place-items: center; background: var(--green); color: white; border-radius: 50%; }
.appointment-note div { display: flex; flex-direction: column; }
.appointment-note small { color: var(--muted); }
.slot-state { color: var(--muted); padding: 18px; text-align: center; background: #f7f9f8; border-radius: 10px; font-size: .86rem; }
.time-slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin-top: 10px; }
.time-slot { appearance: none; border: 1px solid var(--line); background: white; border-radius: 9px; padding: 10px 6px; cursor: pointer; text-align: center; transition: .16s; }
.time-slot:hover { border-color: var(--green); }
.time-slot.active { color: white; background: var(--green); border-color: var(--green); box-shadow: 0 5px 14px rgba(19,133,79,.18); }
.time-slot small { display: block; opacity: .75; font-size: .62rem; }

.flatpickr-calendar { font-family: "IBM Plex Sans Thai", "Noto Sans Thai", sans-serif; border: 1px solid #d9e5de; border-radius: 13px; box-shadow: 0 18px 45px rgba(16, 65, 42, .17); overflow: hidden; }
.flatpickr-calendar.arrowTop::before { border-bottom-color: #d9e5de; }
.flatpickr-calendar.arrowTop::after { border-bottom-color: #fff; }
.flatpickr-months { padding: 7px 5px 2px; }
.flatpickr-current-month { font-size: 1rem; padding-top: 5px; }
.flatpickr-current-month .flatpickr-monthDropdown-months { font-weight: 600; }
.flatpickr-weekday { color: #617168; font-weight: 600; }
.flatpickr-day { border-radius: 8px; }
.flatpickr-day:hover { border-color: #c6e2d2; background: var(--green-soft); }
.flatpickr-day.today { border-color: var(--green); color: var(--green-dark); }
.flatpickr-day.today:hover, .flatpickr-day.selected, .flatpickr-day.startRange, .flatpickr-day.endRange { border-color: var(--green); background: var(--green); color: white; }
.flatpickr-day.flatpickr-disabled { color: #c6cfca; }

.dropzone { display: grid !important; place-items: center; gap: 6px; min-height: 150px; border: 1.5px dashed #a9bbb1; background: #fafcfb; border-radius: 14px; cursor: pointer; text-align: center; transition: .2s; }
.dropzone:hover, .dropzone.dragging { border-color: var(--green); background: var(--green-soft); }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.upload-icon { display: grid; place-items: center; width: 38px; height: 38px; background: var(--green-soft); color: var(--green); border-radius: 50%; font-size: 1.3rem; }
.dropzone small { color: var(--muted); }
.review-card { border: 1px solid var(--line); background: #fbfcfb; border-radius: 14px; padding: 18px; }
.review-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.review-head button { border: 0; background: transparent; color: var(--green); font-size: .78rem; cursor: pointer; text-decoration: underline; }
.review-card dl { display: grid; grid-template-columns: repeat(2, 1fr); gap: 13px 20px; margin: 16px 0 0; }
.review-card dt { color: var(--muted); font-size: .68rem; }
.review-card dd { margin: 1px 0 0; font-size: .85rem; font-weight: 650; overflow-wrap: anywhere; }
.consent { display: flex; gap: 11px; align-items: flex-start; padding: 15px; border: 1px solid var(--line); border-radius: 11px; cursor: pointer; background: #fff; }
.consent input { width: 19px; min-height: 19px; margin: 3px 0 0; accent-color: var(--green); }
.consent span { font-size: .81rem; font-weight: 400; }

.form-actions { display: flex; align-items: center; margin-top: 34px; padding-top: 24px; border-top: 1px solid #edf1ee; gap: 10px; }
.button { min-height: 46px; border-radius: 10px; padding: 10px 18px; border: 1px solid transparent; font-weight: 750; cursor: pointer; transition: .18s; white-space: nowrap; }
.button span { display: inline-block; }
.button:hover span { transform: translateX(2px); }
.button.primary { color: white; background: var(--green); box-shadow: 0 6px 18px rgba(19,133,79,.18); }
.button.primary:hover { background: var(--green-dark); transform: translateY(-1px); }
.button.ghost { background: white; border-color: var(--line); }
.button:disabled { cursor: wait; opacity: .65; transform: none; }
.save-note { color: var(--muted); font-size: .69rem; margin: 0 auto; text-align: center; }
.error-summary { display: flex; align-items: flex-start; gap: 13px; margin: 0 0 22px; padding: 16px 18px; color: #8f241d; background: linear-gradient(135deg, #fff7f5, #fff1ef); border: 1px solid #efc0bc; border-left: 4px solid var(--danger); border-radius: 14px; box-shadow: 0 8px 24px rgba(201,54,43,.07); font-size: .84rem; }
.error-summary[hidden] { display: none; }
.error-summary-icon { flex: 0 0 auto; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--danger); font-weight: 800; }
.error-summary b { display: block; margin: 2px 0 4px; font-size: .9rem; }
.error-summary ul { margin: 0; padding-left: 18px; }
.error-summary li + li { margin-top: 3px; }

.success { background: white; border: 1px solid #dfe9e3; border-radius: 22px; padding: 64px 32px; text-align: center; box-shadow: var(--shadow); }
.success-icon { width: 70px; height: 70px; display: grid; place-items: center; margin: 0 auto 24px; border-radius: 50%; color: white; background: var(--green); font-size: 2rem; box-shadow: 0 0 0 10px var(--green-soft); }
.success > p { max-width: 570px; margin-left: auto; margin-right: auto; }
.success > strong { display: inline-block; margin: 10px 0 18px; padding: 10px 18px; color: var(--green-dark); background: var(--green-soft); border-radius: 8px; font-family: ui-monospace, monospace; letter-spacing: .06em; }
.success-appointment { max-width: 480px; margin: 0 auto 20px; padding: 16px; background: #f7f9f8; border-radius: 10px; font-weight: 700; }
.success > [hidden] { display: none !important; }
.success.existing .success-icon { color: var(--green-dark); background: #dff2e7; box-shadow: 0 0 0 10px #f1f8f4; }
.muted { color: var(--muted); font-size: .85rem; }
footer { color: #88948e; text-align: center; font-size: .68rem; margin-top: 26px; }

@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .brand-panel { position: relative; min-height: 540px; height: auto; }
  .brand-inner { margin: 0; max-width: none; min-height: 540px; padding: 42px clamp(24px, 7vw, 70px); }
  .brand-panel h1 { font-size: clamp(2.7rem, 9vw, 4.8rem); }
  .lead { max-width: 650px; }
  .culture { margin-top: 34px; }
}

@media (max-width: 640px) {
  .brand-panel { min-height: 500px; }
  .brand-inner { min-height: 500px; }
  blockquote { margin: 26px 0 10px; }
  .company-story { display: none; }
  .form-wrap { width: min(100% - 24px, 830px); padding-top: 38px; }
  .stepper { margin: 30px 0; }
  .step b { display: none; }
  .step { min-width: 38px; }
  form { padding: 22px 17px; border-radius: 17px; }
  .form-step { grid-template-columns: 1fr; gap: 20px; }
  .full, legend { grid-column: 1; }
  .choice-grid, .review-card dl { grid-template-columns: 1fr; }
  .time-slots { grid-template-columns: repeat(3, 1fr); }
  .save-note { display: none; }
  .form-actions { justify-content: space-between; }
  #next-button, #submit-button { margin-left: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
