/* Crossword Generator: what is particular to this page, over /shared/base.css (tokens, frame,
   controls, file button, problems, out-of-date results and the narrow layout). */

/* ---------- Inputs and target ---------- */

.entries {
  width: 100%;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88rem;
  white-space: pre-wrap;
}
.target-row { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; align-items: flex-start; }
.target-row p { margin: 0 0 0.5rem; }
.target-preview { border: 1px solid var(--border); border-radius: var(--radius-sm); background: #ffffff; image-rendering: pixelated; }
.inline-field { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.92rem; color: var(--muted); }
.inline-field input { color: var(--text); max-width: 8rem; }
.target-row > div { flex: 1 1 12rem; }

/* In one column the crosswords come directly after the answers, whose box is shorter
   there (it scrolls, and can be dragged taller). */
@media (max-width: 999px) {
  .entries { height: 11rem; }
}

/* ---------- Results ---------- */

.grid-figure { margin: 0; }
.grid-figure svg { display: block; width: 100%; height: auto; max-width: 720px; }
.progress-figure svg { max-width: 360px; }
/* The target picture's outline over the filled grid (page only), and its key in the toggle. */
.outline-field { display: block; margin: 0 0 0.75rem; }
.outline-field input { margin: 0 0.35rem 0 0; vertical-align: middle; }
.outline-key { display: inline-block; width: 1.6rem; margin-left: 0.3rem; border-top: 3px solid #2b66d5; vertical-align: middle; }
.choice { border: 0; padding: 0; margin: 0 0 0.75rem; min-width: 0; }
.choice legend { font-weight: 600; font-size: 0.92rem; margin-bottom: 0.3rem; }
.choice-list { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; }
.choice-list label { display: inline-flex; gap: 0.35rem; align-items: baseline; }
.clues { display: grid; gap: 0 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.clue-list { margin: 0; padding-left: 0; list-style: none; }
.clue-list li { margin: 0.15rem 0; }
.clue-list .number { font-weight: 700; font-variant-numeric: tabular-nums; }
.clue-list .answer { color: var(--muted); }
.terms { width: 100%; border-collapse: collapse; border: 1px solid var(--border); font-size: 0.92rem; }
.terms th, .terms td { padding: 0.3rem 0.5rem; text-align: left; }
.terms thead th { background: var(--surface-2); color: var(--muted); font-size: 0.85rem; border-bottom: 1px solid var(--border); }
.terms tbody tr + tr > *, .terms tfoot tr > * { border-top: 1px solid var(--border); }
.terms .num { text-align: right; font-variant-numeric: tabular-nums; }

/* Three cards on the left (answers, picture, settings) beside the results. */
@media (min-width: 1000px) {
  .layout { grid-template-rows: auto auto 1fr; }
}
