:root {
  --astar-navy: #0b1f3a;
  --astar-navy-mid: #163a66;
  --astar-gold: #c9a227;
  --astar-ink: #0f1a28;
  --astar-muted: #5a6574;
  --astar-surface: #f3f5f8;
  --astar-card: #ffffff;
  --astar-border: rgba(11, 31, 58, 0.16);
  --astar-shadow: 0 8px 24px rgba(11, 31, 58, 0.08);
  --astar-radius: 10px;
  --astar-font-display: "Syne", system-ui, sans-serif;
  --astar-font-body: "DM Sans", system-ui, sans-serif;
}

.astar-page {
  margin: 0;
  min-height: 100vh;
  font-family: var(--astar-font-body);
  color: var(--astar-ink);
  background:
    linear-gradient(180deg, #e8eef5 0%, var(--astar-surface) 28%, #f7f8fa 100%);
}

.astar-main { padding: 1.25rem 1rem 3rem; }
.astar-wrap { max-width: 760px; margin: 0 auto; }

.astar-brand {
  display: grid;
  gap: 1rem;
  justify-items: center;
  text-align: center;
  margin-bottom: 1.1rem;
  animation: astar-up 0.6s ease both;
}

.astar-brand__logos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  width: min(560px, 100%);
  align-items: stretch;
}

.astar-logo-plate,
.astar-partner-plate {
  display: grid;
  place-items: center;
  min-height: 88px;
  height: 88px;
  padding: 0.6rem 0.85rem;
  border-radius: var(--astar-radius);
  border: 1px solid var(--astar-border);
  box-shadow: none;
  box-sizing: border-box;
}

.astar-logo-plate {
  background: #ffffff;
}

.astar-partner-plate {
  background: #0b1f3a;
  border-color: rgba(11, 31, 58, 0.35);
}

.astar-logo-plate img,
.astar-partner-plate img {
  display: block;
  width: 100%;
  max-width: 220px;
  height: 68px;
  object-fit: contain;
  object-position: center;
}

