:root {
  color-scheme: light;
  --ink: #11182a;
  --muted: #505d70;
  --blue: #165bd5;
  --line: #dce4f1;
  --canvas: #f4f7fc;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--canvas); }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .62; }
:focus-visible { outline: 3px solid #1263dd; outline-offset: 4px; }
.site-header { position: relative; z-index: 1; background: #fff; border-bottom: 1px solid #e7ebf3; }
.site-header nav { max-width: 1120px; padding: 10px 24px; min-height: 65px; margin: auto; display: flex; align-items: center; gap: 24px; }
.brand { margin-right: auto; display: inline-flex; align-items: center; }
.brand img { width: 139px; height: 37px; object-fit: contain; object-position: left; }
.nav-link, .share { white-space: nowrap; font-size: .87rem; font-weight: 620; }
.share { color: var(--ink); background: #f2f5fa; border: 1px solid var(--line); padding: 9px 14px; min-height: 40px; border-radius: 999px; }
.share:hover { background: #e7eef9; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 46px; border: 1px solid transparent; border-radius: 999px; padding: 11px 23px; font-weight: 690; line-height: 1.4; font-size: .96rem; }
.primary { background: var(--blue); color: #fff; }
.primary:hover { background: #114eae; text-decoration: none; }
.quiet { color: #174784; background: #f1f6fe; border-color: #dce7f8; }
.quiet:hover { background: #e4edfb; }
.card { padding: clamp(22px, 4vw, 39px); background: #fff; border: 1px solid #e6ebf4; border-radius: 27px; box-shadow: 0 13px 40px #25375c0a; margin-bottom: 20px; }
.workflow, .terms { scroll-margin-top: 20px; }
.workflow-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 25px; }
h2 { margin: 0; font-size: clamp(1.55rem, 4vw, 2.05rem); letter-spacing: -.045em; }
h3 { margin: 0; font-size: 1.13rem; }
p { line-height: 1.6; }
.workflow-heading p, .terms p, .result p, .receipt p, dialog p { margin: 6px 0 0; color: var(--muted); }
progress { width: 96px; height: 8px; accent-color: var(--blue); }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px 20px; margin-bottom: 24px; }
label { display: grid; gap: 7px; font-size: .93rem; font-weight: 650; min-width: 0; }
input:not([type=checkbox]), select { width: 100%; min-height: 45px; border: 1px solid #cad7e9; border-radius: 10px; padding: 10px 12px; background: #f8faff; color: var(--ink); font-weight: 500; font-size: 1rem; }
select { padding-right: 18px; }
.result, .receipt { border-radius: 17px; background: #edf5ff; padding: 20px; }
.result .actions, dialog .actions { margin-top: 17px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.profile-summary { padding: 0; display: flex; flex-wrap: wrap; gap: 7px; margin: -8px 0 23px; list-style: none; }
.profile-summary li { background: #edf4ff; color: #24446e; border-radius: 999px; padding: 6px 10px; font-size: .83rem; }
.hint { margin: -11px 0 16px; color: var(--muted); font-size: .84rem; }
.application-schools { margin: 0 0 22px; }
.application-schools h3 { margin-bottom: 9px; }
.application-schools .hint { margin: 0 0 16px; }
.application-school { position: relative; min-width: 0; margin: 0 0 15px; padding: 10px 16px 16px; border: 1px solid var(--line); border-radius: 14px; }
.application-school legend { padding: 0 5px; color: #24446e; font-size: .89rem; font-weight: 700; }
.application-school-head { display: flex; justify-content: flex-end; }
.remove-school { border: 0; border-radius: 7px; background: transparent; color: #7e3243; font-size: .85rem; padding: 5px 8px; min-height: 31px; }
.remove-school:hover { background: #f9edf1; }
.application-school .field-grid { margin-bottom: 0; }
#add-school { gap: 5px; }
.submitter { max-width: 390px; }
.consent { display: flex; align-items: flex-start; gap: 9px; margin: 17px 0 19px; font-weight: 500; line-height: 1.5; }
.consent input { margin: 3px 0 0; width: 18px; height: 18px; flex: 0 0 auto; accent-color: var(--blue); }
.notice { min-height: 1.4em; margin-bottom: 0; color: #284c79; font-size: .92rem; }
.notice:empty { display: none; }
.notice.error { color: #9a2837; }
.receipt code { display: block; margin-top: 10px; overflow-wrap: anywhere; font-size: .91rem; }
.terms-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 20px 0 24px; }
.terms-grid p { font-size: .94rem; }
footer { display: flex; flex-wrap: wrap; gap: 14px; max-width: 1020px; margin: 0 auto; padding: 0 24px 34px; color: var(--muted); font-size: .85rem; }
dialog { max-width: min(460px,calc(100vw - 28px)); border: 1px solid var(--line); border-radius: 22px; padding: 24px; color: var(--ink); box-shadow: 0 20px 65px #14234445; }
dialog::backdrop { background: #17223d80; }
dialog label { margin-top: 15px; }

.gift-page {
  --ink: #1d1d1f;
  --muted: #515154;
  --blue: #0066cc;
  --line: #dedee5;
  --canvas: #f5f5f7;
  --page-width: 1168px;
  --gutter: clamp(20px, 4.3vw, 56px);
}
.gift-page .site-header { background: var(--canvas); border-color: var(--line); }
.gift-page .site-header nav {
  max-width: var(--page-width);
  padding: 12px var(--gutter);
  min-height: 70px;
  flex-wrap: wrap;
  row-gap: 8px;
}
.gift-page .brand img { width: 132px; }
.gift-page .nav-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); }
.gift-page .share { background: transparent; border-color: #d2d2d7; min-height: 44px; }
.gift-page .share:hover { background: #eaeef5; }
.gift-page :focus-visible { outline-color: #0066cc; }
.gift-page main:focus { outline: none; }
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 5;
  transform: translateY(-150%);
  padding: 12px 16px;
  background: white;
  color: #0058a9;
}
.skip-link:focus { transform: none; }
.gift-page .hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 310px);
  gap: clamp(38px, 6vw, 90px);
  align-items: center;
  max-width: var(--page-width);
  padding: clamp(42px, 6vw, 86px) var(--gutter) 42px;
  margin: 0 auto;
}
.hero-copy { position: relative; z-index: 1; animation: gift-entrance .45s ease-out both; }
.logo-backdrop {
  position: absolute;
  inset: 8px var(--gutter) 6px;
  z-index: 0;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  grid-template-rows: repeat(5, minmax(0, 1fr));
  justify-items: center;
  align-items: center;
  gap: clamp(7px, 1vw, 18px);
  overflow: hidden;
  pointer-events: none;
  opacity: .2;
}
.backdrop-logo {
  width: clamp(82px, 9vw, 112px);
  height: clamp(44px, 5.1vw, 58px);
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 8px;
  border: 1px solid #fff;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 7px 22px #1f35631c;
  color: #31475d;
  font-size: .66rem;
  font-weight: 700;
  text-align: center;
  animation: logo-float 7s ease-in-out infinite alternate;
}
.backdrop-logo img { display: block; width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.backdrop-logo[data-school-label="Queen’s University"] img { transform: scale(1.13); }
.backdrop-logo:nth-child(3n+1) { animation-delay: -1.2s; animation-duration: 7.5s; }
.backdrop-logo:nth-child(3n+2) { animation-delay: -3.5s; animation-duration: 8.8s; }
.backdrop-logo:nth-child(3n) { animation-delay: -5.1s; animation-duration: 6.8s; }
.logo-backdrop.is-paused .backdrop-logo { animation-play-state: paused; }
@keyframes logo-float { from { transform: translate3d(0, -5px, 0); } to { transform: translate3d(5px, 7px, 0); } }
.eyebrow { margin: 0 0 19px; color: #0759a8; font-size: .87rem; font-weight: 690; letter-spacing: .1em; }
.hero h1 {
  margin: 0;
  font-size: clamp(3.55rem, 6.3vw, 5.4rem);
  font-weight: 760;
  line-height: 1.1;
  letter-spacing: -.065em;
}
.hero-description { max-width: 29ch; margin: 23px 0 27px; color: var(--muted); font-size: clamp(1.03rem, 1.55vw, 1.2rem); line-height: 1.72; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.hero-note { color: var(--muted); font-size: .86rem; }
.gift-page .button { border-radius: 999px; min-height: 48px; }
.gift-page .primary:hover { background: #005ab5; }
.gift-page .quiet { background: #f2f6fc; color: #005aab; border-color: #d8e0ed; }
.gift-page .quiet:hover { background: #eaeef5; }
.hero-actions .button { gap: 17px; }
.hero-reward {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  justify-self: end;
  gap: 14px;
  overflow: hidden;
  width: 100%;
  height: 258px;
  border-radius: 24px;
  border: 1px solid #ffffffde;
  background: linear-gradient(145deg, #ffffffed 14%, #eaf2ffec 100%);
  box-shadow: 0 24px 66px #1c59a71a, inset 0 1px #fff;
  text-align: center;
  animation: gift-entrance .65s ease-out both;
}
.hero-reward::before {
  content: "";
  position: absolute;
  width: min(75%, 370px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, #7bb1fc4d, #7bb1fc00 70%);
  pointer-events: none;
}
.reward-label, .reward-note, .reward-amount { position: relative; }
.reward-label { color: #375579; font-size: .92rem; font-weight: 650; letter-spacing: .06em; }
.reward-amount { display: flex; align-items: baseline; gap: 12px; color: #0066cc; font-variant-numeric: lining-nums tabular-nums; }
.reward-amount span { font-size: 1.25rem; font-weight: 700; letter-spacing: -.025em; }
.reward-amount strong { font-size: clamp(4.5rem, 7vw, 6.4rem); font-weight: 710; line-height: .84; letter-spacing: -.09em; }
.reward-note { color: #3f546d; font-size: .86rem; }
.school-strip { max-width: var(--page-width); padding: 0 var(--gutter); margin: 0 auto 42px; }
.school-strip-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.school-strip h2 { margin: 0; font-size: clamp(1.4rem, 3vw, 1.88rem); letter-spacing: -.035em; }
.motion-toggle {
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--blue);
  background: transparent;
  font-size: .82rem;
}
.motion-toggle:hover { background: #e8eef8; }
.school-directory { margin-top: 13px; border: 1px solid var(--line); background: #fff; border-radius: 16px; }
.school-directory summary { padding: 14px 16px; color: var(--blue); font-weight: 650; cursor: pointer; min-height: 48px; }
.school-directory summary span { color: var(--muted); font-size: .84rem; font-weight: 500; }
.school-directory-content { padding: 1px 16px 16px; }
.school-directory-content label { margin-bottom: 7px; }
.school-match-count { margin: 10px 0 6px; color: var(--muted); font-size: .85rem; }
.school-directory-scroll { max-height: 335px; overflow: auto; }
.school-directory-results { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 15px; list-style: none; padding: 0; margin: 0; }
.school-directory-results li { padding: 9px 0; border-top: 1px solid #e6e7ed; overflow-wrap: anywhere; }
.school-directory-results strong { display: block; color: var(--ink); font-size: .87rem; }
.school-directory-results span { display: block; color: var(--muted); font-size: .77rem; margin-top: 3px; }
.gift-page .content { max-width: var(--page-width); margin: 0 auto; padding: 0 var(--gutter) 32px; }
.gift-page .card { border: 1px solid var(--line); box-shadow: none; border-radius: 12px; margin-bottom: 25px; }
.gift-page .workflow-heading { margin-bottom: 22px; }
.gift-page .workflow h2, .gift-page .terms h2 { font-size: clamp(1.45rem, 3.4vw, 2rem); letter-spacing: -.025em; }
.quiz-progress { display: grid; align-items: center; justify-items: end; gap: 5px; font-size: .76rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.gift-page progress { height: 7px; }
.gift-page #visa-contact { display: grid; gap: 8px; width: 100%; }
.gift-page #visa-contact[hidden] { display: none; }
.gift-page #visa-note { margin: 0; font-weight: 650; }
.gift-page #visa-link, .gift-page #copy-visa-email { min-height: 44px; min-width: 44px; font-size: 16px; }
.gift-page #visa-link { width: 100%; }
.gift-page .visa-address { display: flex; gap: 8px; align-items: center; min-width: 0; }
.gift-page .visa-address input { flex: 1; min-width: 0; font-size: 16px; min-height: 44px; }
.gift-page .quiz-options button { width: 100%; min-height: 44px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); font-size: 16px; font-weight: 650; text-align: left; }
.gift-page .quiz-options button[aria-checked="true"] { border-color: var(--blue); background: #edf5ff; }
.gift-page { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
html[data-bo-font="large"] { font-size: 112.5%; }
.gift-page .font-toggle { display: inline-flex; gap: 4px; }
.gift-page .font-toggle button { min-height: 44px; min-width: 44px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: max(16px, 1rem); }
.gift-page .font-toggle button[aria-pressed="true"] { background: #edf5ff; border-color: var(--blue); }
.gift-page .application-school .school-fields,
.gift-page .credential-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
.gift-page .application-school label,
.gift-page .secret-field { align-items: start; }
.gift-page input:not([type=checkbox]),
.gift-page select {
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  max-width: 100%;
  height: 3rem;
  min-height: 3rem;
  max-height: 3rem;
  margin: 0;
  padding: 0 0.75rem;
  font-size: max(16px, 1rem);
  line-height: 1.2;
  align-self: start;
}
html[data-bo-font="large"] .gift-page input:not([type=checkbox]),
html[data-bo-font="large"] .gift-page select,
html[data-bo-font="large"] .gift-page .password-toggle {
  height: auto;
  min-height: 3rem;
  max-height: none;
}
@media (min-width: 768px) {
  .gift-page .credential-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.gift-page .school-chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.gift-page .chip-group { display: grid; gap: 6px; min-width: 0; }
.gift-page .chip-choices { display: grid; gap: 6px; }
.gift-page .chip-choices[hidden] { display: none !important; }
.gift-page .school-chips button,
.gift-page .chip-choices button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  height: auto;
  max-height: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f4f7fc;
  color: var(--ink);
  padding: 8px 10px;
  font-size: max(16px, 1rem);
  font-weight: 650;
  text-align: left;
  white-space: normal;
}
.gift-page .school-chips small,
.gift-page .chip-choices small { display: block; color: var(--muted); font-size: 0.75rem; font-weight: 500; line-height: 1.3; }
@media (min-width: 768px) {
  .gift-page .school-chips { grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); }
}
.gift-page .school-results { list-style: none; margin: 0; padding: 4px; max-height: 280px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.gift-page .school-results [role="presentation"] { padding: 8px 10px 2px; color: var(--muted); font-size: .8rem; font-weight: 700; }
.gift-page .school-results button { display: block; width: 100%; border: 0; border-radius: 8px; background: transparent; color: var(--ink); text-align: left; padding: 8px 10px; }
.gift-page .school-results button[aria-selected="true"] { background: #edf5ff; }
.gift-page .school-results button small { display: block; color: var(--muted); font-size: .8rem; font-weight: 500; }
.gift-page .school-picker-status { margin: 0; color: var(--muted); font-size: .85rem; }
.gift-page .school-picker-status:empty { display: none; }
.gift-page input:not([type=checkbox]), .gift-page select, .gift-page textarea { border-color: #c9cfda; background: #fbfbfd; scroll-margin-top: 72px; scroll-margin-bottom: 140px; }
.gift-page .secret-field { display: grid; gap: 7px; min-width: 0; }
.gift-page .secret-control { display: flex; align-items: start; gap: 8px; }
.gift-page .secret-control input { min-width: 0; flex: 1; }
.gift-page .password-toggle { flex: 0 0 auto; box-sizing: border-box; height: 3rem; min-width: 44px; min-height: 3rem; padding: 0 12px; border: 1px solid #c9cfda; border-radius: 10px; background: #fff; color: var(--ink); font-size: max(16px, 1rem); font-weight: 650; }
.gift-page .field-error { margin: 0; color: #9a2837; font-size: 16px; font-weight: 650; line-height: 1.4; }
.gift-page .field-error:empty { display: none; }
.gift-page input[aria-invalid="true"], .gift-page select[aria-invalid="true"] { border-color: #9a2837; background: #fff6f7; }
.gift-page .submit-bar { position: sticky; bottom: 0; z-index: 3; display: grid; gap: 8px; margin-top: 12px; padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); background: color-mix(in srgb, #fff 94%, transparent); border-top: 1px solid var(--line); }
.gift-page .submit-bar .primary { width: 100%; min-height: 48px; }
.gift-page .spinner { width: 1em; height: 1em; margin-right: 8px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: gift-spin .7s linear infinite; }
.gift-page .remove-school { min-height: 44px; padding: 8px 12px; }
.gift-page .consent { min-height: 44px; scroll-margin-bottom: 140px; }
.gift-page .consent input { width: 22px; height: 22px; }
@keyframes gift-spin { to { transform: rotate(1turn); } }
.gift-page .result, .gift-page .receipt { background: #edf5ff; border-radius: 9px; }
.gift-page .profile-summary li { background: #edf3fc; color: #22476d; }
.gift-page .application-school { border-radius: 9px; }
.gift-page .application-school legend { color: #0759a8; }
.gift-page .remove-school { min-height: 44px; }
.gift-page .terms { background: transparent; border: 0; border-top: 1px solid var(--line); padding-inline: 0; border-radius: 0; }
.gift-page .terms .hint { margin: 0; font-size: .82rem; }
.gift-page .terms-grid > div { border-top: 1px solid var(--line); padding-top: 12px; }
.gift-page .gift-footer { max-width: var(--page-width); padding-inline: var(--gutter); justify-content: space-between; }
.gift-page dialog { border-radius: 12px; }
@keyframes gift-entrance { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (max-width: 790px) {
  .gift-page .hero { grid-template-columns: minmax(0, 1fr) minmax(190px, 32%); gap: clamp(16px, 3vw, 28px); padding-bottom: 24px; }
  .hero h1 { font-size: clamp(2.85rem, 7vw, 4.2rem); }
  .hero-reward { height: 205px; gap: 10px; border-radius: 20px; }
  .reward-label { font-size: .82rem; }
  .reward-amount { gap: 7px; }
  .reward-amount strong { font-size: 4.3rem; }
  .reward-amount span { font-size: .95rem; }
  .reward-note { font-size: .72rem; }
  .school-strip { margin-bottom: 30px; }
  .logo-backdrop { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(8, minmax(0, 1fr)); }
  .backdrop-logo:nth-child(n+33) { display: none; }
  .school-directory-results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .gift-page .hero { grid-template-columns: minmax(0, 1fr); gap: 19px; }
  .hero-reward { width: min(220px, 62vw); height: 170px; border-radius: 18px; }
  .reward-amount strong { font-size: 4rem; }
}
@media (max-width: 520px) {
  .gift-page .site-header nav { min-height: 60px; padding: 8px 12px; gap: 8px; }
  .gift-page .brand img { width: 96px; height: 32px; }
  .gift-page .share { padding-inline: 10px; }
  .gift-page .nav-link, .gift-page .share { font-size: .8rem; }
  .hero h1 { font-size: clamp(2.8rem, 13vw, 3.9rem); }
  .hero-description { margin: 17px 0 21px; }
  .hero-reward { gap: 9px; }
  .reward-label { font-size: .78rem; }
  .reward-amount span { font-size: .85rem; }
  .reward-note { font-size: .69rem; }
  .logo-backdrop { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(6, minmax(0, 1fr)); opacity: .15; }
  .backdrop-logo { width: clamp(54px, 17vw, 76px); height: 44px; padding: 7px; }
  .backdrop-logo:nth-child(n+25) { display: none; }
  .school-directory-results { grid-template-columns: 1fr; }
  .field-grid, .terms-grid { grid-template-columns: 1fr; gap: 14px; }
  .gift-page .card { padding: 21px 16px; }
  .gift-page .terms { padding-inline: 0; }
  .gift-page .workflow-heading { gap: 13px; }
  .quiz-progress { justify-items: start; }
  .gift-page .hero-actions .primary, .gift-page .workflow .primary { width: 100%; }
  .gift-page .hero-actions { gap: 7px; }
}
@media (max-width: 360px) {
  .gift-page { --gutter: 12px; }
  .gift-page .card { padding: 16px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-copy, .hero-reward, .backdrop-logo, .gift-page .spinner { animation: none; }
  .motion-toggle { display: none; }
}
