.apply-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 35%, rgba(139, 26, 26, 0.17), transparent 35%),
    radial-gradient(circle at 82% 65%, rgba(212, 175, 55, 0.08), transparent 32%),
    #060407;
}

.apply-page::after {
  background: radial-gradient(ellipse at center, transparent 20%, rgba(0, 0, 0, 0.88) 100%);
}

.application-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(212, 175, 55, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 175, 55, 0.035) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, transparent, #000 20%, #000 80%, transparent);
  pointer-events: none;
}

.application-scanline {
  position: fixed;
  z-index: 1;
  top: -10%;
  left: 0;
  width: 100%;
  height: 18%;
  background: linear-gradient(to bottom, transparent, rgba(212, 175, 55, 0.025), transparent);
  animation: application-scan 8s linear infinite;
  pointer-events: none;
}

.apply-nav .nav-logo {
  color: var(--gold-bright);
  text-decoration: none;
}

.apply-nav-actions {
  display: flex;
  align-items: center;
  gap: 22px;
}

.home-link {
  color: var(--text);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 3px;
  text-decoration: none;
  opacity: 0.7;
  transition: color 0.25s ease, opacity 0.25s ease;
}

.home-link:hover {
  color: var(--gold-bright);
  opacity: 1;
}

.application-main {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 130px 50px 80px;
}

.application-main .hud-corner {
  position: fixed;
  z-index: 2;
}

.application-main .hud-corner.tl,
.application-main .hud-corner.tr {
  top: 98px;
}

.application-main .hud-corner.bl,
.application-main .hud-corner.br {
  bottom: 58px;
}

.application-layout {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  border: 1px solid var(--border-bright);
  background: rgba(6, 4, 7, 0.9);
  box-shadow: 0 0 70px rgba(0, 0, 0, 0.65), 0 0 45px rgba(212, 175, 55, 0.07);
  backdrop-filter: blur(12px);
}

.briefing-panel {
  position: relative;
  padding: 58px 48px;
  overflow: hidden;
  border-right: 1px solid var(--border-bright);
  background:
    linear-gradient(150deg, rgba(139, 26, 26, 0.2), transparent 48%),
    rgba(8, 6, 10, 0.72);
}

.briefing-panel::before {
  content: "";
  position: absolute;
  width: 310px;
  height: 310px;
  right: -190px;
  bottom: -170px;
  border: 1px solid rgba(212, 175, 55, 0.13);
  border-radius: 50%;
  box-shadow: 0 0 0 45px rgba(212, 175, 55, 0.025), 0 0 0 90px rgba(212, 175, 55, 0.018);
}

.eyebrow,
.panel-kicker,
.form-status {
  color: var(--gold-bright);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 4px;
}

.briefing-panel h1 {
  margin: 22px 0 26px;
  color: #fff;
  font-family: var(--display);
  font-size: clamp(68px, 7vw, 104px);
  font-weight: 400;
  letter-spacing: 5px;
  line-height: 0.84;
}

.briefing-panel h1 span,
.success-state h2 span {
  color: var(--gold-bright);
}

.briefing-copy {
  max-width: 370px;
  color: var(--text-dim);
  font-size: 15px;
  font-weight: 300;
  letter-spacing: 0.7px;
  line-height: 1.7;
}

.protocol-list {
  display: grid;
  gap: 0;
  margin: 42px 0;
  list-style: none;
}

.protocol-list li {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
}

.protocol-list li:last-child {
  border-bottom: 1px solid var(--border);
}

.protocol-list li > span {
  color: var(--gold-bright);
  font-family: var(--mono);
  font-size: 10px;
  opacity: 0.6;
}

.protocol-list strong,
.protocol-list small {
  display: block;
}

.protocol-list strong {
  color: #e7e1d6;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 2px;
}

.protocol-list small {
  margin-top: 4px;
  color: var(--text-dim);
  font-size: 12px;
  letter-spacing: 0.5px;
}

.security-note {
  display: flex;
  align-items: center;
  color: rgba(196, 189, 176, 0.42);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 1px;
  line-height: 1.5;
}

.form-panel {
  display: block;
  position: relative;
  min-height: 680px;
  padding: 44px 48px;
  background: rgba(6, 4, 7, 0.84);
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 34px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border-bright);
}

.panel-heading h2 {
  margin-top: 8px;
  color: #fff;
  font-family: var(--display);
  font-size: 34px;
  font-weight: 400;
  letter-spacing: 4px;
}

.form-status {
  align-self: flex-start;
  color: var(--text-dim);
  letter-spacing: 2px;
}

#applicationForm {
  display: grid;
  gap: 24px;
}

.form-panel [hidden] {
  display: none !important;
}

.form-field label,
.follow-gate legend {
  display: block;
  margin-bottom: 9px;
  color: #d9d2c7;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 2px;
}

.form-field label span,
.follow-gate legend span {
  margin-right: 9px;
  color: var(--gold-bright);
  opacity: 0.65;
}

