/* ---------- Layout ---------- */
.submit {
  display: grid;
  gap: var(--s-8);
  padding-block: var(--s-8) var(--section);
}
@media (min-width: 1024px) {
  .submit {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: var(--s-16);
    align-items: start;
    padding-top: var(--s-16);
  }
  .submit__intro { position: sticky; top: calc(var(--header-h) + var(--s-10)); }
}

/* ---------- Intro ---------- */
.submit__intro { display: grid; gap: var(--s-4); align-content: start; }
.submit__title {
  font-family: var(--font-pixel);
  font-weight: 400;
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: 0;
  text-transform: uppercase;
}
.submit__lede { color: var(--text-2); max-width: 44ch; }

.steps { display: grid; gap: var(--s-3); margin-top: var(--s-2); }
.step { display: flex; gap: var(--s-3); align-items: flex-start; }
.step__num {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  font-family: var(--font-pixel);
  font-size: 16px;
  line-height: 1;
  color: var(--on-accent);
  background: var(--accent);
  border-radius: 6px;
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px rgba(124, 255, 79, .35);
}
.step__title { font-weight: 600; font-size: var(--fs-15); line-height: 1.3; padding-top: 6px; }
.step__text { color: var(--text-3); font-size: var(--fs-14); line-height: 1.45; margin-top: 2px; }
/* Phones: titles only, so the form starts sooner */
@media (max-width: 767px) {
  .steps { gap: var(--s-2); }
  .step { align-items: center; }
  .step__num { width: 28px; height: 28px; font-size: 14px; }
  .step__title { padding-top: 0; }
  .step__text { display: none; }
}

@media (min-width: 1024px) {
  .steps { gap: 0; margin-top: var(--s-6); }
  .step { position: relative; gap: var(--s-4); padding-bottom: var(--s-6); }
  .step:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 15px;
    top: 40px;
    bottom: 8px;
    border-left: 2px dotted var(--border-strong);
  }
  .step__num { width: 36px; height: 36px; font-size: 18px; }
  .step__title { font-size: var(--fs-16); padding-top: 7px; }
}

/* ---------- Panel ---------- */
.submit__panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-panel);
  padding: var(--s-5) var(--s-4);
  margin-inline: calc(var(--gutter) * -1 + 8px);
}
@media (min-width: 480px) { .submit__panel { padding: var(--s-6); margin-inline: 0; } }
@media (min-width: 768px) { .submit__panel { padding: var(--s-10); } }

#submit-form { display: grid; gap: var(--s-6); }

