/* research.kituwa.com — additions on top of nightdesk.css
   Only the controls nightdesk.css does not cover: native select, file input,
   form labels, and a compact table cell form. Tokens come from nightdesk.css. */

label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--soft);
  margin-bottom: 6px;
}

select,
input[type="file"],
input[type="search"],
input[type="text"] {
  background: var(--surface-2);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font-family: var(--font-body);
  font-size: 13px;
  min-height: 38px;
  max-width: 100%;
}

select:focus-visible,
input:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 2px;
}

select option { background: var(--surface); color: var(--ink); }

input[type="file"] { padding: 7px; color: var(--muted); font-size: 12px; }
input[type="file"]::file-selector-button {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px 10px;
  margin-right: 10px;
  font-family: inherit;
  cursor: pointer;
}

/* A state control inside a table row should not repaint the row height. */
.table td form.row { flex-wrap: nowrap; }
.table td select { min-height: 32px; padding: 4px 6px; font-size: 12px; width: auto; }

/* The doc pages use a wide table; keep numbers aligned without a monospace font. */
.table td.num { font-variant-numeric: tabular-nums; }

@media (max-width: 640px) {
  .table { font-size: 12px; }
  .table td form.row { flex-wrap: wrap; }
}