.astar-brand__logo {
  /* legacy class kept for older markup */
  width: auto;
  height: auto;
}
.astar-hero-visual,
.astar-about__figure {
  margin: 0 0 1rem;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--astar-border);
  background: #fff;
  box-shadow: 0 16px 40px rgba(11, 31, 58, 0.08);
}
.astar-hero-visual img,
.astar-about__figure img {
  display: block;
  width: 100%;
  height: auto;
}
.astar-about {
  margin: 0 0 1.1rem;
  padding: 1rem 1.1rem 1.1rem;
  border-radius: var(--astar-radius);
  background: #ffffff;
  border: 1px solid var(--astar-border);
}
.astar-about h2 {
  margin: 0 0 0.4rem;
  font-family: var(--astar-font-display);
  color: var(--astar-navy);
  font-size: 1.35rem;
}
.astar-about__lead {
  margin: 0 0 0.75rem;
  color: var(--astar-muted);
  line-height: 1.55;
}
.astar-workshops {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}
.astar-workshops li {
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  background: rgba(11, 31, 58, 0.05);
  color: var(--astar-navy);
  font-weight: 700;
  font-size: 0.86rem;
  border: 1px solid rgba(11, 31, 58, 0.08);
}
.astar-about__figure {
  margin: 0;
}
.astar-about__figure figcaption {
  padding: 0.65rem 0.85rem 0.85rem;
  color: var(--astar-muted);
  font-size: 0.82rem;
}
.astar-brand__eyebrow {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--astar-navy-mid);
}
.astar-brand__institute,
.astar-brand h1.astar-brand__institute {
  margin: 0.35rem 0 0;
  font-family: var(--astar-font-display);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: clamp(0.95rem, 2.2vw, 1.15rem);
  color: var(--astar-navy-mid);
  line-height: 1.35;
}
.astar-brand__tag { margin: 0.45rem 0 0; color: var(--astar-muted); }
.astar-pills { display: flex; flex-wrap: wrap; gap: 0.45rem; justify-content: center; margin-top: 0.75rem; }
.astar-pill {
  padding: 0.28rem 0.55rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: rgba(11, 31, 58, 0.07);
  color: var(--astar-navy);
  border: 1px solid rgba(11, 31, 58, 0.1);
}
.astar-pill--gold { background: rgba(201, 162, 39, 0.18); color: #6b5410; border-color: rgba(201, 162, 39, 0.35); }

.astar-brochure-bar {
  display: flex;
  justify-content: center;
  margin-bottom: 0.85rem;
  padding: 0.55rem;
  border-radius: var(--astar-radius);
  background: linear-gradient(90deg, var(--astar-gold), #e0c35a, var(--astar-gold));
  border: 1px solid rgba(107, 84, 16, 0.2);
}
.astar-brochure-btn {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0.5rem 1.1rem;
  border-radius: 8px;
  background: var(--astar-navy);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.astar-actions { display: flex; justify-content: center; margin-bottom: 1rem; }
.astar-btn {
  min-height: 42px;
  padding: 0.5rem 0.95rem;
  border-radius: 8px;
  border: 1px solid var(--astar-border);
  background: #fff;
  color: var(--astar-navy);
  font-weight: 700;
  cursor: pointer;
}
.astar-btn--primary { background: var(--astar-navy); color: #fff; border-color: transparent; }
.astar-btn--ghost { background: #fff; }

.astar-form-card {
  background: var(--astar-card);
  border-radius: var(--astar-radius);
  border: 1px solid var(--astar-border);
  box-shadow: var(--astar-shadow);
  border-top: 3px solid var(--astar-navy);
  animation: astar-up 0.55s ease both;
}
.astar-form-card__head { padding: 1.1rem 1.15rem 0.45rem; }
.astar-form-card__head h2 {
  margin: 0;
  font-family: var(--astar-font-display);
  color: var(--astar-navy);
  letter-spacing: -0.02em;
}
.astar-form-card__head p, .astar-hint, .astar-privacy { color: var(--astar-muted); font-size: 0.88rem; }
.astar-form-card__body { padding: 0.45rem 1.15rem 1.2rem; display: grid; gap: 0.8rem; }
.astar-field {
  display: grid;
  grid-template-rows: auto auto auto auto;
  align-content: start;
  gap: 0.3rem;
  min-width: 0;
}
.astar-field label, .astar-field__legend { font-weight: 700; font-size: 0.86rem; line-height: 1.3; }
.astar-req { color: #b42318; }
.astar-field input:not([type="radio"]):not([type="checkbox"]),
.astar-field select,
.astar-dialog input {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  height: 48px;
  min-height: 48px;
  max-height: 48px;
  padding: 0 0.9rem;
  border-radius: 8px;
  border: 1px solid rgba(11, 31, 58, 0.18);
  font: inherit;
  font-size: 16px;
  line-height: 1.25;
  background: #fff;
  color: var(--astar-ink);
  box-shadow: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
  appearance: none;
  vertical-align: middle;
}
.astar-field select {
  padding-right: 2.4rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23475569' d='M1.1 1.2 6 6.1l4.9-4.9 1.1 1.1L6 8.2.0 2.3z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  background-size: 12px 8px;
  cursor: pointer;
}
.astar-field input:focus,
.astar-field select:focus,
.astar-dialog input:focus {
  outline: none;
  border-color: var(--astar-navy);
  box-shadow: 0 0 0 2px rgba(11, 31, 58, 0.12);
}
.astar-hint {
  margin: 0;
  min-height: 1.2em;
  font-size: 0.82rem;
  line-height: 1.35;
}
.astar-field-error {
  margin: 0;
  min-height: 1.15em;
  color: #b42318;
  font-size: 0.82rem;
  line-height: 1.3;
}

/* School combo */
.astar-school-combo {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: stretch;
  height: 48px;
  min-height: 48px;
  border: 1px solid rgba(11, 31, 58, 0.18);
  border-radius: 8px;
  background: #fff;
  overflow: visible;
  box-shadow: none;
  box-sizing: border-box;
}
.astar-school-combo input {
  border: none !important;
  box-shadow: none !important;
  border-radius: 8px 0 0 8px !important;
  background: transparent !important;
  height: 46px !important;
  min-height: 46px !important;
  max-height: 46px !important;
  width: 100%;
  padding: 0 0.9rem !important;
  font-size: 16px;
  line-height: 1.25;
}
.astar-school-combo__toggle {
  border: none;
  border-left: 1px solid rgba(11, 31, 58, 0.12);
  background: #f4f7fb;
  color: var(--astar-navy);
  padding: 0 0.85rem;
  cursor: pointer;
  font-size: 0.95rem;
  border-radius: 0 8px 8px 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
}
.astar-school-combo:focus-within {
  border-color: var(--astar-navy);
  box-shadow: 0 0 0 2px rgba(11, 31, 58, 0.12);
}
.astar-field.is-invalid .astar-school-combo {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.12);
}
.astar-school-combo__list {
  position: absolute;
  top: calc(100% + 0.3rem);
  left: 0;
  right: 0;
  z-index: 40;
  margin: 0;
  padding: 0.3rem;
  list-style: none;
  max-height: 240px;
  overflow: auto;
  border-radius: 8px;
  border: 1px solid var(--astar-border);
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
}
.astar-school-combo__list li {
  padding: 0.6rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  color: #0f172a;
}
.astar-school-combo__list li:hover,
.astar-school-combo__list li:focus,
.astar-school-combo__list li[aria-selected="true"] {
  background: rgba(37, 99, 235, 0.1);
  outline: none;
}
.astar-school-combo__empty {
  color: #64748b;
  cursor: default !important;
  font-weight: 500 !important;
}

/* Custom pick dropdown */
.astar-pick {
  position: relative;
  width: 100%;
}
.astar-pick__btn {
  width: 100%;
  height: 48px;
  min-height: 48px;
  max-height: 48px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.5rem;
  padding: 0 0.9rem;
  border-radius: 8px;
  border: 1px solid rgba(11, 31, 58, 0.18);
  background: #fff;
  box-shadow: none;
  font: inherit;
  font-size: 16px;
  line-height: 1.25;
  color: var(--astar-ink);
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}
.astar-pick__btn:hover {
  border-color: rgba(11, 31, 58, 0.35);
}
.astar-pick.is-open .astar-pick__btn,
.astar-pick__btn:focus-visible {
  outline: none;
  border-color: var(--astar-navy);
  box-shadow: 0 0 0 2px rgba(11, 31, 58, 0.12);
}
.astar-pick__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}
.astar-pick__label.is-placeholder {
  color: #94a3b8;
  font-weight: 500;
}
.astar-pick__chevron {
  width: 2.1rem;
  height: 1.9rem;
  border-radius: 6px;
  background: #f4f7fb;
  color: var(--astar-navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  transition: transform 0.15s ease;
}
.astar-pick__chevron::before {
  content: "▾";
  font-size: 0.9rem;
  line-height: 1;
}
.astar-pick.is-open .astar-pick__chevron {
  transform: rotate(180deg);
}
.astar-pick__list {
  position: absolute;
  top: calc(100% + 0.3rem);
  left: 0;
  right: 0;
  z-index: 45;
  margin: 0;
  padding: 0.3rem;
  list-style: none;
  max-height: 240px;
  overflow: auto;
  border-radius: 8px;
  border: 1px solid var(--astar-border);
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
}
.astar-pick__list[hidden] {
  display: none !important;
}
.astar-pick__list li {
  padding: 0.6rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  color: #0f172a;
}
.astar-pick__list li:hover,
.astar-pick__list li[aria-selected="true"] {
  background: rgba(37, 99, 235, 0.1);
}
.astar-pick__list li[data-value=""] {
  color: #64748b;
  font-weight: 500;
}
.astar-field.is-invalid .astar-pick__btn {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.12);
}

.astar-grid { display: grid; gap: 0.85rem; align-items: start; }
.astar-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.astar-gender { display: none; }
.astar-gender__opt {
  display: none;
}
.astar-fee {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--astar-border);
  background: #f7f9fc;
}
.astar-custom-section {
  margin-top: 1.15rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(11, 31, 58, 0.12);
}
.astar-custom-section h3 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  color: var(--astar-navy);
}
.astar-declaration {
  margin: 0.85rem 0 0;
  font-size: 0.86rem;
  color: var(--astar-muted);
  line-height: 1.45;
}
.astar-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.astar-choice {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid rgba(11, 31, 58, 0.16);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: 0.88rem;
}
.astar-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-weight: 600;
}
.astar-fee__amount { display: block; font-size: 1.35rem; color: var(--astar-navy); }
.astar-submit {
  width: 100%;
  min-height: 48px;
  border: none;
  border-radius: 8px;
  background: var(--astar-navy);
  color: #fff;
  font-weight: 800;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
  cursor: pointer;
}
.astar-honeypot { position: absolute; left: -10000px; opacity: 0; height: 0; width: 0; }
.astar-footer { text-align: center; padding: 1.5rem; color: var(--astar-muted); font-size: 0.86rem; }
.astar-footer a { color: var(--astar-navy); }
.astar-toast-stack { position: fixed; right: 1rem; bottom: 1rem; z-index: 50; display: grid; gap: 0.5rem; }
.astar-toast {
  background: var(--astar-navy);
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  max-width: 320px;
}
.astar-toast.is-error { background: #b42318; }
.astar-pending-banner {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(180, 83, 9, 0.35);
  background: #fff7ed;
  color: #9a3412;
}
.astar-pending-banner strong { display: block; margin-bottom: 0.2rem; }
.astar-pending-banner p { margin: 0; font-size: 0.88rem; line-height: 1.4; }
.astar-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  border: none;
  padding: 0;
  background: transparent;
  max-width: 420px;
  width: calc(100% - 2rem);
}
.astar-dialog::backdrop { background: rgba(11, 31, 58, 0.45); }
.astar-dialog__card {
  background: #fff;
  border-radius: 16px;
  padding: 1.2rem;
  display: grid;
  gap: 0.55rem;
}
.astar-dialog__actions { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 0.5rem; }
.astar-status-result { margin-top: 0.5rem; padding: 0.75rem; border-radius: 12px; background: #f8fafc; font-size: 0.9rem; }

@keyframes astar-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@keyframes astar-fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 640px) {
  .astar-grid--2 { grid-template-columns: 1fr; }
  .astar-fee { flex-direction: column; }
  .astar-workshops { grid-template-columns: 1fr; }
  .astar-brand__logos {
    gap: 0.65rem;
  }
  .astar-logo-plate,
  .astar-partner-plate {
    min-height: 84px;
    height: 84px;
    padding: 0.55rem 0.7rem;
  }
  .astar-logo-plate img,
  .astar-partner-plate img {
    height: 56px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .astar-brand,
  .astar-form-card,
  .pay-success__card {
    animation: none !important;
  }
}
