/* E6B flight computer — local layout on top of shared/site.css */
:root {
  --wrap: 70rem;
}

.e6b-workbench {
  display: grid;
  gap: 1.25rem;
  margin-top: 0.3rem;
}

@media (min-width: 960px) {
  .e6b-workbench {
    grid-template-columns: minmax(18rem, 24rem) minmax(22rem, 1fr);
    align-items: start;
    gap: 1.5rem;
  }
}

.mode-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 0.85rem;
}

.mode-grid .seg-btn {
  font-size: 0.8rem;
  padding: 0.4rem 0.7rem;
}

.field-block[hidden],
.mode-fields[hidden] {
  display: none;
}

.e6b-stage {
  background:
    radial-gradient(ellipse at 50% 30%, #1a2234 0%, #0c121e 70%);
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  padding: 0.7rem 0.7rem 0.9rem;
}

.stage-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.stage-caption {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

.side-toggle .seg-btn { font-size: 0.8rem; }

.computer-wrap,
.wind-wrap {
  width: 100%;
  max-width: 36rem;
  margin: 0 auto;
}

.wind-wrap {
  max-width: 44rem;
}

.computer-wrap svg,
.wind-wrap svg {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

.computer-wrap svg { cursor: grab; }
.computer-wrap svg.is-dragging { cursor: grabbing; }

#wind-stage[hidden],
#computer-stage[hidden] { display: none; }

.btn-solid {
  background: var(--gold);
  color: #1a1408;
  border: 1px solid #c49a3a;
}
.btn-solid:hover { filter: brightness(1.06); }

.step-list {
  margin: 0.8rem 0 0;
  padding: 0.7rem 0.85rem 0.75rem 1.4rem;
  background: #0c121f;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--text);
  font-size: 0.88rem;
}
.step-list li { margin: 0.25rem 0; }
.step-list li.is-active { color: var(--gold); font-weight: 600; }
.step-list li.is-done { color: var(--cyan); }

.drag-readout {
  margin: 0.35rem 0 0;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
  min-height: 1.2em;
}

.formula-block {
  margin: 0.9rem 0;
  padding: 0.85rem 1rem;
  background: #0c121f;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  overflow-x: auto;
}
.formula-block p { margin: 0.35rem 0; }
.formula-block code,
.explainer code {
  font-family: var(--mono);
  font-size: 0.88em;
}

.cite {
  color: var(--faint);
  font-size: 0.8rem;
  margin: 0.35rem 0 0;
}

.related-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.9rem;
  margin: 0.6rem 0 0;
  padding: 0;
  list-style: none;
}

@media (prefers-reduced-motion: reduce) {
  .e6b-hl { transition: none; }
}

@media (max-width: 639px) {
  :root { --wrap: 44rem; }
  .mode-grid .seg-btn { font-size: 0.78rem; }
}

/* The shared calc-panel becomes a 2-column grid at 720px (form | results).
   This page puts the form and the computer in a workbench, so those
   children need to span the full width or the illustration is squeezed. */
@media (min-width: 720px) {
  .calc-panel .e6b-workbench,
  .calc-panel .warnings,
  .calc-panel .results {
    grid-column: 1 / -1;
  }
  .calc-panel .results {
    grid-row: auto;
    margin-top: 1.5rem;
    padding-top: 1.35rem;
    border-top: 1px solid var(--line-strong);
    border-left: 0;
    padding-left: 0;
  }
}
