/* Library page — browse all 500 */

.lib-toolbar {
  position: sticky;
  top: var(--nav-h);
  z-index: 10;
  margin-bottom: 16px;
}

.lib-toolbar-row {
  display: grid;
  grid-template-columns: 2fr 1.4fr 1.4fr 1fr 1fr 1fr 1fr auto;
  gap: 10px;
  align-items: end;
}
@media (max-width: 1100px) {
  .lib-toolbar-row { grid-template-columns: repeat(4, 1fr); }
  .lib-toolbar-row > :last-child { grid-column: span 4; justify-self: end; }
}
@media (max-width: 640px) {
  .lib-toolbar-row { grid-template-columns: repeat(2, 1fr); }
  .lib-toolbar-row > :last-child { grid-column: span 2; }
}

.lib-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.lib-field-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--faint);
  font-weight: 700;
}

.lib-toolbar-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  font-size: 13px;
}
.lib-toolbar-summary strong { color: var(--text); }

.lib-results { margin-top: 4px; }

.lib-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
}
.lib-table th, .lib-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  text-align: left;
}
.lib-table th {
  background: var(--bg-elev);
  color: var(--muted);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.lib-table tbody tr {
  cursor: pointer;
  transition: background 80ms;
}
.lib-table tbody tr:hover { background: var(--bg-hover); }
.lib-table tbody tr.is-watched td.col-pm,
.lib-table tbody tr.is-watched td.col-title {
  color: var(--good);
}
.lib-table tbody tr.is-watched td.col-status::before {
  content: "\u2713";
  color: var(--good);
  font-weight: 700;
}

.col-status { width: 32px; text-align: center; color: var(--faint); font-size: 16px; }
.col-pm { width: 64px; font-family: var(--font-mono); color: var(--accent); font-weight: 700; }
.col-title { font-weight: 600; }
.col-title small { display: block; color: var(--faint); font-weight: 500; font-size: 12px; margin-top: 2px; }
.col-lane, .col-pattern { color: var(--muted); white-space: nowrap; }
.col-tier, .col-role { width: 88px; }
.col-action { width: 56px; text-align: right; }
.col-action a { color: var(--muted); font-size: 18px; line-height: 1; padding: 4px 8px; border-radius: 4px; }
.col-action a:hover { background: var(--bg); color: var(--accent); text-decoration: none; }

@media (max-width: 880px) {
  .col-lane, .col-pattern, .col-role { display: none; }
}

.lib-no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
  background: var(--bg-card);
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-md);
}
.lib-no-results h3 { color: var(--text); margin: 0 0 8px; }
