/* /collab: the apply page's shell (apply.css) with the knights in the poppies behind it. */

/* the knights stand right of centre; the headline sits on the quiet sky at the left */
.collab-page .apply-bg picture img { object-position: 62% 50%; }
.collab-page .apply-bg__shade {
  background:
    linear-gradient(90deg, rgb(10 6 6 / 0.55) 0%, rgb(10 6 6 / 0.12) 42%, transparent 60%),
    linear-gradient(to bottom, rgb(10 6 6 / 0.4), transparent 20%, transparent 72%, rgb(10 6 6 / 0.6));
}
.collab-page .apply-main { align-items: center; }
.collab-page .apply-intro h1 { font-size: clamp(64px, 7.4vw, 136px); }
.collab-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

/* form fields */
.cform { gap: 18px; width: 100%; justify-items: stretch; }
.cfield { display: grid; gap: 8px; min-width: 0; }
.cfield__label { font: 400 12px/1 var(--ui); text-transform: uppercase; letter-spacing: 0.06em; color: rgb(243 231 220 / 0.6); }
.cfield input, .clinks input {
  width: 100%; 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;
}
.cfield input::placeholder, .clinks input::placeholder { color: rgb(243 231 220 / 0.38); }
.cfield input:focus, .clinks input:focus { border-color: rgb(243 231 220 / 0.6); background: rgb(243 231 220 / 0.09); }
.cfield input.is-bad, .clinks input.is-bad { border-color: var(--moon); }
.cfield__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.clinks { display: grid; gap: 8px; }
.cfield .link { justify-self: start; margin-top: 2px; }
.cfield__note { margin-top: -6px; font-size: 13px; color: rgb(243 231 220 / 0.5); }
.step__hint b { color: #f3e7dc; font-weight: 600; }

/* deliverables: three cards, two of them picked */
.deliv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: 100%; }
.deliv__item {
  position: relative; display: flex; flex-direction: column; gap: 8px; padding: 14px 14px 15px; cursor: pointer;
  border: 1px solid rgb(243 231 220 / 0.14); background: rgb(16 13 11 / 0.55);
  transition: border-color 0.2s, background-color 0.2s, opacity 0.2s;
}
.deliv__item input { position: absolute; opacity: 0; pointer-events: none; }
.deliv__item:hover { border-color: rgb(243 231 220 / 0.4); }
.deliv__n { font: 500 12px/1 var(--ui); letter-spacing: 0.08em; color: #e01b22; }
.deliv__item b { font: 900 20px/1 var(--head); font-stretch: 62%; text-transform: uppercase; color: #f3e7dc; }
.deliv__item > span:last-child { font: 400 13px/1.45 var(--text); color: rgb(243 231 220 / 0.7); }
.deliv__item::after {
  content: ""; position: absolute; top: 12px; right: 12px; width: 16px; height: 16px;
  border: 1px solid rgb(243 231 220 / 0.4);
}
.deliv__item:has(input:checked) { border-color: #e01b22; background: rgb(224 27 34 / 0.12); }
.deliv__item:has(input:checked)::after { background: #e01b22; border-color: #e01b22; box-shadow: inset 0 0 0 3px #1a1311; }
.deliv__item:has(input:disabled) { opacity: 0.4; cursor: not-allowed; }
.deliv__item:has(input:focus-visible) { outline: 2px solid var(--moon); outline-offset: 2px; }

/* the Discord name to send a request to */
.dcard {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 12px 12px 16px;
  border: 1px solid rgb(243 231 220 / 0.18); border-left: 3px solid #5865f2; background: rgb(88 101 242 / 0.08);
}
.dcard__label { font: 400 12px/1 var(--ui); text-transform: uppercase; letter-spacing: 0.06em; color: rgb(243 231 220 / 0.6); }
.dcard__name { font: 500 17px/1 var(--ui); color: #f3e7dc; }
.dcard .pill { margin-left: auto; }
.step[data-step="discord"] .cfield { width: 100%; }

/* my applications */
.mine { width: min(820px, 100%); margin-inline: auto; display: grid; gap: 18px; color: #f3e7dc; animation: rise 0.6s var(--ease) both; }
.mine__head { padding: 0; }
.mine__title { margin: 6px 0 0; font-size: clamp(52px, 6vw, 96px); }
.mine__who { margin: 0; font: 400 13px/1 var(--ui); text-transform: uppercase; letter-spacing: 0.06em; color: rgb(243 231 220 / 0.6); }
.mine__list { display: grid; gap: 14px; }
.mine__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.capp {
  display: grid; gap: 14px; padding: clamp(20px, 3vw, 28px);
  background: rgb(20 18 16 / 0.72); border: 1px solid rgb(217 207 191 / 0.16); border-left: 3px solid rgb(243 231 220 / 0.35);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.capp[data-status="approved"] { border-left-color: #e01b22; }
.capp[data-status="rejected"] { border-left-color: rgb(243 231 220 / 0.15); }
.capp__top { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.capp__name { margin: 0; font: 900 clamp(30px, 3.2vw, 44px)/0.95 var(--head); font-stretch: 62%; text-transform: uppercase; overflow-wrap: anywhere; }
.capp__status { padding: 5px 9px 4px; font: 500 12px/1 var(--ui); text-transform: uppercase; letter-spacing: 0.06em; border: 1px solid rgb(243 231 220 / 0.3); color: rgb(243 231 220 / 0.8); white-space: nowrap; }
.capp[data-status="approved"] .capp__status { background: #e01b22; border-color: #e01b22; color: #141210; }
.capp[data-status="rejected"] .capp__status { color: rgb(243 231 220 / 0.5); }
.capp__rows { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 18px; border-top: 1px solid rgb(217 207 191 / 0.14); padding-top: 14px; }
.capp__rows div { display: grid; gap: 6px; min-width: 0; }
.capp__rows dt { font: 400 11px/1 var(--ui); text-transform: uppercase; letter-spacing: 0.06em; color: rgb(243 231 220 / 0.5); }
.capp__rows dd { margin: 0; font: 400 14px/1.4 var(--text); color: #f3e7dc; overflow-wrap: anywhere; }
.capp__rows dd a { color: inherit; text-decoration: underline; text-decoration-color: rgb(224 27 34 / 0.8); text-underline-offset: 3px; }
.capp__rows .wide { grid-column: 1 / -1; }
.capp__note { margin: 0; padding: 12px 14px; border-left: 3px solid #e01b22; background: rgb(243 231 220 / 0.05); font: 400 15px/1.5 var(--text); color: rgb(243 231 220 / 0.85); }
.capp__note b { color: #f3e7dc; font-weight: 600; }

/* phone: the knights stand in the middle, the text sits on the dark below */
@media (max-width: 900px) {
  .collab-page .apply-main { align-items: flex-end; }
  .collab-page .apply-bg picture img { object-position: 50% 0; }
  .collab-page .apply-bg__shade {
    background:
      linear-gradient(to bottom, rgb(10 6 6 / 0.5) 0, transparent 12%, transparent 52%, rgb(10 6 6 / 0.6) 66%, rgb(10 6 6 / 0.92) 82%, rgb(10 6 6 / 0.97) 100%);
  }
  body.collab-page[data-view="form"] .apply-main, body.collab-page[data-view="mine"] .apply-main { align-items: flex-start; }
}
body.collab-page[data-view="form"] .apply-bg__shade, body.collab-page[data-view="mine"] .apply-bg__shade { background: rgb(10 6 6 / 0.55); }
@media (max-width: 760px) {
  .collab-page .apply-intro h1 { font-size: clamp(58px, 16vw, 88px); }
  .collab-actions .btn { width: 100%; justify-content: center; }
  .deliv { grid-template-columns: 1fr; }
  .cfield__row { grid-template-columns: 1fr 1fr; }
  .capp__rows { grid-template-columns: 1fr 1fr; }
  .dcard { flex-wrap: wrap; }
  .mine__actions .pill { width: 100%; }
}

/* apply.css folds a finished step; here every field stays open while it is filled in */
.collab-page .step.is-done .step__body { display: grid; }
.collab-page .step.is-done .step__state { color: var(--moon); }

/* the form never gets wider than the screen (the long tag in its head used to push it) */
.collab-page .formview, .collab-page .mine { min-width: 0; max-width: 100%; }
.collab-page .formview__head .eyebrow { white-space: normal; text-align: right; }
@media (max-width: 900px) {
  /* phone: the picture takes the top of the screen, so the knights stand clear above the text */
  .collab-page .apply-bg picture img { height: 72%; object-position: 50% 0; }
  .collab-page .apply-bg { background: #0d0909; }
  .collab-page .apply-bg__shade {
    background: linear-gradient(to bottom, rgb(10 6 6 / 0.45) 0, transparent 12%, transparent 46%, rgb(13 9 9 / 0.85) 66%, #0d0909 74%, #0d0909 100%);
  }
  .collab-page .apply-main { padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
  .collab-page .apply-intro h1 { margin-bottom: 18px; }
  .collab-actions { margin-top: 26px; }
  body.collab-page[data-view="form"] .apply-bg__shade, body.collab-page[data-view="mine"] .apply-bg__shade { background: rgb(13 9 9 / 0.7); }
}
@media (max-width: 760px) {
  .collab-page .apply-intro h1 { font-size: clamp(52px, 14.5vw, 80px); }
  .collab-page .formview { padding-inline: 18px; }
}

/* ---------- the countdown in the hero: condensed numerals, mono labels, the seconds in red ---------- */
.cdown { margin-top: 34px; display: grid; gap: 14px; justify-items: start; }
.cdown__label, .cdown__closed {
  margin: 0; display: flex; align-items: center; gap: 10px;
  font: 500 12px/1 var(--ui); text-transform: uppercase; letter-spacing: 0.08em; color: rgb(243 231 220 / 0.72);
}
.cdown__label i, .cdown__closed i { flex: none; width: 7px; height: 7px; background: #e01b22; }
.cdown__label i { animation: cdown-beat 2s steps(1, end) infinite; }
@keyframes cdown-beat { 50% { opacity: 0.25; } }
.cdown__row { display: flex; align-items: stretch; }
.cdown__cell { display: grid; gap: 9px; justify-items: start; padding: 2px 26px 0; border-left: 1px solid rgb(243 231 220 / 0.2); }
.cdown__cell:first-child { padding-left: 0; border-left: 0; }
.cdown__cell b {
  min-width: 2ch; font: 900 clamp(52px, 4.9vw, 84px)/0.82 var(--head); font-stretch: 62%; font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: -0.01em; color: #f3e7dc;
}
.cdown__cell span { font: 400 11px/1 var(--ui); text-transform: uppercase; letter-spacing: 0.1em; color: rgb(243 231 220 / 0.55); }
.cdown__cell--sec b { color: #e01b22; }
.cdown__closed { margin-top: 34px; width: fit-content; padding: 12px 16px 11px; border: 1px solid rgb(243 231 220 / 0.28); background: rgb(13 9 9 / 0.5); color: #f3e7dc; font-size: 13px; }
.collab-page .collab-actions { margin-top: 30px; }
.collab-actions a.btn { text-decoration: none; }

/* ---------- the form: community blocks ---------- */
.comms { display: grid; gap: 14px; width: 100%; }
.comm {
  display: grid; gap: 18px; padding: 18px 18px 20px; min-width: 0;
  border: 1px solid rgb(243 231 220 / 0.14); border-left: 3px solid rgb(243 231 220 / 0.3); background: rgb(243 231 220 / 0.025);
  transition: border-color 0.25s;
}
.comm.is-ok { border-left-color: #e01b22; }
.comm__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 16px; }
.comm__n { font: 500 12px/1 var(--ui); text-transform: uppercase; letter-spacing: 0.08em; color: #f3e7dc; }
.comm__pick { display: flex; justify-content: space-between; gap: 12px; }
.comm__count { color: rgb(243 231 220 / 0.55); }
.comm__count.is-full { color: #e01b22; }
.comm .cfield__note { margin-top: -8px; }
.comm-add { display: grid; gap: 10px; width: 100%; }
.comm-add__btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 52px; padding: 0 16px; cursor: pointer;
  background: none; border: 1px dashed rgb(243 231 220 / 0.34); color: #f3e7dc;
  font: 500 13px/1 var(--ui); text-transform: uppercase; letter-spacing: 0.06em; transition: border-color 0.2s, background-color 0.2s;
}
.comm-add__btn span { font-size: 18px; line-height: 0; color: #e01b22; }
.comm-add__btn:hover { border-style: solid; border-color: rgb(243 231 220 / 0.7); background: rgb(243 231 220 / 0.05); }
.comm-add__note { margin: 0; font: 400 12px/1.4 var(--ui); text-transform: uppercase; letter-spacing: 0.05em; color: rgb(243 231 220 / 0.55); }
.comm-add__note::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 9px; background: #e01b22; vertical-align: 1px; }
.collab-page .cform > .step__hint { max-width: 52ch; }
.collab-page .step[data-step="community"] .step__state:not(:empty) { white-space: nowrap; }
.capp__note--quiet { border-left-color: rgb(243 231 220 / 0.25); color: rgb(243 231 220 / 0.7); }

@media (max-width: 900px) {
  /* phone: the countdown is one compact line, so the headline still starts below the knights */
  .cdown { margin-top: 18px; gap: 10px; }
  .cdown__cell { grid-auto-flow: column; align-items: baseline; gap: 6px; padding: 0 14px; }
  .cdown__cell b { font-size: clamp(34px, 10vw, 44px); line-height: 0.85; }
  .cdown__cell span { font-size: 10px; letter-spacing: 0.08em; }
  .cdown__closed { margin-top: 18px; }
  .collab-page .collab-actions { margin-top: 22px; }
  .collab-page .apply-lede { font-size: 16px; line-height: 1.4; max-width: 36ch; }
  .collab-page .apply-intro h1 { margin-bottom: 14px; }
}
@media (max-width: 760px) {
  .comm { padding: 16px 14px 18px; }
  .collab-actions a.btn { width: 100%; justify-content: center; }
}
@media (max-width: 380px) {
  .cdown__cell { padding: 0 10px; gap: 5px; }
  .cdown__cell span { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) { .cdown__label i { animation: none; } }
@media (max-width: 900px) {
  /* with the countdown the text block is taller: the picture is a little smaller so the knights stay clear above it */
  .collab-page .apply-bg picture img { height: 63%; }
  .collab-page .apply-bg__shade {
    background: linear-gradient(to bottom, rgb(10 6 6 / 0.45) 0, transparent 12%, transparent 40%, rgb(13 9 9 / 0.85) 57%, #0d0909 64%, #0d0909 100%);
  }
}
@media (max-width: 900px) and (max-height: 720px) {
  /* short phones: the lede gives its room to the countdown */
  .collab-page .apply-intro .apply-lede { display: none; }
  .collab-page .apply-bg picture img { height: 60%; }
}

/* a finished step stays open here (apply.css folds it; this selector outweighs that rule) */
.collab-page .steps .step.is-done:not([data-step="post"]):not(.is-open) .step__body { display: grid; }
.collab-page .step[data-step="x"].is-done .step__state { cursor: default; text-decoration: none; }

/* ---------- the connected X account, and the way out ---------- */
.xacct {
  display: flex; align-items: center; gap: 12px; width: 100%; min-width: 0; padding: 10px 10px 10px 12px;
  border: 1px solid rgb(243 231 220 / 0.18); border-left: 3px solid #f3e7dc; background: rgb(243 231 220 / 0.04);
}
.xacct img { flex: none; width: 44px; height: 44px; object-fit: cover; image-rendering: pixelated; border: 1px solid rgb(243 231 220 / 0.3); background: #1a1513; }
.xacct__who { margin: 0; display: grid; gap: 6px; min-width: 0; flex: 1; }
.xacct__who span { font: 400 11px/1 var(--ui); text-transform: uppercase; letter-spacing: 0.06em; color: rgb(243 231 220 / 0.55); }
.xacct__who b { font: 500 16px/1.1 var(--ui); color: #f3e7dc; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xacct__out { flex: none; }
.xacct .pill { padding-block: 11px; }
.xacct--hero { width: fit-content; max-width: 100%; margin-top: 22px; padding: 8px 14px 8px 8px; gap: 12px; border-left-width: 1px; background: rgb(13 9 9 / 0.45); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.xacct--hero img { width: 36px; height: 36px; }
.xacct--hero .xacct__who b { font-size: 14px; }
.xacct--hero .xacct__out { margin-left: 10px; }
.xacct--mine { width: min(520px, 100%); }
@media (max-width: 900px) {
  .xacct--hero { margin-top: 14px; width: 100%; }
  .xacct--hero .xacct__out { margin-left: auto; }
}
@media (max-width: 480px) {
  /* phone: the button takes its own line under the name */
  .xacct:not(.xacct--hero) { flex-wrap: wrap; }
  .xacct:not(.xacct--hero) .xacct__out { width: 100%; justify-content: center; }
}

/* ---------- the limit by the step's title: badge + counter ---------- */
.commcap { margin: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font: 400 12px/1 var(--ui); text-transform: uppercase; letter-spacing: 0.06em; color: rgb(243 231 220 / 0.6); }
.commcap__badge { padding: 5px 8px 4px; background: #e01b22; color: #141210; font-weight: 500; letter-spacing: 0.07em; }
.commcap__count { padding: 4px 8px 3px; border: 1px solid rgb(243 231 220 / 0.32); color: #f3e7dc; font-weight: 500; font-variant-numeric: tabular-nums; transition: border-color 0.2s, color 0.2s; }
.commcap__count.is-full { border-color: #e01b22; color: #e01b22; }
.comm-add__full {
  margin: 0; display: flex; align-items: center; justify-content: center; min-height: 52px; padding: 8px 16px; text-align: center;
  border: 1px solid rgb(224 27 34 / 0.55); background: rgb(224 27 34 / 0.08); color: #f3e7dc;
  font: 500 13px/1.4 var(--ui); text-transform: uppercase; letter-spacing: 0.06em;
}

/* ---------- the rules, before the Send button ---------- */
.rules-jump {
  display: flex; align-items: center; gap: 10px; width: fit-content; max-width: 100%; margin: 14px 0 2px; padding: 10px 14px 9px 12px;
  border: 1px solid rgb(243 231 220 / 0.2); border-left: 3px solid #e01b22; background: rgb(224 27 34 / 0.07);
  color: #f3e7dc; text-decoration: none; font: 500 12px/1.3 var(--ui); text-transform: uppercase; letter-spacing: 0.06em; transition: background-color 0.2s, border-color 0.2s;
}
.rules-jump:hover { background: rgb(224 27 34 / 0.16); border-color: rgb(243 231 220 / 0.4); border-left-color: #e01b22; }
.rules-jump i { flex: none; width: 6px; height: 6px; background: #e01b22; }
.rules-jump span { color: #e01b22; }
.crules {
  display: grid; gap: 18px; margin: 26px 0 22px; padding: 22px 22px 20px; outline: none; scroll-margin: 24px;
  border: 1px solid rgb(243 231 220 / 0.16); border-left: 3px solid #e01b22; background: rgb(243 231 220 / 0.035); transition: opacity 0.3s;
}
.crules.is-locked { opacity: 0.38; }
.crules.is-locked .crules__agree { pointer-events: none; }
.crules__title { margin: 0; font: 900 clamp(26px, 2.2vw, 34px)/1 var(--head); font-stretch: 62%; text-transform: uppercase; letter-spacing: -0.01em; color: #f3e7dc; }
.crules__list { margin: 0; padding: 0; list-style: none; display: grid; }
.crules__list li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-top: 1px solid rgb(243 231 220 / 0.12); }
.crules__n { padding-top: 4px; font: 500 12px/1 var(--ui); letter-spacing: 0.08em; color: #e01b22; }
.crules__list p { margin: 0; font: 400 15px/1.5 var(--text); color: rgb(243 231 220 / 0.78); }
.crules__list b { color: #f3e7dc; font-weight: 600; }
.crules__agree { padding: 14px 14px 13px; border: 1px solid rgb(243 231 220 / 0.26); background: rgb(13 9 9 / 0.4); transition: border-color 0.2s, background-color 0.2s; }
.crules.is-agreed .crules__agree { border-color: #e01b22; background: rgb(224 27 34 / 0.1); }
@media (max-width: 760px) {
  .crules { padding: 18px 16px 16px; margin-top: 22px; }
  .rules-jump { width: 100%; }
}

/* ---------- another X account already applied for this community ---------- */
.comm.is-taken { border-color: rgb(224 27 34 / 0.6); border-left-color: #e01b22; background: rgb(224 27 34 / 0.05); }
.comm__dup {
  margin: 0; display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px 11px;
  border: 1px solid #e01b22; background: rgb(224 27 34 / 0.14); color: #ff5a55;
  font: 500 14px/1.4 var(--text); overflow-wrap: anywhere;
}
.comm__dup::before { content: "!"; flex: none; display: grid; place-items: center; width: 18px; height: 18px; margin-top: 1px; background: #e01b22; color: #141210; font: 900 13px/1 var(--head); }
