:root {
  --bg: #0f1419;
  --surface: #1a2332;
  --border: #2d3a4d;
  --text: #e7ecf3;
  --muted: #8b9cb3;
  --accent: #6cb3f7;
  --accent-hover: #8ec8ff;
  --row-alt: rgba(255, 255, 255, 0.03);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  padding: 1rem 1.25rem 2.5rem;
  max-width: 1200px;
  margin-inline: auto;
}

.site-header h1 {
  margin: 0 0 0.35rem;
  font-size: 1.5rem;
  font-weight: 600;
}

.lede {
  margin: 0;
  color: var(--muted);
  max-width: 65ch;
}

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

.lede a:hover {
  color: var(--accent-hover);
}

code {
  font-size: 0.92em;
  background: var(--surface);
  padding: 0.12em 0.35em;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.controls {
  display: grid;
  gap: 0.75rem;
  margin: 1.5rem 0 1rem;
}

@media (min-width: 640px) {
  .controls {
    grid-template-columns: 1fr auto auto;
    align-items: end;
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.875rem;
}

.field span {
  color: var(--muted);
}

input[type='search'],
select {
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.5rem 0.65rem;
  min-width: 0;
}

input[type='search']:focus,
select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.count {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
  align-self: center;
}

@media (min-width: 640px) {
  .count {
    grid-column: 1 / -1;
  }
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.task-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.task-table th,
.task-table td {
  text-align: left;
  padding: 0.5rem 0.65rem;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

.task-table th {
  background: rgba(0, 0, 0, 0.25);
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

.task-table tbody tr:nth-child(even) {
  background: var(--row-alt);
}

.task-table tbody tr:last-child td {
  border-bottom: none;
}

.id-cell code {
  white-space: nowrap;
}

.title-cell {
  max-width: 28rem;
}

.title-short {
  display: block;
  cursor: pointer;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.title-short:hover {
  color: var(--accent-hover);
}

.title-short:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

.desc-block {
  margin-top: 0.5rem;
  max-height: 16rem;
  overflow: auto;
  padding: 0.5rem 0.65rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.75rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.desc-block.hidden {
  display: none;
}

.btn-copy {
  font: inherit;
  font-size: 0.75rem;
  cursor: pointer;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.35rem 0.55rem;
  white-space: nowrap;
}

.btn-copy:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-copy:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.btn-copy.copied {
  border-color: #5ecf8a;
  color: #5ecf8a;
}

.load-error {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: #3d1f24;
  border: 1px solid #8b3a44;
  border-radius: 6px;
  color: #f5c2c7;
}

.hidden {
  display: none !important;
}
