:root {
  color-scheme: dark;
  --ink: #f7f3ea;
  --muted: #bfd0dc;
  --paper: #14293a;
  --panel: #18231f;
  --line: #33433c;
  --pine: #8fc9f2;
  --field: #102233;
  --blue-panel: #142635;
  --blue-panel-soft: #172d40;
  --blue-field: #10263a;
  --blue-line: #31516a;
  --blue-chip: #1d3a52;
  --gold: #e2b659;
  --brick: #ffb0a6;
  --sky: #1b2c31;
  --focus: #a9d5ff;
  --shadow: 0 24px 70px rgba(3, 15, 28, 0.34);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-text-size-adjust: 100%;
}

main {
  overflow: hidden;
}

.hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 86svh;
  background: #14293a;
}

.hero__art {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(20, 41, 58, 0.26), rgba(20, 41, 58, 0.82)),
    radial-gradient(circle at center, rgba(20, 41, 58, 0.42), rgba(20, 41, 58, 0.62) 42%, rgba(12, 29, 45, 0.86) 78%);
}

.hero__art picture,
.hero__art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__art img {
  object-fit: cover;
  object-position: center;
  opacity: 0.46;
}

.hero__content {
  position: relative;
  z-index: 2;
  align-self: center;
  width: min(920px, calc(100% - 36px));
  padding: clamp(28px, 5vw, 56px);
  text-align: center;
}

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

h1,
h2 {
  margin: 0;
  color: var(--ink);
  line-height: 0.98;
  letter-spacing: 0;
}

h1 {
  max-width: 9ch;
  margin-inline: auto;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 7rem;
  font-weight: 700;
}

h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 4rem;
}

.hero__content > p:not(.eyebrow) {
  max-width: 37rem;
  margin: 28px auto;
  color: #eef2ea;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.55;
}

.impact-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 30px;
}

.impact-row span {
  display: grid;
  gap: 2px;
  min-width: 132px;
  padding: 14px 16px;
  border: 1px solid rgba(143, 201, 242, 0.36);
  background: rgba(15, 35, 53, 0.66);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  backdrop-filter: blur(3px);
}

.impact-row strong {
  color: var(--pine);
  font-size: 1.05rem;
}

.registration {
  display: grid;
  grid-template-columns: minmax(220px, 360px) minmax(0, 760px);
  gap: clamp(24px, 6vw, 88px);
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 74px 0 88px;
}

.thank-you-section {
  display: grid;
  grid-template-columns: minmax(220px, 360px) minmax(0, 760px);
  gap: clamp(24px, 6vw, 88px);
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 74px 0 88px;
}

.thank-you-message {
  display: grid;
  gap: 20px;
  padding: 36px;
  border: 1px solid var(--blue-line);
  border-radius: 8px;
  background: var(--blue-panel);
  box-shadow: var(--shadow);
}

.thank-you-message p {
  margin: 0;
  color: #eef2ea;
  font-size: 1.15rem;
  line-height: 1.65;
}

.thank-you-link {
  display: inline-grid;
  place-items: center;
  width: fit-content;
  min-width: 210px;
  padding: 0 22px;
  text-decoration: none;
}

.section-heading {
  position: sticky;
  top: 24px;
  align-self: start;
}

.section-heading h2 {
  max-width: 8ch;
}

.form {
  display: grid;
  gap: 22px;
  padding: 36px;
  border: 1px solid var(--blue-line);
  border-radius: 8px;
  background: var(--blue-panel);
  box-shadow: var(--shadow);
}

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

label,
fieldset {
  display: grid;
  gap: 8px;
  margin: 0;
  color: #e6ece5;
  font-size: 0.92rem;
  font-weight: 750;
}

fieldset {
  padding: 0;
  border: 0;
}

legend {
  margin: 0;
  padding: 0;
  color: #e6ece5;
  font-weight: 800;
}

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

.fieldset-heading span {
  padding: 6px 10px;
  border: 1px solid rgba(169, 213, 255, 0.26);
  border-radius: 999px;
  color: var(--pine);
  background: var(--blue-chip);
  font-size: 0.85rem;
  font-weight: 900;
  white-space: nowrap;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--blue-line);
  border-radius: 8px;
  background: var(--blue-field);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
}

