:root {
  color-scheme: light;
  --paperwhite-width: 1264px;
  --paperwhite-height: 1680px;
  --viewport-scale: 1;
  --ink: #000;
  --paper: #fff;
  --panel: #f5f5f5;
  --field: #faf9f9;
  --placeholder: #858181;
  --button: #4b4b4b;
  --search: #918d8d;
  --cover: #d9d9d9;
  --radius-sm: 8px;
  --radius-md: 15px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  color: var(--ink);
  font-family: "Intel One Mono", "SF Mono", "Roboto Mono", "Courier New", monospace;
  height: 100%;
  overflow: hidden;
  width: 100%;
}

body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  position: fixed;
  width: 100%;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.sr-only {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.app-shell {
  background: var(--paper);
  height: var(--paperwhite-height);
  left: 50%;
  min-height: var(--paperwhite-height);
  padding: 28px 50px 53px;
  position: fixed;
  top: 50%;
  transform: translate(-50%, -50%) scale(var(--viewport-scale));
  transform-origin: center center;
  width: var(--paperwhite-width);
}

.masthead {
  align-items: center;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px;
  min-height: 48px;
}

h1 {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
  margin: 0;
}

.signin-button {
  align-items: center;
  background: var(--ink);
  border: 0;
  border-radius: var(--radius-sm);
  color: #fff;
  display: inline-flex;
  font-size: 15px;
  font-weight: 700;
  height: 48px;
  justify-content: center;
  justify-self: end;
  padding: 0 16px;
  width: 160px;
}

.search-row {
  align-items: center;
  display: grid;
  gap: 56px;
  grid-template-columns: minmax(360px, 851px) 270px;
  margin-top: 43px;
}

.search-field {
  display: block;
  min-width: 0;
}

.search-field input {
  background: var(--field);
  border: 1px solid var(--ink);
  border-radius: 30px;
  color: var(--ink);
  font-size: 20px;
  height: 100px;
  outline: none;
  padding: 0 30px;
  min-width: 0;
  width: 100%;
}

.search-field input::placeholder {
  color: var(--placeholder);
  opacity: 1;
}

.search-button {
  background: var(--search);
  border: 0;
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 30px;
  font-weight: 700;
  height: 81px;
  justify-self: end;
  width: 270px;
}

.browse-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin: 31px 0 25px;
}

.browse-title {
  font-size: 25px;
  font-weight: 700;
  line-height: 1;
  margin: 0;
}

.source-link {
  color: var(--placeholder);
  font-size: 15px;
  font-weight: 700;
  text-decoration: underline;
}

.content-grid {
  align-items: start;
  display: grid;
  gap: 37px;
  grid-template-columns: 237px minmax(0, 1fr);
}

.category-list {
  background: var(--panel);
  border-radius: var(--radius-md);
  height: 810px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 15px 10px;
  width: 237px;
}

.category {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--placeholder);
  display: flex;
  gap: 4px;
  font-size: 11px;
  height: 22px;
  line-height: 16px;
  margin: 0;
  max-width: 100%;
  overflow: hidden;
  padding-bottom: 3px;
  padding-right: 8px;
  padding-top: 3px;
  text-align: left;
  white-space: nowrap;
  width: 100%;
}

.category.selected {
  background: var(--ink);
  border-radius: 5px;
  color: #fff;
}

.chevron {
  color: rgb(0 0 0 / 25%);
  display: inline-grid;
  font-family: Arial, sans-serif;
  font-size: 14px;
  height: 16px;
  line-height: 14px;
  flex: 0 0 16px;
  place-items: center;
  width: 16px;
}

.category-label {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.book-grid {
  display: grid;
  gap: 10px 25px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 828px;
  padding-bottom: 29px;
}

.book-cover {
  align-items: center;
  background: var(--cover);
  border-radius: var(--radius-md);
  display: flex;
  height: 239px;
  justify-content: center;
  overflow: hidden;
  width: 187px;
}

.book-cover img {
  display: block;
  height: 100%;
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  width: 100%;
}

.book-info {
  display: flex;
  flex-direction: column;
  height: 238px;
  overflow: hidden;
  padding: 22px 0 0 10px;
  width: 183px;
}

.book-title {
  display: -webkit-box;
  font-size: 15px;
  font-weight: 700;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
  line-height: 1.18;
  margin: 0 0 2px;
  max-height: 88px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.book-copy {
  display: -webkit-box;
  font-size: 15px;
  font-weight: 400;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.18;
  margin: 0;
  max-height: 36px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.book-meta {
  color: var(--placeholder);
  display: -webkit-box;
  font-size: 12px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.2;
  margin: 8px 0 0;
  max-height: 29px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.borrow-button {
  align-items: center;
  background: var(--button);
  border: 0;
  border-radius: var(--radius-sm);
  color: #fff;
  display: inline-flex;
  font-size: 15px;
  height: 44px;
  justify-content: center;
  margin-top: auto;
  min-width: 116px;
  padding: 0 20px;
  text-decoration: none;
  width: 116px;
}

.borrow-button[aria-pressed="true"] {
  background: var(--ink);
}

.results-status {
  color: var(--placeholder);
  font-size: 20px;
  grid-column: 1 / -1;
  margin: 28px 0 0;
}

.pagination {
  align-items: center;
  display: flex;
  font-size: 25px;
  gap: 16px;
  justify-content: center;
  line-height: 16px;
  margin-top: 41px;
}

.pagination button {
  background: transparent;
  border: 0;
  color: var(--ink);
  padding: 0;
  text-decoration: none;
}

.pagination [aria-current="page"] {
  text-decoration: underline;
  text-underline-position: from-font;
}

.pagination .muted {
  color: var(--placeholder);
}
