.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  height: 0;
  width: 0;
  overflow: hidden;
}

.form-status {
  display: block;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  font-size: .85rem;
  padding: 0 14px;
  border-radius: 8px;
  margin-bottom: 0;
  transition: opacity .3s ease, max-height .3s ease, padding .3s ease, margin-bottom .3s ease;
}

.form-status.show {
  max-height: 120px;
  opacity: 1;
  padding: 10px 14px;
  margin-bottom: 16px;
}

.form-status.success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.form-status.error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.course-fieldset {
  border: none;
  padding: 0;
  margin: 0 0 14px;
}

.course-fieldset legend {
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--ink);
  padding: 0;
  width: 100%;
}

.referral-section {
  min-width: 0;
  margin: 0 0 14px;
  padding: 16px 0 0;
  border: 0;
  border-top: 1px solid var(--border);
}

.referral-section legend {
  padding: 0;
  color: var(--ink);
  font-size: .85rem;
  font-weight: 600;
}

.referral-section legend span {
  color: var(--muted);
  font-weight: 400;
}

.referral-section .row {
  margin: 12px 0 0;
}

@media (prefers-reduced-motion:reduce) {
  * {
    transition: none !important;
    animation: none !important
  }
}

html,
body {
  min-height: 100%;
}

:root {
  --ink: #14141a;
  --muted: #6b7280;
  --border: #e2e4ea;
  --border-focus: #2563eb;
  --error: #dc2626;
  --success: #16a34a;
  --accent: #fbbf24;
  --accent-dark: #f59e0b;
  --card-bg: #ffffff;
  --page-bg: #eef0f5;
  --radius: 10px;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--card-bg);
  color: var(--ink);
}

.page {
  width: 100%;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: stretch;
  padding: 0;
  background: var(--card-bg);
}

.card {
  background: var(--card-bg);
  width: 100%;
  max-width: none;
  min-height: 100vh;
  border-radius: 0;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  box-shadow: none;
  overflow: hidden;
  isolation: isolate;
  position: relative;
}

.card form {
  display: block;
  width: 100%;
}

h1 {
  margin: 0 0 6px;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -.01em;
}

.subtitle {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.4;
}

.row {
  display: flex;
  gap: 14px;
  margin-bottom: 14px;
}

.field {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  margin-bottom: 14px;
}

.row .field {
  margin-bottom: 0;
}

.field.full {
  width: 100%;
}

label {
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--ink);
}

.req {
  color: var(--error);
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.input-wrap .icon {
  padding-left: 12px;
  display: flex;
  align-items: center;
  color: var(--muted);
  flex-shrink: 0;
}

.input-wrap .icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.input-wrap input,
.input-wrap select {
  border: none;
  outline: none;
  background: transparent;
  padding: 11px 12px;
  font-size: .92rem;
  width: 100%;
  color: var(--ink);
  font-family: inherit;
}

.select-wrap select {
  padding: 11px 12px;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8'><path d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.6' fill='none' fill-rule='evenodd'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 30px;
}

.select-wrap select:invalid,
.select-wrap select option[value=""] {
  color: var(--muted);
}

.phone-wrap .prefix {
  padding: 0 4px 0 6px;
  font-size: .92rem;
  color: var(--ink);
  border-right: 1px solid var(--border);
  margin-right: 4px;
}

.input-wrap:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.field.invalid .input-wrap,
.field.invalid select {
  border-color: var(--error);
}

.field.invalid .input-wrap:focus-within {
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .12);
}

.field.valid .input-wrap {
  border-color: var(--success);
}

.error-msg {
  display: none;
  color: var(--error);
  font-size: .78rem;
  margin-top: 5px;
  line-height: 1.3;
}

.field.invalid .error-msg {
  display: block;
}

textarea {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 11px 12px;
  font-size: .92rem;
  font-family: inherit;
  resize: vertical;
  min-height: 90px;
  outline: none;
  color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}

textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.char-count {
  align-self: flex-end;
  font-size: .75rem;
  color: var(--muted);
  margin-top: 4px;
}

.course-option {
  display: block;
  cursor: pointer;
  margin-bottom: 10px;
  position: relative;
}

.course-option .course-checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.course-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  transition: border-color .15s ease, background .15s ease;
}

.course-check {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  border: 1.5px solid var(--border);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .15s ease, border-color .15s ease;
}

.course-check svg {
  width: 11px;
  height: 9px;
  opacity: 0;
  transition: opacity .1s ease;
}

.course-option .course-checkbox:checked~.course-card {
  border-color: var(--accent-dark);
  background: #fffaf0;
}

.course-option .course-checkbox:checked~.course-card .course-check {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.course-option .course-checkbox:checked~.course-card .course-check svg {
  opacity: 1;
}

.course-option .course-checkbox:focus-visible~.course-card {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

.course-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.course-title {
  font-weight: 700;
  font-size: .92rem;
}

.course-desc {
  font-size: .8rem;
  color: var(--muted);
}

.course-price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
  text-align: right;
}

.badge {
  background: #e11d48;
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  margin-bottom: 2px;
}

.old-price {
  font-size: .75rem;
  color: var(--muted);
  text-decoration: line-through;
}

.new-price {
  font-size: 1rem;
  font-weight: 800;
  color: var(--ink);
}


.gst-note {
  font-size: .68rem;
  color: var(--muted);
}

.order-summary {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card-bg);
  padding: 14px 16px;
  margin-top: -4px;
}

.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .88rem;
  color: var(--muted);
  padding: 4px 0;
}

.summary-row span:last-child {
  font-weight: 600;
  color: var(--ink);
}

.summary-total {
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  font-size: 1rem;
  color: var(--ink);
}

.summary-total span:last-child {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--accent-dark);
}

.summary-hint {
  margin: 6px 0 0;
  font-size: .78rem;
  color: var(--muted);
}

.order-summary.has-selection {
  border-color: var(--accent-dark);
}

.checkbox-field {
  margin-top: 4px;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 400;
  font-size: .82rem;
  color: var(--muted);
  cursor: pointer;
}

.custom-checkbox {
  position: relative;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

.custom-checkbox input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.checkbox-box {
  position: absolute;
  inset: 0;
  border-radius: 5px;
  border: 1.5px solid var(--border);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease, border-color .15s ease;
  pointer-events: none;
}

.checkbox-box svg {
  width: 10px;
  height: 8px;
  opacity: 0;
  transition: opacity .1s ease;
}

.custom-checkbox input[type="checkbox"]:checked~.checkbox-box {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.custom-checkbox input[type="checkbox"]:checked~.checkbox-box svg {
  opacity: 1;
}

.custom-checkbox input[type="checkbox"]:focus-visible~.checkbox-box {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

.checkbox-field.invalid .error-msg {
  display: block;
}

button[type="submit"] {
  width: 100%;
  margin-top: 18px;
  background: var(--accent);
  color: #14141a;
  border: none;
  border-radius: 10px;
  padding: 14px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s ease, opacity .15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

button[type="submit"]:disabled {
  opacity: .55;
  cursor: not-allowed;
}

button[type="submit"]:not(:disabled):hover {
  background: var(--accent-dark);
}

button[type="submit"]:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

.btn-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(20, 20, 26, .25);
  border-top-color: #14141a;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

button[type="submit"].loading .btn-spinner {
  display: inline-block;
}

button[type="submit"].loading .btn-label {
  opacity: .7;
}

@keyframes spin {
  to {
    transform: rotate(360deg)
  }
}

.privacy {
  text-align: center;
  font-size: .75rem;
  color: var(--muted);
  margin: 14px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.lock-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

@media (max-width:560px) {
  .row {
    flex-direction: column;
    gap: 14px
  }

  .card {
    padding: 20px 16px 18px
  }

  h1 {
    font-size: 1.3rem
  }
}
