:root {
  color-scheme: light;
  --ink: #071638;
  --muted: #526074;
  --line: #d6deec;
  --blue: #1454d8;
  --blue-dark: #07318f;
  --gold: #f5b51b;
  --green: #127c57;
  --red: #b42318;
  --surface: #ffffff;
  --wash: #eef5ff;
  --shadow: 0 24px 70px rgba(7, 22, 56, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--ink);
  background:
    linear-gradient(
      135deg,
      rgba(20, 84, 216, 0.12),
      rgba(18, 124, 87, 0.1),
      rgba(245, 181, 27, 0.13)
    ),
    #f7f9fd;
}

button,
input,
textarea {
  font: inherit;
}

.shell {
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
  display: grid;
  grid-template-columns: minmax(300px, 0.86fr) minmax(420px, 1.14fr);
  gap: 28px;
  align-items: start;
}

.poster-panel {
  position: sticky;
  top: 24px;
  border: 1px solid rgba(20, 84, 216, 0.18);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.poster-panel img {
  display: block;
  width: 100%;
  height: auto;
}

.registration-panel {
  display: grid;
  gap: 18px;
}

.page-header,
.summary,
.form,
.result {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(7, 22, 56, 0.09);
  border-radius: 8px;
  box-shadow: 0 14px 38px rgba(7, 22, 56, 0.08);
}

.page-header {
  padding: 28px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 1.1rem;
}

.intro {
  max-width: 68ch;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.summary {
  padding: 20px;
}

.summary-head {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

#summaryStatus {
  color: var(--muted);
  font-size: 0.9rem;
}

.session-summary,
.session-choices {
  display: grid;
  gap: 12px;
}

.session-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.session-card,
.choice-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.session-card {
  min-height: 154px;
  padding: 16px;
  display: grid;
  gap: 10px;
}

.session-card h3,
.choice-title {
  margin: 0;
  font-size: 1rem;
}

.session-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.seat-meter {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8edf7;
}

.seat-meter span {
  display: block;
  height: 100%;
  width: var(--fill, 0%);
  background: linear-gradient(90deg, var(--blue), var(--green), var(--gold));
}

.seat-count {
  margin: 0;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
}

.form {
  padding: 24px;
  display: grid;
  gap: 18px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

label,
fieldset {
  min-width: 0;
}

label {
  display: grid;
  gap: 8px;
}

label > span,
legend {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 800;
}

input,
textarea {
  width: 100%;
  border: 1px solid #c8d2e3;
  border-radius: 6px;
  background: #fbfcff;
  color: var(--ink);
  outline: none;
}

input {
  height: 46px;
  padding: 0 13px;
}

textarea {
  min-height: 132px;
  resize: vertical;
  padding: 12px 13px;
  line-height: 1.45;
}

input:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(20, 84, 216, 0.16);
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  gap: 12px;
}

.legend-row {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}

.legend-row p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.small-button,
.submit-button {
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 800;
}

.small-button {
  flex: 0 0 auto;
  padding: 10px 12px;
  color: var(--blue-dark);
  background: #e7efff;
}

.small-button:hover {
  background: #d9e6ff;
}

.choice-card {
  position: relative;
}

.choice-card input {
  position: absolute;
  inset: 18px auto auto 16px;
  width: 20px;
  height: 20px;
  accent-color: var(--blue);
}

.choice-card label {
  min-height: 86px;
  padding: 16px 16px 16px 52px;
  cursor: pointer;
}

.choice-card:has(input:checked) {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(20, 84, 216, 0.11);
}

.choice-title {
  display: flex;
  gap: 8px;
  align-items: baseline;
  justify-content: space-between;
}

.choice-title strong {
  color: var(--blue-dark);
}

.choice-title span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.choice-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.notice {
  padding: 13px 14px;
  border-left: 4px solid var(--gold);
  border-radius: 6px;
  color: #39455b;
  background: #fff7df;
  line-height: 1.45;
}

.application-status {
  margin-bottom: 14px;
}

.application-status.open {
  border-left-color: var(--green);
  background: #ddf6eb;
}

.submit-button {
  min-height: 52px;
  padding: 0 18px;
  color: #fff;
  background: var(--blue);
  box-shadow: 0 10px 22px rgba(20, 84, 216, 0.25);
}

.submit-button:hover {
  background: #0f47bd;
}

.submit-button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.result {
  padding: 22px;
}

.compact-header h2 {
  margin-bottom: 8px;
}

.compact-header p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.student-login {
  display: grid;
  gap: 14px;
}

.account-panel {
  display: grid;
  gap: 12px;
}

.account-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.small-button.danger {
  color: #8a1f17;
  background: #ffe5e1;
}

.result h2 {
  margin-bottom: 12px;
}

.result p {
  color: var(--muted);
  line-height: 1.5;
}

.status-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.status-item {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.status-pill {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
}

.status-pill.confirmed {
  color: var(--green);
  background: #ddf6eb;
}

.status-pill.waitlist {
  color: #8a5a00;
  background: #fff0bf;
}

.status-pill.overflow {
  color: var(--red);
  background: #ffe5e1;
}

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

@media (max-width: 980px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .poster-panel {
    position: static;
    max-width: 620px;
    margin: 0 auto;
  }
}

@media (max-width: 720px) {
  .shell {
    width: min(100% - 20px, 620px);
    padding: 10px 0 24px;
  }

  .page-header,
  .summary,
  .form,
  .result {
    padding: 18px;
  }

  .session-summary,
  .field-grid {
    grid-template-columns: 1fr;
  }

  .legend-row,
  .status-item {
    align-items: stretch;
    flex-direction: column;
  }

  .small-button,
  .submit-button {
    width: 100%;
  }
}