.input-shell {
  display: flex;
  align-items: center;
  border: 1px solid rgba(184, 150, 12, 0.28);
  background: rgba(0, 0, 0, 0.28);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.input-shell:focus-within {
  border-color: var(--gold-bright);
  box-shadow: 0 0 22px rgba(212, 175, 55, 0.09);
}

.input-shell.has-error {
  border-color: var(--red-bright);
  box-shadow: 0 0 18px rgba(196, 30, 58, 0.12);
}

.input-prefix {
  padding: 0 14px;
  color: var(--gold-bright);
  font-family: var(--mono);
  font-size: 13px;
  border-right: 1px solid var(--border);
  opacity: 0.75;
}

.address-prefix {
  font-size: 10px;
}

.input-shell input {
  min-width: 0;
  width: 100%;
  padding: 14px;
  color: #f1ede6;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.7px;
}

.input-shell input::placeholder {
  color: rgba(196, 189, 176, 0.2);
}

.field-help,
.field-error {
  min-height: 14px;
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 1px;
  line-height: 1.5;
}

.field-help {
  color: rgba(196, 189, 176, 0.34);
}

.field-error {
  color: #e45567;
}

.follow-gate {
  margin: 0;
  padding: 17px;
  border: 1px solid var(--border);
  background: rgba(212, 175, 55, 0.025);
}

.follow-gate p:not(.field-error) {
  margin-bottom: 13px;
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.5;
}

.follow-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
  padding: 12px 14px;
  color: var(--bg);
  background: var(--gold-bright);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 2px;
  text-decoration: none;
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.follow-link:hover {
  background: #fff;
  box-shadow: 0 0 25px var(--gold-glow);
}

.follow-link.is-visited {
  color: var(--gold-bright);
  border: 1px solid var(--gold-bright);
  background: rgba(212, 175, 55, 0.08);
  box-shadow: inset 0 0 18px rgba(212, 175, 55, 0.05);
}

.follow-link-status {
  min-height: 14px;
  margin: -6px 0 13px !important;
  color: rgba(196, 189, 176, 0.4) !important;
  font-family: var(--mono);
  font-size: 8px !important;
  letter-spacing: 1px;
}

.follow-link-status.is-visited {
  color: var(--gold-bright) !important;
}

.confirmation-check {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  line-height: 1.45;
}

.confirmation-check input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.custom-check {
  flex: 0 0 17px;
  width: 17px;
  height: 17px;
  border: 1px solid rgba(212, 175, 55, 0.5);
  background: rgba(0, 0, 0, 0.3);
}

.confirmation-check input:focus-visible + .custom-check {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.confirmation-check input:checked + .custom-check {
  border-color: var(--gold-bright);
  background: var(--gold-bright);
  box-shadow: inset 0 0 0 4px var(--bg), 0 0 12px var(--gold-glow);
}

.confirmation-check strong {
  color: var(--gold-bright);
  font-weight: 600;
}

.submit-application,
.return-button {
  width: 100%;
  padding: 16px 20px;
  color: var(--bg);
  border: 0;
  background: var(--gold-bright);
  box-shadow: 0 0 30px var(--gold-glow);
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 3px;
  text-align: center;
  text-decoration: none;
  transition: background 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
}

.submit-application:not(:disabled):hover,
.return-button:hover {
  background: #fff;
  box-shadow: 0 0 50px var(--gold-glow);
}

.submit-application:disabled {
  color: rgba(196, 189, 176, 0.35);
  border: 1px solid rgba(196, 189, 176, 0.1);
  background: rgba(196, 189, 176, 0.04);
  box-shadow: none;
  cursor: not-allowed;
}

.submit-note {
  color: rgba(196, 189, 176, 0.3);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 1px;
  text-align: center;
}

.submission-error {
  min-height: 14px;
  color: #e45567;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 1px;
  line-height: 1.5;
  text-align: center;
}

.submit-application.is-loading {
  cursor: wait;
  opacity: 0.75;
}

.success-state {
  min-height: 550px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.success-state[hidden] {
  display: none !important;
}

.success-mark {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin-bottom: 26px;
  color: var(--gold-bright);
  border: 1px solid var(--gold-bright);
  border-radius: 50%;
  box-shadow: 0 0 30px var(--gold-glow), inset 0 0 25px rgba(212, 175, 55, 0.08);
  font-family: var(--mono);
  font-size: 30px;
}

.success-state h2 {
  margin: 14px 0 18px;
  color: #fff;
  font-family: var(--display);
  font-size: clamp(54px, 6vw, 76px);
  font-weight: 400;
  letter-spacing: 5px;
  line-height: 0.9;
}

.success-state p {
  max-width: 380px;
  margin-bottom: 32px;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.65;
}

.return-button {
  width: auto;
  min-width: 260px;
}

.application-footer {
  position: fixed;
  z-index: 1000;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 10px 24px;
  color: rgba(196, 189, 176, 0.3);
  border-top: 1px solid var(--border);
  background: rgba(6, 4, 7, 0.97);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 2px;
}

@keyframes application-scan {
  to { transform: translateY(620%); }
}

@media (max-width: 900px) {
  .application-main {
    padding: 120px 24px 75px;
  }

  .application-layout {
    grid-template-columns: 1fr;
  }

  .briefing-panel {
    padding: 42px 34px;
    border-right: 0;
    border-bottom: 1px solid var(--border-bright);
  }

  .briefing-panel h1 {
    font-size: clamp(64px, 15vw, 92px);
  }

  .protocol-list {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 30px 0;
  }

  .protocol-list li {
    align-items: flex-start;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
  }
}

@media (max-width: 620px) {
  .apply-nav {
    padding: 11px 14px;
  }

  .apply-nav .social-link {
    display: none;
  }

  .apply-nav-actions {
    gap: 0;
  }

  .home-link {
    font-size: 8px;
    letter-spacing: 2px;
  }

  .application-main {
    display: block;
    padding: 90px 12px 65px;
  }

  .application-main .hud-corner {
    display: none;
  }

  .briefing-panel,
  .form-panel {
    padding: 30px 20px;
  }

  .briefing-panel h1 {
    font-size: 62px;
  }

  .protocol-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
  }

  .panel-heading {
    display: block;
  }

  .form-status {
    display: block;
    margin-top: 10px;
  }

  .form-panel {
    min-height: 0;
  }

  .input-shell input {
    font-size: 10px;
  }

  .application-footer span:not(:first-child) {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .application-scanline {
    animation: none;
  }
}