.counter { font-family: var(--font-mono); font-size: var(--fs-12); font-weight: 400; color: var(--text-3); font-variant-numeric: tabular-nums; }
.counter.is-near { color: #FFC24D; }
.counter.is-over { color: var(--danger); }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.submit__fine { text-align: center; font-size: var(--fs-13); color: var(--text-3); margin-top: calc(var(--s-3) * -1); }

/* ---------- Dropzone ---------- */
.dropzone {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 148px;
  padding: var(--s-6) var(--s-4);
  text-align: center;
  background: var(--bg);
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--r-input);
  cursor: pointer;
  transition: border-color var(--t-fast) var(--ease-out), background-color var(--t-fast) var(--ease-out);
}
.dropzone:focus-within { border-color: var(--accent); border-style: solid; box-shadow: 0 0 0 3px var(--accent-soft); }
.dropzone.is-over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone.is-invalid { border-color: var(--danger); }
@media (hover: hover) { .dropzone:hover { border-color: var(--text-3); } }
.dropzone__empty { display: grid; justify-items: center; gap: var(--s-2); pointer-events: none; }
.dropzone__icon {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  color: var(--accent);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-input);
}
.dropzone__icon svg { width: 22px; height: 22px; }
.dropzone__title { font-weight: 500; font-size: var(--fs-15); }
.dropzone__title u { text-decoration-color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 2px; }
.dropzone__meta { font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
/* Touch screens cannot drag files in, so don't offer it */
.dz-touch { display: none; }
@media (hover: none) { .dz-pointer { display: none; } .dz-touch { display: inline; } }

.cover-preview {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: var(--s-4);
  align-items: center;
  padding: var(--s-3);
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-input);
}
.cover-preview__frame { aspect-ratio: 16 / 10; border-radius: 6px; overflow: hidden; background: var(--surface-2); }
.cover-preview__frame img { width: 100%; height: 100%; object-fit: cover; }
.cover-preview__info { display: grid; gap: var(--s-2); justify-items: start; min-width: 0; }
.cover-preview__name { font-family: var(--font-mono); font-size: var(--fs-13); color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
@media (max-width: 379px) { .cover-preview { grid-template-columns: 1fr; } }

/* ---------- Success ---------- */
.success {
  position: relative;
  display: grid;
  justify-items: center;
  gap: var(--s-4);
  padding: var(--s-8) var(--s-2);
  text-align: center;
  overflow: hidden;
}
.success__hud {
  display: flex;
  justify-content: space-between;
  width: 100%;
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-3);
}
.success__hud b { color: var(--accent); font-weight: 500; }
.success__title {
  font-family: var(--font-pixel);
  font-weight: 700;
  font-size: clamp(2.25rem, 1.5rem + 3.5vw, 3.75rem);
  line-height: 1;
  letter-spacing: 0;
  color: var(--accent);
  text-shadow: 0 0 28px var(--accent-glow);
  margin-top: var(--s-6);
  animation: stage-clear 600ms steps(4) both;
}
.success__title:focus { outline: none; }
.success__lede { color: var(--text-2); max-width: 40ch; }
.success__lede strong { color: var(--text); }
.success__next {
  display: grid;
  gap: var(--s-3);
  width: 100%;
  max-width: 440px;
  margin: var(--s-4) 0 var(--s-2);
  padding: var(--s-5);
  text-align: left;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
}
.success__next h3 { font-family: var(--font-mono); font-size: var(--fs-12); font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.success__next ol { display: grid; gap: var(--s-3); }
.success__next li { display: flex; gap: var(--s-3); font-size: var(--fs-15); color: var(--text-2); line-height: 1.45; }
.success__next li span { flex: none; font-family: var(--font-pixel); color: var(--accent); }
.success__ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-3); }
@media (max-width: 479px) { .success__ctas { width: 100%; } .success__ctas .btn { flex: 1 1 100%; } }

@keyframes stage-clear {
  0% { opacity: 0; transform: scale(.6); }
  60% { opacity: 1; transform: scale(1.08); }
  100% { opacity: 1; transform: scale(1); }
}

.submit__panel { scroll-margin-top: calc(var(--header-h) + var(--s-4)); }

/* While the cover is being optimised */
.cover-preview.is-busy .cover-preview__frame img { opacity: .45; filter: saturate(.6); }
.cover-preview.is-busy .cover-preview__name { color: var(--accent); }
.cover-preview.is-busy .cover-preview__name::before {
  content: "";
  display: inline-block;
  width: 10px; height: 10px;
  margin-right: 8px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  vertical-align: -1px;
  animation: spin .7s linear infinite;
}

/* "Whose game is this?" choice */
.choice { display: grid; gap: var(--s-2); }
@media (min-width: 560px) { .choice { grid-template-columns: 1fr 1fr; } }
.choice__opt { position: relative; display: block; cursor: pointer; }
.choice__opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice__opt span {
  display: grid;
  gap: 2px;
  height: 100%;
  min-height: 64px;
  padding: var(--s-3) var(--s-4) var(--s-3) calc(var(--s-4) + 28px);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-input);
  background: var(--bg);
  transition: border-color var(--t-fast) var(--ease-out), background-color var(--t-fast) var(--ease-out);
}
.choice__opt span::before {
  content: "";
  position: absolute;
  left: var(--s-4);
  top: calc(var(--s-3) + 2px);
  width: 18px; height: 18px;
  border: 1.5px solid var(--border-strong);
  border-radius: 50%;
  background: var(--bg);
  transition: border-color var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out);
}
.choice__opt strong { font-size: var(--fs-15); font-weight: 600; color: var(--text); line-height: 1.3; }
.choice__opt small { font-size: var(--fs-13); color: var(--text-3); line-height: 1.4; }
.choice__opt input:checked + span { border-color: var(--accent); background: var(--accent-soft); }
.choice__opt input:checked + span::before { border-color: var(--accent); box-shadow: inset 0 0 0 4px var(--bg), inset 0 0 0 9px var(--accent); }
.choice__opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.choice__opt input[aria-invalid="true"] + span { border-color: var(--danger); }
@media (hover: hover) { .choice__opt:hover input:not(:checked) + span { border-color: var(--text-3); } }
