/* VnVFables: the styles this game adds to FablesCore. Code follows ScaleFables' code style. */

.vv-title { margin: 0 0 8px; }
.vv-note { margin: 8px 0 0; color: var(--muted); font-size: 0.85rem; }
.vv-prompt { margin: 14px 0 0; font-weight: 600; }

/* Code: at most about 8 lines on the daily. */
.vv-code {
  margin: 0;
  padding: 10px 12px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font: 0.92rem/1.55 var(--mono);
  tab-size: 4;
  white-space: pre;
}

/* The tests a function was given, lettered. */
.vv-tests { margin: 10px 0 0; }
.vv-tests-head { margin: 0 0 4px; font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.vv-tests ul { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; font-size: 0.92rem; }
.vv-tests li { display: grid; grid-template-columns: 1.6em 1fr; gap: 6px; }
.vv-letter { font-weight: 700; color: var(--muted); }

/* Tables: convergence studies and repo histories, readable at 375 px. */
.vv-table-wrap { margin: 10px 0 0; overflow-x: auto; }
.vv-table { border-collapse: collapse; font: 0.88rem/1.4 var(--mono); }
.vv-table th, .vv-table td { padding: 4px 10px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.vv-table th { color: var(--muted); font: 600 0.8rem/1.3 system-ui, sans-serif; white-space: normal; vertical-align: bottom; }
.vv-table th:first-child, .vv-table td:first-child { text-align: left; }

/* Choices. */
.vv-options { display: grid; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.vv-options.vv-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.vv-option {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.vv-option:hover:not(:disabled) { border-color: var(--accent); }
.vv-option:disabled { cursor: default; }
.vv-option.tried { opacity: 0.6; text-decoration: line-through; }
.vv-option.is-answer { border: 2px solid var(--good); background: var(--good-soft); opacity: 1; text-decoration: none; }

/* Tap the line: each line of code is a button, as in ScaleFables. */
.vv-options.vv-lines { gap: 4px; }
.vv-option.vv-line { min-height: 40px; padding: 6px 12px; border-left: 3px solid var(--line); }
.vv-option.vv-line code { font: 0.9rem/1.5 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.vv-option.vv-line:hover:not(:disabled) { border-left-color: var(--accent); }

@media (max-width: 480px) {
  .vv-options.vv-pair { grid-template-columns: 1fr; }
  .vv-code { font-size: 0.8rem; }
  .vv-option.vv-line code { font-size: 0.84rem; }
  .vv-table { font-size: 0.82rem; }
  .vv-table th, .vv-table td { padding: 4px 6px; }
}
