[hidden] { display: none !important; }

/* Apply page: the king behind everything (worn film + grain, as on the home hero), the form on glass. */

.apply-page { background: var(--void); }

/* background art, fixed so the form scrolls over it */
.apply-bg { position: fixed; inset: 0; z-index: 0; height: 100%; min-height: 0; background: #0a0606; }
.apply-bg picture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; animation: settle 2.4s var(--ease) both; }
.apply-bg__shade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgb(10 6 6 / 0.85) 0%, rgb(10 6 6 / 0.35) 45%, rgb(10 6 6 / 0.55) 70%, rgb(10 6 6 / 0.8) 100%),
    linear-gradient(to bottom, rgb(10 6 6 / 0.55), transparent 22%, transparent 70%, rgb(10 6 6 / 0.85));
}

.apply-main {
  position: relative; z-index: 10; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: flex-end; padding: clamp(120px, 14vh, 160px) var(--gutter) clamp(56px, 9vh, 96px);
  color: #f3e7dc;
}

/* intro */
.apply-intro { max-width: 760px; animation: rise 0.6s var(--ease) both; }
.apply-open { margin-top: 36px; }
.apply-intro .eyebrow { color: rgb(243 231 220 / 0.75); }
.apply-intro h1 { font-size: clamp(72px, 9vw, 168px); margin-bottom: 28px; }
.apply-lede { max-width: 34ch; font: 500 clamp(18px, 1.5vw, 22px)/1.45 var(--text); color: rgb(243 231 220 / 0.85); }
.apply-lede a { border-bottom: 1px solid currentColor; }

/* the form takes the intro's place on the same screen, on dark glass */
.formview {
  width: min(620px, 100%); margin-inline: auto;
  background: rgb(20 18 16 / 0.72); border: 1px solid rgb(217 207 191 / 0.16);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  padding: 22px clamp(20px, 3vw, 36px) 32px;
  animation: rise 0.6s var(--ease) both;
}
.formview__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 6px; }
.formview__head .eyebrow { margin: 0; }
.profile { animation: rise 0.6s var(--ease) both; }
body[data-view="form"] .apply-main, body[data-view="profile"] .apply-main { align-items: center; }
/* darker art behind the form and the profile, so the panels read */
body[data-view="form"] .apply-bg__shade, body[data-view="profile"] .apply-bg__shade { background: rgb(10 6 6 / 0.55); }

/* steps */
.steps { color: #f3e7dc; }
.step { border-bottom: 1px solid rgb(243 231 220 / 0.12); padding-block: 22px; transition: opacity 0.3s; }
.step.is-locked { opacity: 0.38; }
.step.is-locked .step__body { pointer-events: none; }
.step__head { display: flex; align-items: baseline; gap: 14px; }
.step__head h2 { margin: 0; font: 900 clamp(26px, 2.2vw, 34px)/1 var(--head); font-stretch: 62%; text-transform: uppercase; letter-spacing: -0.01em; }
.step__n { font: 400 13px/1 var(--ui); color: rgb(243 231 220 / 0.55); }
.step__state { margin-left: auto; font: 400 12px/1 var(--ui); text-transform: uppercase; letter-spacing: 0.04em; color: rgb(243 231 220 / 0.55); }
.step.is-done .step__state { color: var(--moon); }
.step__body { display: grid; gap: 14px; margin-top: 14px; justify-items: start; }
.step.is-done:not([data-step="post"]) .step__body { display: none; }
.step__hint { font: 400 15px/1.5 var(--text); color: rgb(243 231 220 / 0.7); max-width: 46ch; }
.step__row { display: flex; flex-wrap: wrap; gap: 10px; }

.who { display: flex; align-items: center; gap: 12px; font: 500 15px/1 var(--ui); }
.who img { width: 40px; height: 40px; image-rendering: pixelated; border: 1px solid rgb(243 231 220 / 0.3); }

.field { display: flex; gap: 10px; width: 100%; }
.field input {
  flex: 1; min-width: 0; height: 46px; padding: 0 14px;
  background: rgb(243 231 220 / 0.06); border: 1px solid rgb(243 231 220 / 0.22); border-radius: 0;
  color: #f3e7dc; font: 400 15px/1 var(--ui); outline: none; transition: border-color 0.2s, background-color 0.2s;
}
.field input::placeholder { color: rgb(243 231 220 / 0.38); }
.field input:focus { border-color: rgb(243 231 220 / 0.6); background: rgb(243 231 220 / 0.09); }
.field input.is-bad { border-color: var(--moon); }
.field__msg { min-height: 1.2em; font: 400 12px/1.4 var(--ui); text-transform: uppercase; letter-spacing: 0.04em; color: rgb(243 231 220 / 0.6); }
.field__msg.is-bad { color: var(--moon); }

.card-preview { width: 100%; height: auto; border: 1px solid rgb(243 231 220 / 0.18); background: #0a0606; image-rendering: pixelated; }

.submit {
  width: 100%; height: 64px; margin-top: 24px;
  background: #f3e7dc; color: #0a0606; font: 500 14px/1 var(--ui); text-transform: uppercase; letter-spacing: 0.06em;
  position: relative; overflow: hidden; isolation: isolate; transition: opacity 0.3s, box-shadow 0.3s;
}
.submit::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--moon); scale: 1 0; transform-origin: bottom; transition: scale 0.35s var(--ease); }
.submit:not(:disabled):hover::before { scale: 1 1; }
.submit:not(:disabled):hover { box-shadow: 0 10px 40px -8px rgb(222 73 47 / 0.6); }
.submit:disabled { opacity: 0.32; cursor: not-allowed; }
.submit__note { margin-top: 12px; font: 400 12px/1.4 var(--ui); text-transform: uppercase; letter-spacing: 0.04em; color: rgb(243 231 220 / 0.5); text-align: center; }

