/* lib.njp.zip catalogue: black on white, system font */

:root {
  --ink: #000;
  --grey: #6b6b6b;
  --faint: #b0b0b0;
  --line: #e6e6e6;
  --hover: #f4f4f4;
  --gutter: 32px;
  color-scheme: light;
}
@media (max-width: 640px) {
  :root { --gutter: 16px; }
}

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

html {
  background: #fff;
}
body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: system-ui, -apple-system, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px var(--gutter) 64px;
}
@media (max-width: 640px) {
  main { padding-top: 28px; }
}

a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.filter {
  display: block;
  width: 100%;
  margin: 0 0 8px;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 16px; /* no zoom on iOS */
  -webkit-appearance: none;
  appearance: none;
}
.filter::placeholder {
  color: var(--faint);
}
.filter:focus {
  outline: none;
}

/* one book: title (+ subtitle) | authors; on phones the authors go under the title */
.book {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  column-gap: 24px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.book .title {
  min-width: 0;
  overflow-wrap: anywhere;
}
.book .title a {
  font-weight: 600;
}
.book .sub,
.book .ext {
  color: var(--grey);
}
.book .ext {
  font-size: 13px;
}
.book .by {
  min-width: 0;
  overflow-wrap: anywhere;
}
.book .by .ed,
.book .by.none {
  color: var(--grey);
}
.book.is-sel {
  background: var(--hover);
  box-shadow: -8px 0 0 var(--hover), 8px 0 0 var(--hover);
}

.empty {
  color: var(--grey);
  padding: 10px 0;
}

@media (max-width: 640px) {
  .book {
    grid-template-columns: minmax(0, 1fr);
    padding: 12px 0;
  }
  .book .by {
    margin-top: 2px;
    font-size: 15px;
  }
}

[hidden] { display: none !important; }
