/* Start Up application.

   THE RULE THAT BIT FIRST: universalUI.css sets `input, textarea, select`
   to width:100%. Radios and checkboxes are inputs, so every one of them
   rendered 450-odd pixels wide with the dot floating in the middle of an
   empty column. Anything here that lays out a radio or a checkbox has to
   hand its width back.

   Colors and type come from universalUI's tokens rather than new hexes, so
   this page ages with the rest of the platform instead of drifting from it. */

.apply-page {
  max-width: 50rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 5rem;
  color: var(--ink);
}

/* ---------- Header ---------- */

.apply-header { margin-bottom: 2.25rem; }

.apply-lockup { display: block; height: 2.6rem; width: auto; margin-bottom: 1.5rem; }

.apply-kicker {
  margin: 0 0 .4rem;
  font-family: var(--font-ui);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--primary-color);
}

.apply-header h1 { margin: 0 0 1rem; line-height: 1.12; }

.apply-intro { margin: 0 0 .85rem; color: var(--secondary-color); max-width: 42rem; }

.apply-comp {
  margin: 1.5rem 0 0;
  padding: 1rem 1.2rem;
  border-left: 4px solid var(--success-color);
  background: rgba(39, 134, 94, .07);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--ink);
}

/* ---------- Sections ---------- */

.apply-section {
  margin: 0 0 1.5rem;
  padding: 1.75rem;
  border: var(--card-border);
  border-radius: var(--radius-md);
  background: var(--card-bg-solid);
  box-shadow: var(--card-shadow);
}

.apply-section h2 {
  margin: 0 0 .5rem;
  font-size: 1.05rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.apply-help {
  margin: 0 0 1.4rem;
  font-size: .92rem;
  line-height: 1.6;
  color: var(--slate);
  max-width: 42rem;
}

/* ---------- Fields ---------- */

.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.1rem 1.25rem;
}

.field { display: grid; gap: .4rem; margin: 0; align-content: start; }

.field-wide { margin-top: 1.25rem; }

.field label {
  font-family: var(--font-ui);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--secondary-color);
  line-height: 1.4;
}

.field textarea { resize: vertical; min-height: 5rem; }

/* ---------- Checkbox and radio sets ---------- */

.checkbox-set {
  margin: 1.4rem 0 0;
  padding: 1.1rem 1.2rem 1.2rem;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: var(--paper-blue);
}

.checkbox-set legend {
  padding: 0 .45rem;
  font-family: var(--font-ui);
  font-size: .82rem;
  font-weight: 600;
  color: var(--secondary-color);
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: .55rem 1.5rem;
}

.checkbox,
.agreement,
.delivery-option {
  display: flex;
  gap: .65rem;
  align-items: flex-start;
  cursor: pointer;
}

/* Handing the width back. See the note at the top. */
.checkbox input,
.agreement input,
.delivery-option input {
  width: auto;
  flex: 0 0 auto;
  margin: .2rem 0 0;
  padding: 0;
  accent-color: var(--primary-color);
}

.checkbox { font-size: .93rem; line-height: 1.45; }

/* ---------- Delivery choice ---------- */

.delivery-choice { display: grid; gap: .85rem; }

.delivery-option {
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
  transition: border-color .12s ease, box-shadow .12s ease;
}

.delivery-option:hover { border-color: var(--primary-color); }

.delivery-option:has(input:checked) {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(25, 158, 217, .16);
  background: var(--paper-blue);
}

.delivery-body { display: grid; gap: .25rem; }

.delivery-body strong {
  font-family: var(--font-ui);
  font-size: 1rem;
  letter-spacing: .01em;
}

.delivery-body span { font-size: .92rem; color: var(--slate); line-height: 1.5; }

.delivery-price {
  font-family: var(--font-ui);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--primary-color);
}

/* ---------- Agreements ---------- */

.agreement {
  margin: 0 0 1.15rem;
  font-size: .86rem;
  line-height: 1.55;
  color: var(--secondary-color);
}

.agreement:last-child { margin-bottom: 0; }

/* ---------- Submit ---------- */

.apply-submit { margin-top: 2rem; text-align: center; }

.apply-button {
  display: inline-block;
  padding: .95rem 2.4rem;
  border: 0;
  border-radius: 999px;
  background: var(--accent-color);
  color: #fff;
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: .02em;
  text-decoration: none;
  cursor: pointer;
  transition: background .12s ease;
}

.apply-button:hover:not(:disabled) { background: #d8641a; }

.apply-button:disabled { opacity: .55; cursor: default; }

.apply-status {
  margin: 0 auto 1.1rem;
  padding: .85rem 1.1rem;
  border-radius: var(--radius-md);
  font-size: .93rem;
  text-align: left;
  max-width: 38rem;
}

.apply-status.error {
  background: rgba(200, 66, 53, .08);
  color: var(--danger-color);
}

.apply-status.notice {
  background: rgba(238, 117, 36, .1);
  color: #9a4a10;
}

.apply-submit .apply-help { margin: 1rem auto 0; text-align: center; }

/* ---------- Result page ---------- */

.apply-result {
  max-width: 34rem;
  margin: 0 auto;
  padding: 5rem 1.5rem;
  text-align: center;
  color: var(--ink);
}

.apply-result h1 { margin: 0 0 1.25rem; }

.apply-result p { margin: 0 0 1.1rem; color: var(--secondary-color); line-height: 1.65; }

@media (max-width: 40rem) {
  .apply-page { padding-top: 1.75rem; }
  .apply-section { padding: 1.2rem; }
  .checkbox-grid { grid-template-columns: 1fr; }
}
