/* Build — the arrival-day screen.
 *
 * Tokens only (05_CONVENTIONS.md guardrail 10). As on Strike, the territory
 * colour appears in two positions with two different values: `--t-build` as a
 * fill with `--t-build-fg` on it, and `--t-build-deep` when the colour itself
 * is the text on its own tint. The design uses the primary for both, which
 * measures 2.96:1 — see 04_DESIGN_HANDOFF.md § Contrast.
 */

.build-back {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-min);
  padding: 0 var(--space-2) var(--space-3) 0;
  border: 0;
  background: none;
  color: var(--soft);
  font: inherit;
  font-size: var(--size-small);
  cursor: pointer;
}

/* --- the territory header ------------------------------------------------- */

.build-hero {
  border-radius: var(--radius-card);
  padding: var(--space-4) var(--space-5);
  background: var(--t-build-t);
  margin-bottom: var(--space-5);
}

.build-hero-head { display: flex; align-items: center; gap: var(--space-3); }

.build-hero-emoji { font-size: 23px; line-height: 1; }

.build-hero-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(21px, 2.5vw, 29px);
  font-weight: var(--weight-normal);
  line-height: 1.15;
  color: var(--t-build-deep);
}

.build-hero-blurb {
  margin: var(--space-2) 0 0;
  max-width: 46em;
  font-size: 15px;
  color: var(--soft);
}

.build-hero-times {
  margin: var(--space-2) 0 0;
  font-size: var(--size-micro);
  color: var(--soft);
}

.build-lede { margin: 0 0 var(--space-1); font-size: 15px; }

.build-hint {
  margin: 0 0 var(--space-3);
  max-width: 52em;
  font-size: var(--size-small);
  color: var(--soft);
}

/* --- the arrival options -------------------------------------------------- */

/* The design asks for minmax(210px, 1fr), which lands five across on a desktop.
 * At that width the date and the credit fight for the same line and "Wed · Aug
 * 26, before 1pm" breaks after "Aug" — the one thing on the card that has to be
 * read at a glance. Widened to three across, which also divides the nine
 * options evenly instead of leaving an orphan. */
.build-opts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.build-opt {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  min-height: 56px;
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
}

.build-opt.is-on { background: var(--t-build-t); border-color: var(--t-build); }

.build-opt:focus-within { outline: 2px solid var(--ink); outline-offset: 2px; }

/* The radio is the dot: styling the real control keeps arrow-key navigation
 * between the options, which a div with role=radio would have to re-implement. */
.build-dot {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--line);
  border-radius: var(--radius-pill);
  background: transparent;
  cursor: pointer;
}

.build-dot:checked { border-color: var(--t-build); box-shadow: inset 0 0 0 4px var(--t-build); }

.build-opt-body { flex: 1; min-width: 0; }

.build-opt-title {
  display: block;
  font-size: 15px;
  font-weight: var(--weight-semibold);
}

.build-opt-sub {
  display: block;
  font-size: var(--size-micro);
  color: var(--soft);
  font-variant-numeric: tabular-nums;
}

.build-opt-credit {
  flex: none;
  font-size: var(--size-small);
  font-weight: var(--weight-semibold);
  font-variant-numeric: tabular-nums;
  color: var(--soft);
  white-space: nowrap;
}

.build-opt.is-on .build-opt-credit { color: var(--t-build-deep); }

/* --- contact details, identity, save -------------------------------------- */

.build-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

/* Bottom-aligned so the inputs form one line across the row even when a hint
 * wraps to two lines in a narrow column. */
.build-field {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: var(--space-1);
}

/* As on Strike: the design's block of this shape is a fill with a radius, never
 * an outlined card. */
.build-identity {
  border-radius: var(--radius-control);
  background: var(--card);
  padding: 13px 14px;
  margin-bottom: var(--space-4);
}

.build-identity-title {
  margin: 0 0 var(--space-3);
  font-family: var(--font-ui);
  font-size: var(--size-kicker);
  font-weight: var(--weight-bold);
  letter-spacing: var(--track-kicker);
  text-transform: uppercase;
  color: var(--soft);
}

.build-identity .build-fields { margin-bottom: 0; }

.build-identity-note {
  margin: var(--space-3) 0 0;
  font-size: var(--size-micro);
  color: var(--soft);
}

.build-error {
  margin: 0 0 var(--space-3);
  font-size: var(--size-small);
  color: var(--gap);
}

.build-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
}

.build-save {
  border-color: var(--t-build);
  background: var(--t-build);
  color: var(--t-build-fg);
  font-size: 15px;
  padding: var(--space-3) var(--space-5);
}

.build-credit-line { font-size: var(--size-small); color: var(--soft); }

.build-note {
  margin: var(--space-4) 0 0;
  font-size: var(--size-small);
  color: var(--soft);
}

.build-note a { color: inherit; }

@media (max-width: 767px) {
  .build-opts { grid-template-columns: 1fr; }
  .build-save { flex: 1 1 auto; }
}
