:root {
  --red: #ed1c24;
  --red-dark: #c90f18;
  --green: #05aa5b;
  --green-dark: #078548;
  --ink: #121826;
  --muted: #5e6675;
  --line: #dfe4ea;
  --soft: #f5f7f9;
  --white: #ffffff;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #fff 0%, #f7f8fa 65%, #fff 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
body::before {
  content: "";
  display: block;
  height: 7px;
  background: linear-gradient(90deg, var(--red) 0 33.3%, var(--green) 33.3% 66.6%, #f58220 66.6%);
}
.site-header {
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid #edf0f3;
  box-shadow: 0 5px 20px rgba(25, 31, 45, .06);
}
.brand-wrap {
  width: min(1160px, calc(100% - 34px));
  margin: 0 auto;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand-logo { width: 330px; max-width: 65%; height: 72px; object-fit: contain; object-position: left center; }
.home-link {
  color: var(--white);
  background: var(--red);
  text-decoration: none;
  font-weight: 800;
  padding: 12px 22px;
  border-radius: 7px;
}
.home-link:hover { background: var(--red-dark); }
main { width: min(1160px, calc(100% - 34px)); margin: 38px auto 58px; }
.hero { text-align: center; }
.event-title { display: block; width: 100%; height: auto; margin: 0 auto 25px; }
.event-facts {
  display: grid;
  grid-template-columns: repeat(5, 1fr) auto;
  align-items: stretch;
  background: var(--white);
  border: 1px solid #edf0f3;
  border-radius: 13px;
  box-shadow: 0 9px 28px rgba(22, 30, 44, .09);
  overflow: hidden;
}
.fact {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 13px;
  border-right: 1px solid var(--line);
  font-weight: 800;
  line-height: 1.25;
}
.fact small { display: block; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.fact-icon { color: var(--red); font-size: 25px; }
.free-badge { display: grid; place-items: center; padding: 14px 22px; color: #fff; background: linear-gradient(135deg, var(--green), var(--green-dark)); font-size: 17px; font-weight: 900; }
.form-card {
  margin-top: 30px;
  padding: 42px 46px;
  background: var(--white);
  border: 1px solid #e9edf1;
  border-radius: 20px;
  box-shadow: 0 16px 46px rgba(26, 34, 51, .10);
}
.content-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; }
.syllabus-panel { padding: 14px; background: #fff; border: 1px solid #e9edf1; border-radius: 15px; box-shadow: 0 16px 46px rgba(26, 34, 51, .10); }
.syllabus-panel h2 { margin: 0 0 10px; font-size: 21px; }
.syllabus-panel h3 { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 10px; font-size: 22px; }
.syllabus-meta { display: flex; align-items: center; justify-content: space-between; gap: 7px; margin: 0 -4px 12px; padding: 8px 9px; color: #fff; background: #ce0505; border-radius: 6px; font-size: 10px; font-weight: 800; }
.syllabus-title { margin: 0 0 10px; font-size: 21px; }
.science-panel { min-width: 0; }
.science-panel > .syllabus-meta { margin: 0 0 12px; }
.subject-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.subject-card { padding: 16px; box-shadow: 0 10px 30px rgba(26, 34, 51, .09); }
.subject-icon { display: inline-grid; place-items: center; width: 31px; height: 31px; color: #fff; border-radius: 50%; font-size: 17px; }
.physics-icon { background: #176cc6; }
.english-icon { background: #059447; }
.syllabus-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.syllabus-list li { position: relative; padding-left: 17px; color: #253044; font-size: 12px; line-height: 1.35; }
.syllabus-list li::before { content: "✓"; position: absolute; left: 0; top: 1px; display: grid; place-items: center; width: 12px; height: 12px; color: #fff; background: #38c978; border-radius: 50%; font-size: 8px; font-weight: 900; }
.maths-panel h2 { display: flex; align-items: center; justify-content: space-between; }
.maths-panel h2::after { content: "▣"; display: grid; place-items: center; width: 32px; height: 32px; color: #fff; background: #6c24c7; border-radius: 50%; font-size: 17px; }
.form-heading { margin-bottom: 27px; }
.eyebrow { margin: 0 0 7px !important; color: var(--red) !important; font-size: 12px !important; font-weight: 900; letter-spacing: .12em; }
.form-heading h2 { margin: 0; font-size: clamp(27px, 4vw, 40px); line-height: 1.15; }
.form-heading p { margin: 9px 0 0; color: var(--muted); font-size: 17px; }
.form-grid, .marks-grid, .campus-grid { display: grid; gap: 22px; }
.two-columns, .campus-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.marks-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 22px; }
label > span, legend { display: block; margin-bottom: 9px; font-weight: 800; }
b { color: var(--red); }
input[type="text"], input[type="tel"], input[type="password"], input[type="number"] {
  width: 100%;
  height: 55px;
  border: 1.5px solid #cfd6de;
  border-radius: 9px;
  padding: 0 16px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-size: 16px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
input:focus { border-color: var(--green); box-shadow: 0 0 0 4px rgba(5, 170, 91, .12); }
input::placeholder { color: #9ba4b2; }
form > label { display: block; margin-top: 22px; }
fieldset { padding: 0; margin: 28px 0 0; border: 0; }
legend { padding: 0; margin-bottom: 12px; font-size: 18px; }
.campus-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 15px;
  min-height: 122px;
  padding: 20px;
  border: 2px solid #d9dfe6;
  border-radius: 13px;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .2s;
}
.campus-option:hover { transform: translateY(-2px); border-color: #9eb7aa; }
.campus-option:has(input:checked) { border-color: var(--green); background: #f1fff8; box-shadow: 0 0 0 4px rgba(5,170,91,.09); }
.campus-option input { position: absolute; opacity: 0; }
.radio-mark { flex: 0 0 24px; width: 24px; height: 24px; border: 2px solid #77808e; border-radius: 50%; position: relative; }
.campus-option input:checked + .radio-mark { border-color: var(--green); }
.campus-option input:checked + .radio-mark::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--green); }
.campus-copy { margin: 0; }
.campus-copy strong { display: block; margin-bottom: 5px; font-size: 18px; }
.campus-copy small { display: block; color: var(--muted); font-size: 14px; line-height: 1.4; }
.campus-copy em { display: block; color: var(--green-dark); margin-top: 8px; font-size: 15px; font-style: normal; font-weight: 900; }
.submit-button {
  width: 100%;
  min-height: 61px;
  margin-top: 27px;
  border: 0;
  border-radius: 9px;
  color: #fff;
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  box-shadow: 0 10px 24px rgba(5, 170, 91, .25);
  cursor: pointer;
  font: inherit;
  font-size: 19px;
  font-weight: 900;
}
.submit-button:hover { filter: brightness(.96); transform: translateY(-1px); }
.form-error { display: none; margin: 18px 0 0; padding: 12px 15px; color: #8b1017; background: #fff0f1; border-left: 4px solid var(--red); border-radius: 7px; font-weight: 700; }
.form-error.show { display: block; }
.privacy-note { margin: 15px 0 0; color: var(--muted); text-align: center; font-size: 13px; }
footer { color: #fff; background: linear-gradient(110deg, #e41921, #c70e17); }
.footer-inner { width: min(1160px, calc(100% - 34px)); margin: 0 auto; min-height: 155px; display: grid; grid-template-columns: 1.35fr repeat(3, 1fr); align-items: center; gap: 28px; }
.footer-inner img { width: 285px; max-width: 100%; background: #fff; border-radius: 9px; padding: 8px 12px; }
.footer-inner div { padding-left: 23px; border-left: 1px solid rgba(255,255,255,.5); }
.footer-inner strong, .footer-inner span { display: block; }
.footer-inner strong { font-size: 15px; text-transform: uppercase; }
.footer-inner span { margin-top: 7px; font-weight: 700; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 900px) {
  .event-facts { grid-template-columns: repeat(3, 1fr); }
  .fact:nth-child(3) { border-right: 0; }
  .fact:nth-child(n+4) { border-top: 1px solid var(--line); }
  .free-badge { border-top: 1px solid var(--line); }
  .marks-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: repeat(2, 1fr); padding: 30px 0; }
  .subject-grid { grid-template-columns: 1fr; }
}

@media (max-width: 650px) {
  .brand-wrap { min-height: 72px; }
  .brand-logo { height: 56px; max-width: 72%; }
  .home-link { padding: 9px 12px; font-size: 13px; }
  main { width: min(100% - 22px, 1160px); margin-top: 24px; }
  .event-title { margin-bottom: 17px; }
  .event-facts { grid-template-columns: repeat(2, 1fr); }
  .fact { min-height: 69px; padding: 8px; font-size: 13px; }
  .fact:nth-child(3) { border-right: 1px solid var(--line); }
  .fact:nth-child(even) { border-right: 0; }
  .fact:nth-child(n+3) { border-top: 1px solid var(--line); }
  .free-badge { grid-column: 1 / -1; min-height: 55px; }
  .form-card { margin-top: 21px; padding: 28px 18px; border-radius: 15px; }
  .form-heading p { font-size: 15px; }
  .two-columns, .campus-grid { grid-template-columns: 1fr; }
  .campus-option { min-height: 112px; }
  .submit-button { font-size: 16px; }
  .footer-inner { grid-template-columns: 1fr; text-align: center; }
  .footer-inner img { margin: auto; }
  .footer-inner div { padding: 0; border: 0; }
}

/* Compact desktop layout: keeps the complete registration form visible with minimal scrolling. */
@media (min-width: 901px) and (min-height: 760px) {
  main { width: min(1540px, calc(100% - 34px)); }
  .brand-wrap { min-height: 62px; }
  .brand-logo { width: 255px; height: 52px; }
  .home-link { padding: 9px 17px; font-size: 14px; }
  main { margin-top: 14px; margin-bottom: 22px; }
  .event-title { width: min(850px, 78%); max-height: 145px; object-fit: contain; margin-bottom: 10px; }
  .event-facts { width: min(1040px, 100%); margin: 0 auto; }
  .fact { min-height: 50px; padding: 6px 9px; font-size: 13px; }
  .fact small { margin-bottom: 1px; font-size: 9px; }
  .fact-icon { font-size: 18px; }
  .free-badge { padding: 8px 15px; font-size: 14px; }
  .content-layout { width: 100%; margin-top: 13px; }
  .form-card { width: 100%; margin: 0; padding: 18px 28px 16px; border-radius: 15px; }
  .syllabus-panel { position: sticky; top: 12px; padding: 12px; }
  .syllabus-panel h2 { margin-bottom: 8px; font-size: 18px; }
  .form-heading { margin-bottom: 13px; }
  .eyebrow { margin-bottom: 3px !important; font-size: 10px !important; }
  .form-heading h1, .form-heading h2 { margin: 0; font-size: 27px; line-height: 1.1; }
  .form-heading p { margin-top: 4px; font-size: 14px; }
  .form-grid, .marks-grid, .campus-grid { gap: 13px; }
  .marks-grid { margin-top: 11px; }
  form > label { margin-top: 11px; }
  label > span, legend { margin-bottom: 5px; font-size: 13px; }
  input[type="text"], input[type="tel"], input[type="password"], input[type="number"] { height: 39px; padding: 0 12px; font-size: 14px; }
  fieldset { margin-top: 13px; }
  legend { margin-bottom: 7px; font-size: 14px; }
  .campus-option { min-height: 68px; padding: 9px 14px; gap: 10px; }
  .radio-mark { flex-basis: 19px; width: 19px; height: 19px; }
  .campus-copy strong { margin-bottom: 1px; font-size: 14px; }
  .campus-copy small { font-size: 11px; }
  .campus-copy em { margin-top: 2px; font-size: 12px; }
  .submit-button { min-height: 43px; margin-top: 12px; font-size: 15px; }
  .privacy-note { margin-top: 7px; font-size: 11px; }
  footer { display: none; }
}

/* Desktop sidebar placement must depend on width, not viewport height. */
@media (min-width: 1320px) {
  main { width: min(1540px, calc(100% - 34px)); }
  .content-layout { grid-template-columns: minmax(220px, 280px) minmax(620px, 1fr) minmax(340px, 400px); gap: 18px; align-items: start; }
  .form-card { width: 100%; margin-left: 0; margin-right: 0; }
  .maths-panel, .science-panel { position: sticky; top: 12px; width: 100%; }
}

@media (max-width: 1319px) {
  .content-layout { display: flex; flex-direction: column; }
  .form-card { order: 1; width: 100%; }
  .science-panel { order: 2; width: 100%; }
  .maths-panel { order: 3; width: 100%; }
}
