/* Round 52: the free calculators' form (templates/gen_tool.html, pages/gen/tools.rs serves this
   file on those pages only): labelled fields in a grid, one column on phones, full-width
   inputs and selects at the site's touch size, the site's primary button. Site tokens only. */
.tool { color-scheme: dark; }
.tool__fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: var(--site-space-4) var(--site-space-5);
  margin: 0 0 var(--site-space-6);
}
.tool__field { display: flex; flex-direction: column; gap: var(--site-space-2); margin: 0; }
.tool__field label { color: var(--ink); font-size: var(--site-text-md); font-weight: 600; }
.tool :is(input, select) {
  box-sizing: border-box;
  width: 100%;
  min-height: var(--site-touch);
  padding: 0 var(--site-space-3);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--site-table-bg);
  color: var(--ink);
  font: inherit;
  font-size: var(--site-text-body);
}
.tool :is(input, select):hover { border-color: var(--cyan-ink); }
.tool :is(input, select, button):focus-visible { outline: 2px solid var(--cyan-ink); outline-offset: 2px; }
.tool [aria-invalid="true"] { border-color: var(--site-warning); }
.tool__submit { margin: 0; }
.tool button[type="submit"] {
  min-height: var(--site-touch);
  padding: 0 var(--site-space-8);
  border: 1px solid var(--cyan);
  border-radius: var(--site-radius-pill);
  background: var(--cyan);
  color: var(--bg);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.tool button[type="submit"]:hover { background: var(--cyan-hover); border-color: var(--cyan-hover); }
@media (max-width: 30rem) {
  .tool button[type="submit"] { width: 100%; }
}
/* Round 56 (S7): the calculator's short plain answer under the H1, a step above body text. */
.tool__answer { color: var(--ink); font-size: var(--site-text-md); font-weight: 600; }
