/* Launch page: builds on styles.css */
.nav-spacer { margin-left: auto; }
.launch { padding-top: clamp(1.5rem, 4vw, 2.5rem); padding-bottom: 4rem; }
.launch-head h1 { font-size: clamp(2.4rem, 5vw, 3.2rem); }
.launch-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 1.5rem; margin-top: 1.5rem; align-items: start; }

.launch-form { padding: clamp(1.25rem, 3vw, 1.8rem); display: grid; gap: 1.1rem; }
.field { display: grid; gap: 0.35rem; }
.label { font-weight: 600; }
.label em { font-style: normal; font-size: 0.8rem; color: var(--caution); margin-left: 0.3rem; }
.launch-form input:not([type="file"]), .launch-form textarea {
  font: 600 1.02rem var(--body); color: var(--ink);
  background: var(--cream); border: 2px solid var(--ink); border-radius: 5px; padding: 0.6rem 0.75rem;
  box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.15); width: 100%;
}
.launch-form textarea { resize: vertical; min-height: 80px; }
.row2 { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 0.9rem; }

.drop {
  display: grid; place-items: center; text-align: center; min-height: 120px; cursor: pointer;
  border: 2px dashed var(--plate-edge); border-radius: 8px; background: #1f2825; padding: 1rem; color: var(--muted);
}
.drop:hover, .drop.over { border-color: var(--caution); color: var(--text); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop small { font-size: 0.85rem; }
.drop:focus-within { outline: 3px solid var(--caution); outline-offset: 2px; }

.more { border: 2px solid #151b19; border-radius: 6px; background: #1f2825; padding: 0.6rem 0.8rem; }
.more summary { cursor: pointer; font-weight: 600; }
.more[open] summary { margin-bottom: 0.7rem; }
.more .field + .field { margin-top: 0.6rem; }
.muted { color: var(--muted); font-weight: 400; }

.buy-row { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; }
.buy-row input { flex: 0 1 140px; }
.presets { display: flex; gap: 0.35rem; }
.presets button {
  font: 700 0.95rem var(--num); color: var(--muted); background: #1f2825;
  border: 2px solid #151b19; border-radius: 5px; padding: 0.45rem 0.75rem; cursor: pointer;
}
.presets button[aria-pressed="true"] { background: var(--cream); color: var(--ink); border-color: var(--ink); }

.cost { margin: 0; color: var(--muted); font-size: 0.92rem; }
.cost strong { color: var(--cream); }
.launch-btn { width: 100%; padding: 0.95rem; font-size: 1.5rem; }
.form-error { margin: 0; min-height: 1.2em; color: #ffb3a9; font-weight: 600; }

.launch-side { display: grid; gap: 1.2rem; position: sticky; top: 80px; }
.preview { padding: 1.2rem; position: relative; }
.preview-tag { position: absolute; top: 0.8rem; right: 1rem; font: 400 1rem var(--display); color: var(--muted); }
.preview-img {
  width: 140px; height: 140px; border-radius: 10px; overflow: hidden; background: #1f2825;
  border: 2px solid #151b19; display: grid; place-items: center; color: var(--muted); font-size: 0.85rem;
}
.preview-img img { width: 100%; height: 100%; object-fit: cover; }
.preview-name { margin: 0.9rem 0 0.2rem; font-size: 1.15rem; overflow-wrap: anywhere; }
.preview-name strong { font: 400 1.5rem var(--display); color: var(--cream); margin-right: 0.3rem; }
.preview-desc { margin: 0; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }

.progress { padding: 1.2rem; }
.steps-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.steps-list li { display: flex; align-items: center; gap: 0.6rem; color: var(--muted); }
.steps-list li::before {
  content: ""; flex: none; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--plate-edge); background: transparent;
}
.steps-list li.active { color: var(--text); font-weight: 600; }
.steps-list li.active::before { border-color: var(--caution); background: var(--caution); animation: blink 0.9s steps(2) infinite; }
.steps-list li.done { color: var(--text); }
.steps-list li.done::before { border-color: var(--pipe); background: var(--pipe); }
.steps-list li.fail { color: #ffb3a9; }
.steps-list li.fail::before { border-color: var(--red); background: var(--red); }
@keyframes blink { 50% { opacity: 0.35; } }

#result:not(:empty) { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #26302d; }
.success h2 { font-size: 1.9rem; color: var(--pipe-hi); }
.success p { margin: 0.4rem 0; }
.success code { color: var(--cream); word-break: break-all; font-size: 0.88rem; }
.success .links { margin: 0.8rem 0 0; display: flex; gap: 0.5rem; flex-wrap: wrap; }

@media (max-width: 860px) {
  .launch-grid { grid-template-columns: 1fr; }
  .launch-side { position: static; order: -1; }
  .row2 { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .steps-list li.active::before { animation: none; }
}