input {
  min-height: 48px;
  padding: 0 14px;
}

textarea {
  resize: vertical;
  padding: 14px;
  line-height: 1.45;
}

input:focus,
textarea:focus,
button:focus-visible {
  outline: 3px solid rgba(38, 79, 130, 0.28);
  outline-offset: 2px;
  border-color: var(--focus);
}

.money-field {
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--blue-line);
  border-radius: 8px;
  background: var(--blue-field);
}

.money-field span {
  padding-left: 14px;
  color: var(--muted);
  font-weight: 900;
}

.money-field input {
  border: 0;
  background: transparent;
}

.shirt-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.shirt-control {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--blue-line);
  border-radius: 8px;
  background: #10202e;
}

.shirt-control span {
  color: var(--pine);
  font-size: 1rem;
  font-weight: 900;
}

.shirt-control input {
  min-height: 42px;
  text-align: center;
}

.quantity-stepper {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid var(--blue-line);
  border-radius: 8px;
  background: var(--blue-field);
}

.quantity-stepper button {
  display: grid;
  place-items: center;
  width: 42px;
  min-height: 42px;
  border: 0;
  border-radius: 0;
  background: var(--blue-chip);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 1.35rem;
  font-weight: 950;
  line-height: 1;
}

.quantity-stepper button:hover {
  background: #274a66;
}

.quantity-stepper button:active {
  background: #315c7b;
}

.quantity-stepper input {
  min-height: 42px;
  padding: 0 6px;
  border: 0;
  border-left: 1px solid var(--blue-line);
  border-right: 1px solid var(--blue-line);
  border-radius: 0;
  background: transparent;
  text-align: center;
  appearance: textfield;
}

.quantity-stepper input::-webkit-outer-spin-button,
.quantity-stepper input::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
}

.checkout-panel {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(169, 213, 255, 0.26);
  border-radius: 8px;
  background: #102638;
}

.checkout-panel div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: #d8ded6;
}

.checkout-panel strong {
  color: var(--ink);
  font-size: 1.05rem;
}

.checkout-panel__total {
  padding-top: 12px;
  border-top: 1px solid rgba(169, 213, 255, 0.24);
  font-size: 1.25rem;
  font-weight: 900;
}

.checkout-panel__total strong {
  font-size: 1.45rem;
}

.pay-button {
  min-height: 54px;
  border: 0;
  border-radius: 8px;
  background: #8fc9f2;
  color: #071725;
  cursor: pointer;
  font: inherit;
  font-size: 1rem;
  font-weight: 900;
  transition: transform 160ms ease, background 160ms ease;
}

.pay-button:hover {
  background: #b4ddfa;
  transform: translateY(-1px);
}

.pay-button:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.status {
  min-height: 1.4em;
  margin: -8px 0 0;
  color: var(--brick);
  font-weight: 750;
}

.status[data-tone="success"] {
  color: var(--pine);
}

@media (max-width: 860px) {
  .hero {
    min-height: 88svh;
  }

  .hero__art {
    min-height: 0;
  }

  .hero__art img {
    object-position: center;
    opacity: 0.42;
  }

  .hero__content {
    width: min(100% - 28px, 560px);
    padding: 28px 20px;
  }

  h1 {
    max-width: 10ch;
    font-size: 4.2rem;
  }

  h2 {
    font-size: 3rem;
  }

  .registration {
    grid-template-columns: 1fr;
    width: min(100% - 28px, 680px);
    padding: 48px 0 64px;
  }

  .thank-you-section {
    grid-template-columns: 1fr;
    width: min(100% - 28px, 680px);
    padding: 48px 0 64px;
  }

  .section-heading {
    position: static;
  }

  .section-heading h2 {
    max-width: 11ch;
  }

  .form {
    padding: 24px;
  }

  .thank-you-message {
    padding: 24px;
  }
}

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

  .shirt-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .impact-row span {
    flex: 1 1 calc(50% - 10px);
    min-width: 0;
  }

  .impact-row span:last-child {
    flex-basis: 100%;
  }

  .checkout-panel {
    padding: 16px;
  }

  .checkout-panel div {
    align-items: start;
  }

  .pay-button {
    min-height: 58px;
    width: 100%;
  }

  input {
    min-height: 52px;
  }

  .quantity-stepper {
    grid-template-columns: 46px minmax(0, 1fr) 46px;
  }

  .quantity-stepper button,
  .quantity-stepper input {
    min-height: 46px;
  }

  .quantity-stepper button {
    width: 46px;
    font-size: 1.45rem;
  }
}

