/* Unuploaded — shared tool-page styles.
   D3 site-level (all four converters share one UI); kit tokens only. */

.drop {
  display: block;
  width: 100%;
  appearance: none;
  font: inherit;
  color: inherit;
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 2.2rem 1rem;
  text-align: center;
  cursor: pointer;
  margin: 0 0 0.9rem;
}

.drop:hover, .drop.over {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.drop .drop-title {
  display: block;
  font-weight: 700;
  margin: 0 0 0.25rem;
}

.drop .drop-sub {
  display: block;
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin: 0;
}

.results {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
}

.result-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 0.55rem 0.8rem;
  margin: 0 0 0.5rem;
}

.result-row .r-name {
  font-family: var(--mono);
  font-size: 0.82rem;
  word-break: break-all;
  flex: 1 1 14rem;
}

.result-row .r-meta {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-soft);
  white-space: nowrap;
}

.result-row.failed { border-left: 3px solid var(--fail); }
.result-row.failed .r-meta { color: var(--fail); }

.quality-row label { white-space: nowrap; }
.quality-row .q-val {
  font-family: var(--mono);
  font-size: 0.85rem;
  min-width: 2.6rem;
  display: inline-block;
}
.controls input[type="range"] { width: min(16rem, 70vw); }
#quality { accent-color: var(--accent); width: min(14rem, 50vw); }

/* The morse decoder's answer surfaces. The strip's height is fixed here
   rather than measured at runtime because the canvas paints after decode:
   an unsized canvas would reflow the page at that moment, and zero CLS is
   a house floor, not a preference. */
.decode-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0.9rem 0 0.35rem;
}

.decode-head .decode-label {
  font-weight: 700;
  font-size: 0.9rem;
}

.transcript {
  font-family: var(--mono);
  font-size: 0.95rem;
  min-height: 2.6rem;
  margin: 0 0 0.5rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  white-space: pre-wrap;
  word-break: break-word;
}

#strip {
  display: block;
  width: 100%;
  height: 90px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  margin: 0 0 0.5rem;
}

.elements {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin: 0 0 0.5rem;
  white-space: pre-wrap;
  word-break: break-word;
}

/* The 3D rail's preview canvas. Its height is fixed here, exactly as the
   morse strip's is, because the canvas paints after parse; an unsized
   canvas reflows the page at that moment, and zero CLS is a house floor.
   touch-action is scoped to the canvas alone — it is a fixed-height box,
   never fullscreen, so the page still scrolls everywhere else. */
#view {
  display: block;
  width: 100%;
  height: 420px;
  touch-action: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  margin: 0 0 0.5rem;
}

#view:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (max-width: 30rem) { #view { height: 280px; } }

/* The GIF page's clip-range fields (kit styles text inputs and selects;
   number inputs get the same face, sized for seconds). */
.controls input[type="number"] {
  font: inherit;
  font-size: 1rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--ink);
  width: 5.5rem;
}