.done { color: #f3e7dc; padding-top: 24px; }
.done h2 { font-size: clamp(56px, 6vw, 104px); margin-bottom: 24px; }

/* phone: one column, intro scrolls away, the form fills the width */
@media (max-width: 900px) {
  .apply-main { padding-top: 112px; }
  .apply-bg__shade {
    background: linear-gradient(to bottom, rgb(10 6 6 / 0.55), transparent 25%, transparent 45%, rgb(10 6 6 / 0.9) 80%);
  }
}
@media (max-width: 760px) {
  .apply-open { width: 100%; }
  .apply-intro h1 { font-size: clamp(64px, 19vw, 104px); }
  .field { flex-direction: column; }
  .field .pill { width: 100%; }
  .step__row .pill { flex: 1; }
}

/* sign-in line, text buttons, closed note */
.who { flex-wrap: wrap; }
.link { font: 400 12px/1 var(--ui); text-transform: uppercase; letter-spacing: 0.04em; color: rgb(243 231 220 / 0.6); text-decoration: underline; text-underline-offset: 4px; }
.link:hover { color: #f3e7dc; }
.apply-closed { margin-top: 28px; font: 500 14px/1 var(--ui); text-transform: uppercase; letter-spacing: 0.04em; color: #f3e7dc; }
.turnstile { margin-top: 20px; }

/* ─────────── profile: the applicant card, as HTML ─────────── */
.profile { width: min(880px, 100%); margin-inline: auto; display: grid; gap: 18px; color: #e6ddcf; }
.pcard {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: center;
  padding: clamp(24px, 4vw, 48px);
  background:
    repeating-linear-gradient(45deg, rgb(201 191 175 / 0.05) 0 1px, transparent 1px 5px),
    linear-gradient(to bottom, #3a3530, #221f1c 55%, #141210);
  border: 1px solid rgb(217 207 191 / 0.2);
  box-shadow: 0 40px 80px -30px rgb(0 0 0 / 0.85);
}
/* a few red shards, as on the card */
.pcard::before, .pcard::after {
  content: ""; position: absolute; width: 14px; height: 5px; background: #d0161c; clip-path: polygon(0 50%, 50% 0, 100% 50%, 50% 100%);
}
.pcard::before { top: 14px; right: 22%; rotate: -24deg; }
.pcard::after { bottom: 18px; left: 46%; rotate: -12deg; opacity: 0.7; }
.pcard__art { position: relative; margin: 0; padding: 12px; }
.pcard__art canvas { display: block; width: clamp(150px, 22vw, 220px); height: auto; aspect-ratio: 1; image-rendering: pixelated; border: 1px solid rgb(201 191 175 / 0.35); }
.pcard__corner { position: absolute; width: 22px; height: 22px; border: 0 solid #d9cfbf; }
.pcard__corner.tl { top: 0; left: 0; border-top-width: 2px; border-left-width: 2px; }
.pcard__corner.tr { top: 0; right: 0; border-top-width: 2px; border-right-width: 2px; }
.pcard__corner.bl { bottom: 0; left: 0; border-bottom-width: 2px; border-left-width: 2px; }
.pcard__corner.br { bottom: 0; right: 0; border-bottom-width: 2px; border-right-width: 2px; }
.pcard__info { min-width: 0; display: grid; gap: 10px; }
.pcard__brand { display: flex; align-items: center; gap: 10px; font: 900 extra-condensed 26px/1 var(--head); font-stretch: 62%; text-transform: uppercase; color: #d9cfbf; }
.pcard__brand img { height: 40px; width: auto; }
.pcard__label { margin-top: 10px; font: 400 13px/1 var(--ui); letter-spacing: 0.06em; text-transform: uppercase; color: rgb(217 207 191 / 0.6); }
.pcard__handle { font: 900 clamp(40px, 5.6vw, 76px)/0.95 var(--head); font-stretch: 62%; text-transform: uppercase; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.pcard__rows { margin: 8px 0 0; display: grid; gap: 0; border-top: 1px solid rgb(217 207 191 / 0.2); }
.pcard__rows div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 0; border-bottom: 1px solid rgb(217 207 191 / 0.12); }
.pcard__rows dt { font: 400 13px/1 var(--ui); letter-spacing: 0.06em; text-transform: uppercase; color: rgb(217 207 191 / 0.6); }
.pcard__rows dd { margin: 0; font: 500 15px/1 var(--ui); letter-spacing: 0.04em; text-transform: uppercase; }
.pcard__status { color: #e01b22; }
.pcard__status[data-status="selected"] { color: #e6ddcf; background: #e01b22; padding: 4px 8px; color: #141210; }
.pcard__status[data-status="rejected"] { color: rgb(217 207 191 / 0.6); }

.pcard__breakdown { display: flex; flex-wrap: wrap; gap: 8px 24px; font: 400 13px/1.4 var(--ui); letter-spacing: 0.04em; text-transform: uppercase; color: rgb(230 221 207 / 0.65); }
.pcard__breakdown b { color: #e6ddcf; font-weight: 500; }
.profile__note { font: 400 16px/1.5 var(--text); color: rgb(230 221 207 / 0.8); }

.profile__blocks { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 6px; }
.pblock { display: grid; gap: 12px; align-content: start; justify-items: start; padding: 22px; background: rgb(20 18 16 / 0.62); border: 1px solid rgb(217 207 191 / 0.14); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.pblock__title { margin: 0; font: 900 26px/1 var(--head); font-stretch: 62%; text-transform: uppercase; }
.pblock__list { margin: 0; padding-left: 18px; display: grid; gap: 4px; font: 400 15px/1.45 var(--text); color: rgb(230 221 207 / 0.85); }
.pblock__hint { font: 400 13px/1.45 var(--text); color: rgb(230 221 207 / 0.55); }
.pblock__activity { list-style: none; margin: 0; padding: 0; width: 100%; }
.pblock__activity li { display: flex; align-items: baseline; gap: 10px; padding: 9px 0; border-bottom: 1px solid rgb(217 207 191 / 0.12); font: 400 13px/1.3 var(--ui); text-transform: uppercase; letter-spacing: 0.03em; }
.pblock__activity a { color: #e6ddcf; text-decoration: underline; text-underline-offset: 3px; }
.pblock__activity span { margin-left: auto; color: rgb(230 221 207 / 0.55); }
.pblock__activity b { min-width: 2.5em; text-align: right; font-weight: 500; }
.pblock__activity .empty { color: rgb(230 221 207 / 0.55); text-transform: none; font-family: var(--text); letter-spacing: 0; }
.profile__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }

/* the internal score note: prominent, but no numbers */
.score-note {
  display: grid; gap: 12px; justify-items: start; padding: clamp(22px, 3vw, 32px);
  background: rgb(20 18 16 / 0.68); border: 1px solid rgb(217 207 191 / 0.16); border-left: 3px solid #e01b22;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.score-note .eyebrow { margin: 0; }
.score-note__title { margin: 4px 0 0; font: 900 clamp(28px, 3vw, 40px)/1 var(--head); font-stretch: 62%; text-transform: uppercase; }
.score-note__lede, .score-note__why { font: 400 16px/1.5 var(--text); color: rgb(230 221 207 / 0.85); max-width: 56ch; }
.score-note__why { color: rgb(230 221 207 / 0.65); }
.score-note__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 24px; width: 100%; }
.score-note__list li { display: flex; align-items: center; gap: 10px; font: 500 14px/1.35 var(--ui); text-transform: uppercase; letter-spacing: 0.03em; }
.score-note__list li::before { content: ""; flex: none; width: 7px; height: 7px; background: #e01b22; rotate: 45deg; }
.score-note__list b { font-weight: 500; color: #e01b22; }
.score-hint {
  margin-top: 20px; padding: 14px 16px; border-left: 3px solid #e01b22; background: rgb(243 231 220 / 0.05);
  font: 400 14px/1.5 var(--text); color: rgb(243 231 220 / 0.78);
}
.score-hint b { color: #f3e7dc; font-weight: 600; }

@media (max-width: 760px) {
  .score-note__list { grid-template-columns: 1fr; }
  .pcard { grid-template-columns: 1fr; justify-items: start; }
  .pcard__art canvas { width: 160px; }
  .profile__blocks { grid-template-columns: 1fr; }
  .profile__actions .pill { width: 100%; }
}

/* the home page paints its continuous background on <main>; here the art must show through */
.apply-page main { background: none; }
.apply-page main::before { display: none; }

@keyframes rise { from { opacity: 0; translate: 0 18px; } }
