@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Lao:wght@400;500;600;700;800&display=swap');

:root {
  color-scheme: light;
  --ink: #1e3733;
  --muted: #6c817c;
  --line: #ccdad5;
  --surface: #ffffff;
  --canvas: #edf5f2;
  --accent: #1f766a;
  --accent-dark: #155b52;
  --accent-soft: #e0f1ec;
  --danger: #b84c52;
  --shadow: 0 24px 60px rgba(43, 85, 77, 0.12);
}

* { box-sizing: border-box; }

html { min-width: 320px; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--canvas);
  color: var(--ink);
  font-family: 'Noto Sans Lao', 'Noto Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  display: block;
  height: 12px;
  background: var(--accent-dark);
  opacity: 0.96;
}

.page-shell {
  width: min(100%, 900px);
  margin: 0 auto;
  padding: 54px 24px 72px;
}

.form-card {
  position: relative;
  width: min(100%, 680px);
  margin: 0 auto;
  padding: 42px 52px 50px;
  background: var(--surface);
  border: 1px solid rgba(31, 118, 106, 0.08);
  border-radius: 28px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.form-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--accent-dark), #54ab98, #c0e5da);
}

.top-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 13px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 24px;
  font-weight: 800;
}

.view-link {
  padding-top: 9px;
  color: var(--accent-dark);
  font-size: 0.8rem;
  font-weight: 800;
  text-decoration: none;
}

.view-link:hover { text-decoration: underline; }

.eyebrow {
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

h1 {
  max-width: 580px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.65rem, 4vw, 2.25rem);
  line-height: 1.35;
  letter-spacing: -0.035em;
}

.intro {
  margin: 10px 0 34px;
  color: var(--muted);
  font-size: 0.98rem;
}

form { display: grid; gap: 23px; }

.field-group {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

label, legend {
  display: block;
  margin-bottom: 9px;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 700;
}

.required { color: var(--accent); }

input[type='text'],
input[type='email'],
input[type='tel'],
input[type='date'] {
  display: block;
  width: 100%;
  min-height: 51px;
  padding: 11px 15px;
  border: 1.5px solid var(--line);
  border-radius: 9px;
  background: #fcfefd;
  color: var(--ink);
  font: inherit;
  font-size: 0.96rem;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input::placeholder { color: #a8b8b4; }

input[type='text']:focus,
input[type='email']:focus,
input[type='tel']:focus,
input[type='date']:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(31, 118, 106, 0.12);
}

input.invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px rgba(184, 76, 82, 0.1);
}

.error {
  min-height: 0;
  margin: 6px 0 0;
  color: var(--danger);
  font-size: 0.78rem;
  line-height: 1.45;
}

.error:empty { display: none; }

.choice-group { padding-top: 1px; }

.option-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
}

.choice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #4f6863;
  font-size: 0.94rem;
  font-weight: 600;
  cursor: pointer;
}

.choice input {
  width: 19px;
  height: 19px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.submit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: fit-content;
  min-width: 174px;
  min-height: 51px;
  margin-top: 6px;
  padding: 11px 22px;
  border: 0;
  border-radius: 10px;
  background: var(--accent-dark);
  color: #fff;
  font: inherit;
  font-size: 0.96rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(21, 91, 82, 0.18);
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.submit-button:hover { background: #0f4d45; box-shadow: 0 13px 24px rgba(21, 91, 82, 0.24); }
.submit-button:active { transform: translateY(1px); }
.submit-button:disabled { opacity: 0.7; cursor: wait; }
.submit-button:focus-visible { outline: 3px solid rgba(31, 118, 106, 0.35); outline-offset: 3px; }
.submit-button span { font-size: 1.2rem; line-height: 1; }

.form-status {
  display: none;
  padding: 13px 15px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.55;
}

.form-status.show { display: block; }
.form-status.error-state { background: #fff1f0; color: var(--danger); }

@media (max-width: 600px) {
  body::before { height: 8px; }
  .page-shell { padding: 24px 13px 42px; }
  .form-card { padding: 31px 22px 34px; border-radius: 20px; }
  .top-actions { align-items: flex-start; }
  .view-link { max-width: 140px; padding-top: 4px; text-align: right; }
  h1 { font-size: 1.55rem; }
  .intro { margin-bottom: 28px; }
  form { gap: 20px; }
  .option-row { gap: 12px 17px; }
  .skills-row { display: grid; grid-template-columns: repeat(2, max-content); }
  .submit-button { width: 100%; }
}
