/* Gene Dictionary — black & white baseline. Designers: change the tokens below first. */
:root {
  --bg: #ffffff;
  --fg: #000000;
  --muted: #555555;
  --border: #000000;
  --border-soft: #cccccc;
  --surface-alt: #f4f4f4;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --space: 1rem;
  --radius: 0;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
}

a { color: var(--fg); }
a.link { text-decoration: underline; }
.muted { color: var(--muted); }

h1, h2 { font-weight: 600; margin: 0 0 var(--space); }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.05rem; text-transform: uppercase; letter-spacing: 0.04em; }

/* Layout */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem var(--space);
  border-bottom: 1px solid var(--border);
}
.brand { font-weight: 700; text-decoration: none; }
.site-nav { display: flex; align-items: center; gap: var(--space); }
.inline-form { display: inline; margin: 0; }
.page { max-width: 1200px; margin: 0 auto; padding: var(--space); }

/* Buttons and inputs */
.button {
  display: inline-block;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--fg);
  color: var(--bg);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}
.button-secondary { background: var(--bg); color: var(--fg); }
.button.is-disabled { color: var(--muted); border-color: var(--border-soft); cursor: default; }
.button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }

input, select {
  font: inherit;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--fg);
}
.field { display: flex; flex-direction: column; gap: 0.25rem; }
.field > span { font-size: 0.85rem; color: var(--muted); }
.field-inline { min-width: 14rem; }
.field-narrow { min-width: 10rem; }

/* Login */
.login {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space);
  padding: var(--space);
}
.brand-title { font-size: 1.25rem; letter-spacing: 0.08em; text-transform: uppercase; margin: 0; }
.card { border: 1px solid var(--border); padding: calc(var(--space) * 1.5); width: 100%; max-width: 22rem; }
.form { display: flex; flex-direction: column; gap: var(--space); }
.form-error { margin: 0; padding: 0.5rem 0.75rem; border: 1px solid var(--border); background: var(--surface-alt); }

/* Tabs */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: var(--space); }
.tab {
  padding: 0.6rem 1rem;
  text-decoration: none;
  border: 1px solid transparent;
  border-bottom: none;
  margin-bottom: -1px;
}
.tab.is-active { border-color: var(--border); background: var(--bg); font-weight: 600; }
.tab .count { color: var(--muted); font-variant-numeric: tabular-nums; margin-left: 0.35rem; }

/* Toolbar */
.toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space); margin-bottom: 0.5rem; }
.results { margin: 0.25rem 0 0.75rem; }

/* Table */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 0.5rem 0.75rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border-soft); }
.table thead th { border-bottom: 1px solid var(--border); font-weight: 600; background: var(--surface-alt); }
.table tbody tr:last-child td { border-bottom: none; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .truncate { max-width: 34rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table .wrap { white-space: normal; max-width: 44rem; }
.table .nowrap { white-space: nowrap; }
.table .empty { text-align: center; color: var(--muted); padding: 2rem; }
.symbol { font-family: var(--font-mono); font-weight: 600; text-decoration: none; }
.symbol:hover { text-decoration: underline; }

.badge {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.05rem 0.4rem;
  border: 1px solid var(--border);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  vertical-align: middle;
}
.badge-status { background: var(--fg); color: var(--bg); }

/* Pagination */
.pagination { display: flex; align-items: center; gap: var(--space); margin-top: var(--space); }

/* Entry detail */
.entry-title { display: flex; align-items: center; gap: 0.5rem; font-family: var(--font-mono); }
.section { margin-top: calc(var(--space) * 1.5); padding-top: var(--space); border-top: 1px solid var(--border-soft); }
.details { display: grid; grid-template-columns: max-content 1fr; gap: 0.5rem var(--space); margin: 0; }
.details dt { color: var(--muted); }
.details dd { margin: 0; max-width: 70ch; }
.plain-list { margin: 0.25rem 0 0; padding-left: 1.2rem; }
.raw-comments { margin-top: var(--space); }
.raw-comments summary { cursor: pointer; color: var(--muted); }
.raw-comments pre {
  margin: 0.5rem 0 0;
  padding: 0.75rem;
  border: 1px solid var(--border-soft);
  background: var(--surface-alt);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  white-space: pre-wrap;
}

@media (max-width: 640px) {
  .details { grid-template-columns: 1fr; }
  .table .truncate { max-width: 16rem; }
}