@media (max-width: 430px) {
  .hero {
    min-height: 92svh;
  }

  .hero::before {
    background:
      linear-gradient(180deg, rgba(20, 41, 58, 0.28), rgba(20, 41, 58, 0.78)),
      radial-gradient(circle at center, rgba(20, 41, 58, 0.46), rgba(20, 41, 58, 0.62) 48%, rgba(12, 29, 45, 0.86) 82%);
  }

  .hero__content {
    width: min(100% - 22px, 390px);
    padding: 24px 14px;
  }

  .eyebrow {
    font-size: 0.74rem;
  }

  h1 {
    max-width: 11ch;
    font-size: 3.15rem;
    line-height: 1;
  }

  h2 {
    font-size: 2.45rem;
  }

  .hero__content > p:not(.eyebrow) {
    margin: 22px auto;
    font-size: 1rem;
    line-height: 1.5;
  }

  .impact-row {
    gap: 8px;
    margin-top: 22px;
  }

  .impact-row span {
    padding: 12px;
    font-size: 0.85rem;
  }

  .registration {
    width: min(100% - 20px, 390px);
    padding-top: 38px;
  }

  .thank-you-section {
    width: min(100% - 20px, 390px);
    padding-top: 38px;
  }

  .form {
    gap: 18px;
    padding: 18px;
  }

  .thank-you-message {
    gap: 18px;
    padding: 18px;
  }

  .thank-you-message p {
    font-size: 1rem;
  }

  .thank-you-link {
    width: 100%;
  }

  .fieldset-heading {
    align-items: start;
    flex-direction: column;
    gap: 8px;
  }

  .shirt-control {
    padding: 10px;
  }

  .quantity-stepper {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
  }

  .quantity-stepper button {
    width: 44px;
  }

  .checkout-panel__total {
    font-size: 1.12rem;
  }

  .checkout-panel__total strong {
    font-size: 1.28rem;
  }
}

.admin-page {
  position: relative;
  min-height: 100vh;
  background: var(--paper);
  background-image:
    linear-gradient(180deg, rgba(20, 41, 58, 0.8), rgba(12, 29, 45, 0.9)),
    url("/background-image.jpg");
  background-attachment: fixed;
  background-position: center;
  background-size: cover;
}

.admin-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 38px 0 72px;
  overflow: visible;
}

.admin-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.admin-header > div {
  min-width: 0;
  max-width: 100%;
}

.admin-header h1 {
  max-width: none;
  margin: 0;
  font-size: 5.4rem;
}

.admin-user {
  margin: 10px 0 0;
  color: var(--muted);
  font-weight: 800;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px;
}

.text-link {
  color: var(--pine);
  font-weight: 850;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
  white-space: nowrap;
}

.login-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
}

.login-shell {
  display: grid;
  width: min(560px, calc(100% - 32px));
  overflow: visible;
}

.login-panel {
  display: grid;
  gap: 20px;
  padding: clamp(24px, 5vw, 42px);
  border: 1px solid var(--blue-line);
  border-radius: 8px;
  background: rgba(20, 38, 53, 0.92);
  box-shadow: var(--shadow);
}

.login-panel h1 {
  max-width: 10ch;
  margin: 0;
  font-size: clamp(3rem, 9vw, 5rem);
}

.login-panel p {
  margin: 0;
  color: #eef2ea;
  font-size: 1.08rem;
  line-height: 1.6;
}

