@font-face {
  font-family: Inter;
  src: url("/fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #171b24;
  --muted: #545c69;
  --line: #e1e4e9;
  --soft: #f6f7f9;
  --blue: #214caa;
  --blue-dark: #173b8b;
  --blue-soft: #eef3fd;
  font: 14px/1.5 Inter, "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: white;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 300px; }
h1, h2, h3, p { margin: 0; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.container { width: min(100% - 64px, 1000px); margin-inline: auto; }

.site-header { border-bottom: 1px solid var(--line); }
.header-inner { min-height: 63px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { font-size: 14px; font-weight: 720; letter-spacing: -.015em; }
.button {
  min-height: 40px; border: 1px solid transparent; padding: 0 13px; border-radius: 6px;
  font-weight: 620; display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap;
}
.button span { font-size: 16px; line-height: 1; }
.secondary { border-color: var(--line); background: white; color: var(--ink); }
.secondary:hover { background: var(--soft); }
.header-inner .secondary { min-height: 34px; font-size: 12px; }
.primary { color: white; background: var(--blue); }
.primary:hover { background: var(--blue-dark); }
.primary:disabled { background: #e9ecf1; color: #5f6878; }

.hero { padding: 36px 0 27px; border-bottom: 1px solid var(--line); }
h1 { font-size: clamp(32px, 5vw, 46px); line-height: 1.12; font-weight: 700; letter-spacing: -.049em; }

.registration-grid {
  display: grid; grid-template-columns: minmax(0, 1.16fr) minmax(0, 1fr);
  column-gap: clamp(26px, 5vw, 72px); padding: 27px 0 30px;
}
.panel-heading { margin-bottom: 17px; }
h2 { font-size: 20px; font-weight: 700; line-height: 1.25; letter-spacing: -.028em; }
h3 { font-size: 16px; font-weight: 690; line-height: 1.35; letter-spacing: -.016em; }
.panel-heading p { color: var(--muted); margin-top: 5px; font-size: 13px; }
.heading-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.member-field > label, .append-form > label, #manage-form > label, .password-fields > label {
  font-weight: 620; padding: 0; font-size: 12px; margin-bottom: 5px;
}
.group-stage { display: flex; align-items: center; gap: 10px; padding: 17px 0; }
.group-stage:has(#confirm-group[hidden]) { border-bottom: 1px solid var(--line); }
.group-picker { flex: 1 1 236px; max-width: 236px; }
.groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.group-choice, .country-card { position: relative; cursor: pointer; }
.group-choice input, .country-card input { position: absolute; width: 1px; height: 1px; opacity: 0; margin: 0; }
.group-choice span {
  display: grid; place-items: center; min-height: 38px; border: 1px solid var(--line); border-radius: 6px; font-weight: 640;
}
.group-choice:has(input:enabled):hover span, .country-card:has(input:enabled):hover .country-card-body { background: var(--soft); }
.group-choice:has(input:disabled) { cursor: default; }
.group-choice input:disabled:not(:checked) + span { color: var(--muted); }
.group-choice input:checked + span, .country-card input:checked + .country-card-body { color: var(--blue); background: var(--blue-soft); border-color: var(--blue); }
.group-choice input:focus-visible + span, .country-card input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }

.availability-count, .member-count { color: var(--muted); font-weight: 550; font-size: 12px; }
.availability-count { display: block; text-align: right; }
.availability-count:not(:empty) { margin-bottom: 6px; }
.country-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 10px; }
.country-card-body {
  display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 5px 7px;
  border: 1px solid transparent; border-bottom-color: var(--line); font-size: 13px;
}
.country-card input:checked + .country-card-body { border-radius: 5px; }
.country-name { font-weight: 590; line-height: 1.2; }
.country-status { color: var(--muted); margin-left: auto; font-size: 11px; }
.country-card:has(input:disabled) { cursor: default; }
.country-card input:disabled + .country-card-body { color: #6a7381; }
.country-feedback { color: var(--muted); font-size: 13px; }
.country-feedback:not(:empty) { margin: 3px 0 8px; }

.roster-panel { display: flex; flex-direction: column; }
.member-count { flex: none; }
.member-count.complete { color: var(--blue); }
.member-inputs { display: flex; flex-direction: column; gap: 9px; }
.member-field > label, .append-form > label, #manage-form > label, .password-fields > label { display: block; }
.member-field-inner, .append-row { display: flex; gap: 7px; }
input[type="text"], input[type="password"], select {
  min-width: 0; width: 100%; min-height: 39px; border: 1px solid #d8dce4; border-radius: 6px;
  padding: 7px 10px; background: white; color: var(--ink);
}
input[type="text"]::placeholder { color: #6a7381; opacity: 1; }
input[type="text"]:disabled { background: var(--soft); border-color: var(--line); }
.text-button { border: 0; padding: 0; display: inline-flex; align-items: center; gap: 4px; background: transparent; color: var(--blue); font-weight: 620; font-size: 13px; }
.text-button:enabled:hover { text-decoration: underline; }
.text-button:disabled { color: #647080; }
.add-button { align-self: flex-start; margin-top: 7px; min-height: 30px; }
.add-button span { font-size: 15px; }
.icon-button { color: var(--muted); font-size: 20px; line-height: 1; border-radius: 5px; border: 0; background: var(--soft); width: 32px; flex: 0 0 32px; }
.icon-button:hover { background: #e9ecf2; color: var(--ink); }
.claim-area { padding-top: 12px; margin-top: auto; }
.selection-summary {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding-top: 9px; margin-bottom: 9px;
  border-top: 1px solid var(--line); font-size: 12px; color: var(--muted);
}
.selection-summary strong { color: var(--ink); text-align: right; }
.claim-button { width: 100%; justify-content: space-between; min-height: 42px; }
.form-hint { font-size: 12px; color: var(--muted); margin-top: 7px; }
.error { color: #9b2334; font-size: 13px; margin-top: 7px; }
.site-footer { font-size: 12px; color: var(--muted); padding: 13px 0 22px; border-top: 1px solid var(--line); }

.team-panel { max-width: 670px; padding: 23px 0 29px; }
.confirmation { margin-bottom: 10px; color: var(--blue); font-size: 13px; font-weight: 650; }
.confirmation span { margin-right: 3px; }
.team-heading { font-size: clamp(22px, 4vw, 28px); }
.password-fields { margin-block: 12px; }
.password-fields > .form-hint { margin: 4px 0 10px; }
.team-submission { margin-top: 12px; }
.team-roster { margin-top: 21px; }
.team-roster .panel-heading { margin-bottom: 9px; }
.team-members { list-style: none; padding: 0; margin: 0 0 17px; border-bottom: 1px solid var(--line); }
.team-members li { padding: 7px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.append-form { max-width: 480px; }
.form-hint:empty { margin: 0; }

dialog { width: min(100% - 32px, 412px); padding: 20px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); }
dialog::backdrop { background: #11182765; }
dialog .icon-button { height: 32px; }
#manage-form > label { margin-top: 10px; }
dialog .primary { margin-top: 12px; width: 100%; }

@media (max-width: 680px) {
  .container { width: calc(100% - 36px); }
  .header-inner { min-height: 56px; }
  .hero { padding: 27px 0 21px; }
  .registration-grid { grid-template-columns: minmax(0, 1fr); row-gap: 21px; padding-top: 21px; }
  .roster-panel { border-top: 1px solid var(--line); padding-top: 19px; }
}
@media (max-width: 370px) {
  .container { width: calc(100% - 28px); }
  .brand { font-size: 12px; }
  .header-inner .button { padding-inline: 7px; }
  .country-card-body { gap: 5px; padding-inline: 4px; }
}
