:root {
  color-scheme: dark;
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bg: #0d0d0f;
  --panel: #141519;
  --field: #1a1c23;
  --text: #fafafa;
  --soft: #b5bdd0;
  --line: #383e4d;
  --blue: #a4b7ff;
}
* { box-sizing: border-box }
[hidden] { display: none !important }
body { margin: 0; background: var(--bg); color: var(--text) }
main { max-width: 656px; margin: auto; padding: 18px 16px max(32px, env(safe-area-inset-bottom)) }
header {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  align-content: end;
  min-height: 226px;
  margin: 0 0 18px;
  padding: 24px 22px;
  border: 1px solid #33394f;
  border-radius: 19px;
  background: #10121a;
}
header::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(0deg, #10121a 0%, #10121a 16%, #10121a22 65%, transparent),
    radial-gradient(ellipse 95% 98% at 92% 125%, #080b17 51%, #132768 59%, #2249ce 66%, #67baf4 73%, #ebf2ff 76%, #536cac 81%, #10121a 93%);
}
#applications header { min-height: 142px }
h1 { max-width: 12ch; margin: 0; font-size: clamp(2rem, 8vw, 3.25rem); line-height: .98; letter-spacing: -.065em; font-weight: 780 }
header p { margin: 12px 0 0; max-width: 29ch }
header p, small { color: var(--soft) }
fieldset, #detail:not(:empty) {
  margin: 0 0 16px;
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 14px;
  min-width: 0;
}
legend { font-weight: 750; padding: 0 8px; font-size: 1.04rem }
label { display: grid; gap: 7px; font-weight: 600; margin-bottom: 15px }
input, select, textarea, button { font: inherit }
input:not([type=checkbox]), select, textarea {
  min-height: 46px;
  min-width: 0;
  width: 100%;
  padding: 8px 11px;
  color: var(--text);
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 8px;
}
input[type=file] { overflow: hidden; color: var(--soft) }
::file-selector-button {
  margin-inline-end: 8px;
  border: 0;
  border-radius: 5px;
  background: #313a66;
  color: var(--text);
  padding: 4px 8px;
  font: inherit;
}
.consent { display: flex; align-items: flex-start; gap: 9px; font-size: .88rem; color: var(--soft); font-weight: 500 }
.consent input { flex: 0 0 18px; height: 18px; accent-color: var(--blue) }
button {
  border: 1px solid #414d80;
  border-radius: 8px;
  min-height: 44px;
  background: #222a4a;
  color: var(--text);
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 650;
}
button:hover:not(:disabled) { border-color: var(--blue) }
:focus-visible { outline: 2px solid #8fcfff; outline-offset: 2px }
button:disabled { opacity: .6; cursor: wait }
nav { display: flex; gap: 6px; margin-bottom: 14px }
nav button { background: var(--panel); color: var(--soft); border-radius: 999px; padding-inline: 18px }
nav button[aria-pressed="true"] { background: #cbd7ff; color: #101629; border-color: #cbd7ff }
form > button { width: 100%; min-height: 52px; background: #fafafa; color: #0d0d0f; border-color: #fafafa; border-radius: 999px }
#list > button { width: 100%; margin-bottom: 8px; text-align: left }
#detail button { margin: 6px 8px 6px 0 }
#detail img { width: 100%; max-height: 520px; object-fit: contain; background: var(--bg) }
#detail dl { margin: 12px 0 6px }
dt { font-weight: 650; color: var(--soft); font-size: .85rem }
dd { margin: 2px 0 9px; padding-bottom: 9px; border-bottom: 1px solid #2a2e3a; overflow-wrap: anywhere }
#demo { border: 1px solid var(--line); padding: 10px; border-radius: 8px }
#message:empty, #submit-error:empty { display: none }
#submit-error { color: #ffb8b8 }
.step-progress { display: grid; gap: 7px; margin-bottom: 18px; color: var(--soft); font-size: .84rem }
.step-progress progress { width: 100%; height: 6px; border: 0; border-radius: 10px; accent-color: #67baf4; overflow: hidden }
.step-progress progress::-webkit-progress-bar { background: var(--line) }
.step-progress progress::-webkit-progress-value { background: linear-gradient(90deg, #536dff, #8ccfff) }
#application fieldset { padding: 19px 16px; margin-bottom: 14px }
#application fieldset label { font-size: 1.14rem; margin: 0 }
#application fieldset label input:not([type=checkbox]), #application fieldset label select, #application fieldset label textarea { font-size: 1rem }
#application fieldset small { display: block; margin-top: 9px }
#application fieldset .consent { font-size: .92rem }
.step-actions { display: flex; gap: 8px }
#step-back { border-radius: 999px; background: var(--panel) }
#step-next { flex: 1; min-height: 50px; border-radius: 999px; background: #fafafa; color: #0d0d0f; border-color: #fafafa }
.photo-picker { position: relative; display: flex; align-items: center; width: fit-content; min-height: 46px; padding: 8px 13px; background: #313a66; border-radius: 8px; font-size: 1rem }
#application .photo-picker input { position: absolute; inset: 0; opacity: 0; cursor: pointer }
.photo-picker:focus-within { outline: 2px solid #8fcfff; outline-offset: 2px }
.photo-selection { overflow-wrap: anywhere; font-size: .875rem; color: var(--soft) }
.photo-selection:empty { display: none }
textarea { resize: vertical }