.login-button {
  display: inline-grid;
  place-items: center;
  width: fit-content;
  min-width: 220px;
  padding: 0 22px;
  text-decoration: none;
}

.admin-summary,
.shirt-totals {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.admin-summary article,
.shirt-totals article {
  display: grid;
  gap: 8px;
  min-height: 112px;
  padding: 18px;
  border: 1px solid var(--blue-line);
  border-radius: 8px;
  background: var(--blue-panel);
  box-shadow: 0 14px 34px rgba(3, 15, 28, 0.24);
}

.admin-summary span,
.shirt-totals span {
  color: var(--muted);
  font-weight: 800;
}

.admin-summary strong,
.shirt-totals strong {
  align-self: end;
  color: var(--pine);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.4rem;
  line-height: 1;
}

.admin-section {
  margin-top: 28px;
}

.admin-section__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.admin-section h2 {
  font-size: 3.2rem;
}

.secondary-button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(169, 213, 255, 0.28);
  border-radius: 8px;
  background: var(--blue-chip);
  color: #cbe8ff;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.secondary-button:hover {
  background: #274a66;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--blue-line);
  border-radius: 8px;
  background: var(--blue-panel);
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  min-width: 940px;
  border-collapse: collapse;
}

th,
td {
  padding: 15px 16px;
  border-bottom: 1px solid var(--blue-line);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--blue-chip);
  color: #dfe9e1;
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

td {
  color: #e8eee8;
  line-height: 1.45;
}

td strong,
td span {
  display: block;
}

td span {
  color: var(--muted);
  font-size: 0.9rem;
}

tbody tr:last-child td {
  border-bottom: 0;
}

mark {
  display: inline-flex;
  min-width: 92px;
  justify-content: center;
  padding: 5px 9px;
  border-radius: 999px;
  background: #5b2525;
  color: #ffd6d6;
  font-weight: 900;
}

mark[data-status="paid"] {
  background: #254535;
  color: #bce8ce;
}

mark[data-status="pending"] {
  background: #5b2525;
  color: #ffd6d6;
}

mark[data-status="checkout_failed"] {
  background: #5b2525;
  color: #ffd6d6;
}

@media (max-width: 760px) {
  .admin-header,
  .admin-section__heading {
    align-items: start;
    flex-direction: column;
  }

  .admin-actions {
    justify-content: flex-start;
  }

  .admin-summary,
  .shirt-totals {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .admin-page {
    background-image:
      linear-gradient(180deg, rgba(20, 41, 58, 0.72), rgba(12, 29, 45, 0.9)),
      url("/flag-background-image.jpg");
    background-attachment: scroll;
    background-position: center top;
  }

  .admin-shell {
    width: min(100% - 24px, 430px);
    padding-top: 28px;
  }

  .admin-header {
    margin-bottom: 22px;
  }

  .admin-header h1 {
    max-width: 100%;
    font-size: 2.9rem;
    overflow-wrap: anywhere;
  }

  .login-button {
    width: 100%;
  }

  .admin-section h2 {
    font-size: 2.35rem;
  }

  .admin-summary,
  .shirt-totals {
    gap: 10px;
  }

  .admin-summary article,
  .shirt-totals article {
    min-height: 94px;
    padding: 14px;
  }

  .admin-summary strong,
  .shirt-totals strong {
    font-size: 2rem;
  }

  .secondary-button {
    width: 100%;
  }

  .table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  table,
  thead,
  tbody,
  tr,
  td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  thead {
    display: none;
  }

  tr {
    margin-bottom: 12px;
    border: 1px solid var(--blue-line);
    border-radius: 8px;
    background: var(--blue-panel);
    box-shadow: 0 14px 34px rgba(3, 15, 28, 0.24);
    overflow: hidden;
  }

  td {
    display: grid;
    grid-template-columns: minmax(86px, 34%) minmax(0, 1fr);
    gap: 12px;
    padding: 13px 14px;
    border-bottom: 1px solid var(--blue-line);
  }

  td:first-child {
    display: block;
    background: #10263a;
  }

  td:not(:first-child)::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
  }

  td:last-child {
    border-bottom: 0;
  }
}
