:root {
  --fg: #1b1b1b;
  --muted: #666;
  --accent: #0b5cad;
  --border: #ddd;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--fg);
  margin: 0;
  background: #fafafa;
}

main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

h1 { margin-top: 0.5rem; }

a { color: var(--accent); }

code {
  background: #eef1f4;
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
  font-size: 0.9em;
  word-break: break-all;
}

.endpoint { color: var(--muted); }

.nav { line-height: 2; }

.error {
  color: #b00020;
  background: #fde7ea;
  padding: 0.75rem 1rem;
  border-radius: 4px;
}

table {
  border-collapse: collapse;
  width: 100%;
  background: #fff;
  font-size: 0.9rem;
}

th, td {
  border: 1px solid var(--border);
  padding: 0.4rem 0.6rem;
  text-align: left;
  vertical-align: top;
  word-break: break-all;
}

th { background: #f0f3f6; position: sticky; top: 0; }

tbody tr:nth-child(even) { background: #f7f9fb; }

.namespace-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.namespace-row .form-input { flex: 1; max-width: none; }

.namespace-row .button { margin-top: 0; white-space: nowrap; }

/* dkfds only reddens inputs that are direct children of .form-error */
.form-group.form-error .namespace-row .form-input {
  border: 2px solid #CC0000;
  padding: calc(8px - 2px) calc(16px - 2px);
}

/* /items: whole row is clickable via a link stretched over the row */
.items-table .clickable-row { position: relative; cursor: pointer; }

.items-table .clickable-row:hover,
.items-table .clickable-row:focus-within { background: #e3edf7; }

/* dkfds sets html to 62.5%, so 1rem = 10px and body text is 1.6rem */
.items-table, .facts-table { font-size: 1.6rem; }

.items-table th, .facts-table th { font-size: 1.6rem; }

.items-table th, .items-table td, .facts-table th, .facts-table td { padding: 0.8rem 1.2rem; }

.items-table .item-label { font-size: 2rem; font-weight: 600; word-break: normal; }

.items-table .item-label a::after {
  content: "";
  position: absolute;
  inset: 0;
}

/* /item/<id>: heading-per-row table of the element's facts */
.facts-table th {
  position: static;
  width: 18rem;
  white-space: nowrap;
  word-break: normal;
}
