:root {
  color-scheme: light;
  --bg: #f7f6f3;
  --paper: #fff;
  --ink: #252822;
  --muted: #747970;
  --border: #eaeaea;
  --green: #356345;
  --pastel: #edf3ec;
  --mono: "SFMono-Regular", Consolas, monospace;
  --sans:
    "SF Pro Display", "Helvetica Neue", "PingFang SC", "Microsoft YaHei",
    sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.65 var(--sans);
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select,
summary {
  touch-action: manipulation;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
a {
  color: inherit;
  text-underline-offset: 4px;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
button:active {
  transform: scale(0.99);
}
:focus-visible {
  outline: 3px solid #8ca88d;
  outline-offset: 4px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
button {
  color: inherit;
}
button,
input,
select {
  border-radius: 5px;
}
button {
  border: 0;
}
button[hidden],
[hidden] {
  display: none !important;
}
.topbar {
  max-width: 1320px;
  margin: auto;
  padding: 25px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  font-weight: 650;
  font-size: 19px;
  line-height: 1.35;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 43px;
  background: #242a22;
  color: #fff;
  font:
    31px Georgia,
    serif;
  border-radius: 3px;
}
.brand-sub {
  display: block;
  font: 9px/1.9 var(--mono);
  letter-spacing: 0.15em;
  color: var(--muted);
}
nav {
  display: flex;
  align-items: center;
  gap: 27px;
  font-size: 12px;
}
nav a {
  text-decoration: none;
}
.connection {
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 7px;
}
.connection:before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #abaeaa;
}
.connection.connected:before {
  background: #5e8b62;
}
.shell {
  max-width: 1224px;
  padding: 0 0 30px;
  margin: auto;
}
.hero {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 72px;
  padding: 62px 0 47px;
  align-items: center;
}
.eyebrow {
  font: 10px/1.6 var(--mono);
  letter-spacing: 0.15em;
  color: var(--muted);
}
h1 {
  font-size: 38px;
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.3;
  margin: 16px 0;
}
.serif-title {
  display: block;
  font:
    42px/1.25 Georgia,
    "Songti SC",
    serif;
  letter-spacing: -0.035em;
  margin-top: 7px;
  color: #53594d;
}
.intro {
  font-size: 14px;
  line-height: 1.9;
  color: var(--muted);
  margin-top: 20px;
}
.catalog-note {
  padding: 24px 0 21px 28px;
  border-left: 1px solid #d9ddd5;
  display: flex;
  flex-direction: column;
}
.catalog-note strong {
  font:
    54px/1.2 Georgia,
    serif;
  letter-spacing: -0.05em;
  margin: 10px 0 3px;
}
.catalog-note > span:not(.eyebrow) {
  color: var(--muted);
  font-size: 12px;
}
.note-line {
  display: flex;
  justify-content: space-between;
  font: 11px var(--mono);
  margin: 24px 0 15px;
  gap: 15px;
}
.note-line span:first-child {
  color: var(--muted);
}
.catalog-note a {
  font-size: 12px;
}
.search-section {
  background: var(--paper);
  padding: 27px 29px 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.field-label {
  font-size: 12px;
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
}
.search-row {
  display: flex;
  gap: 10px;
}
.search-box {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #d8dbd4;
  border-radius: 5px;
  padding-left: 16px;
  background: #fff;
}
.search-box:focus-within {
  border-color: #747f70;
}
.search-box svg {
  color: #7d8578;
  flex-shrink: 0;
}
.search-box input {
  border: 0;
  outline: 0;
  width: 100%;
  padding: 14px 12px 14px 0;
  background: none;
  font-size: 15px;
  min-width: 0;
}
.primary,
.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 12px 23px;
  text-decoration: none;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 550;
}
.primary {
  background: #252b23;
  color: white;
}
.primary:hover {
  background: #41483b;
}
.secondary {
  border: 1px solid #d8dbd4;
  background: #fff;
  gap: 8px;
}
.secondary:hover {
  background: #f1f2ee;
}
.search-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  gap: 10px;
}
.search-options > div {
  display: flex;
  align-items: center;
  gap: 8px;
}
.search-options label,
.search-options p {
  color: var(--muted);
  font-size: 11px;
}
.search-options select {
  background: #f8f9f6;
  padding: 5px 24px 5px 9px;
  border: 1px solid var(--border);
  font-size: 11px;
}
.search-options label:nth-of-type(2) {
  margin-left: 13px;
}
.examples {
  display: flex;
  align-items: center;
  gap: 17px;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
  padding-top: 17px;
  margin-top: 17px;
  font-size: 11px;
}
.examples > span {
  color: var(--muted);
}
.examples button {
  background: none;
  padding: 0;
  color: #586451;
  border-radius: 0;
  border-bottom: 1px solid transparent;
  font-size: 11px;
}
.examples button:hover {
  border-bottom-color: #586451;
}
.examples button span {
  margin-left: 5px;
  color: #99a291;
}
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 307px;
  gap: 34px;
  margin-top: 43px;
  align-items: start;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 21px;
}
h2 {
  font-size: 20px;
  letter-spacing: -0.025em;
  font-weight: 550;
}
.muted {
  color: var(--muted);
  font-size: 11px;
}
.section-heading .muted {
  font: 10px/1.5 var(--mono);
}
.status {
  padding: 12px 15px;
  background: #edf3ec;
  border: 1px solid #e1e9dd;
  border-radius: 5px;
  color: #44633b;
  font-size: 12px;
  margin-bottom: 20px;
}
.status.error {
  color: #9f2f2d;
  background: #fdebec;
  border-color: #f4dcdc;
}
.status.loading:before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 9px;
  border: 1.5px solid #b2c4ac;
  border-top-color: #526b47;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.book-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.book-card {
  text-align: left;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  min-height: 218px;
  animation: entry 0.35s ease both;
  transition:
    border-color 0.18s,
    transform 0.18s;
}
.book-card:hover {
  border-color: #b9c3b2;
  transform: translateY(-2px);
}
.book-card .book-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.book-id {
  font: 11px var(--mono);
  color: #85907c;
}
.book-arrow {
  font-size: 20px;
  color: #85907c;
}
.book-card h3 {
  font:
    21px/1.3 Georgia,
    "Songti SC",
    serif;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}
.book-author {
  font-size: 12px;
  color: var(--muted);
  margin: 9px 0 22px;
}
.book-bottom {
  display: flex;
  gap: 7px;
  margin-top: auto;
  align-items: center;
  flex-wrap: wrap;
}
.tag {
  font: 10px/1.4 var(--mono);
  background: var(--pastel);
  color: #546a48;
  border-radius: 3px;
  padding: 3px 6px;
}
.book-score {
  font: 9px var(--mono);
  color: #9a9e96;
  margin-left: auto;
}
.welcome {
  padding: 34px 28px 30px;
  border: 1px dashed #d6dbd1;
  border-radius: 8px;
}
.shelf {
  height: 54px;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  margin-bottom: 28px;
}
.shelf span {
  width: 22px;
  height: 49px;
  display: grid;
  place-items: center;
  background: #dedfce;
  color: #6f745b;
  border-radius: 2px;
  font:
    14px Georgia,
    serif;
}
.shelf span:nth-child(2) {
  height: 42px;
  background: #d3dfd2;
}
.shelf span:nth-child(3) {
  height: 54px;
  background: #e5ddcf;
  transform: rotate(-8deg);
  margin-right: 3px;
}
.shelf span:nth-child(4) {
  height: 45px;
  background: #d4dce1;
}
.shelf span:nth-child(5) {
  height: 51px;
  background: #e1d9d3;
}
.welcome h3 {
  font-weight: 500;
  font-size: 19px;
  margin-bottom: 10px;
}
.welcome p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.9;
}
.quick-books {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
}
.quick-books button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  gap: 20px;
  background: none;
  border-radius: 0;
  border-top: 1px solid var(--border);
  padding: 12px 0;
  font:
    13px Georgia,
    serif;
}
.quick-books button:hover {
  color: #41613a;
}
.quick-books span {
  color: #929a8c;
  font: 10px var(--mono);
  white-space: nowrap;
}
.sidebar {
  position: sticky;
  top: 24px;
}
.inspector {
  background: #272d25;
  color: #edf0e9;
  padding: 23px;
  border-radius: 8px;
}
.inspector-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  margin-bottom: 25px;
}
.inspector .eyebrow {
  color: #a9b8a2;
  font-size: 9px;
}
.http-status {
  font: 9px var(--mono);
  padding: 3px 5px;
  border: 1px solid #5f6a57;
  border-radius: 3px;
  color: #bbd4ac;
}
.inspector h2 {
  font-size: 18px;
  margin-bottom: 11px;
}
.inspector-description {
  font-size: 11px;
  color: #afb8a8;
  line-height: 1.8;
}
.request-link {
  font: 10px/1.8 var(--mono);
  color: #c9dabb;
  display: block;
  overflow-wrap: anywhere;
  margin-top: 20px;
  padding: 12px 0;
  border-top: 1px solid #444c3d;
  border-bottom: 1px solid #444c3d;
  text-decoration: none;
}
.request-metrics {
  display: flex;
  justify-content: space-between;
  margin: 17px 0;
  font-size: 10px;
  color: #a2ae99;
}
.request-metrics dd {
  font: 13px var(--mono);
  color: #e0e9d8;
  margin: 5px 0 0;
}
.inspector summary {
  display: flex;
  justify-content: space-between;
  cursor: pointer;
  font-size: 10px;
  color: #bbcbb1;
  border-top: 1px solid #444c3d;
  padding-top: 14px;
  list-style: none;
}
.inspector summary::-webkit-details-marker {
  display: none;
}
.inspector details[open] summary span {
  transform: rotate(45deg);
}
pre {
  max-height: 350px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 10px/1.7 var(--mono);
  color: #c4d2b9;
  padding-top: 10px;
}
.data-links {
  padding: 28px 1px;
}
.data-links h3 {
  font-size: 15px;
  font-weight: 500;
  margin: 10px 0;
}
.data-links > p:not(.eyebrow) {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
}
.data-links > a {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  text-decoration: none;
  font-size: 11px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.data-links > a:first-of-type {
  margin-top: 12px;
}
.data-links > a span {
  font: 9px/1.8 var(--mono);
  color: #85907c;
}
.data-links .quota-note {
  margin-top: 20px;
  font-size: 10px !important;
}
footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 15px;
  border-top: 1px solid var(--border);
  padding-top: 24px;
  margin-top: 70px;
  color: #8d9387;
  font-size: 10px;
}
.footer-notes {
  display: grid;
  gap: 6px;
}
.footer-notes span:first-child {
  font-family: var(--mono);
}
.brand-credit {
  color: var(--ink);
  font-size: 12px;
  white-space: nowrap;
}
.brand-credit a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 3px;
}
.brand-credit a:hover,
.brand-credit a:focus-visible {
  text-decoration-color: currentColor;
}
.brand-heart {
  font-family: sans-serif;
}
dialog {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0;
  width: min(860px, calc(100% - 48px));
  max-height: 88dvh;
  background: #fbfbfa;
  color: var(--ink);
}
dialog::backdrop {
  background: rgba(30, 34, 27, 0.55);
  backdrop-filter: blur(3px);
}
.dialog-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 30px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: #fbfbfa;
  z-index: 1;
}
.close-button {
  background: none;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 5px;
}
.close-button span {
  font-size: 25px;
  line-height: 1;
}
.dialog-content {
  padding: 30px;
}
.dialog-content > p {
  color: var(--muted);
  font-size: 13px;
}
.dialog-content h2 {
  font:
    36px/1.2 Georgia,
    "Songti SC",
    serif;
  margin: 12px 0;
  letter-spacing: -0.025em;
}
.detail-authors {
  font-size: 14px;
  color: var(--muted);
}
.tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 17px;
}
.detail-description {
  font-size: 13px;
  color: #636c5c;
  line-height: 1.85;
  margin: 22px 0;
  white-space: pre-wrap;
}
.format-section {
  margin-top: 30px;
}
.format-section .section-heading {
  margin-bottom: 6px;
}
.format-section h3 {
  font-size: 17px;
  font-weight: 550;
}
.formats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 19px;
}
.format-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  padding: 15px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 5px;
  min-width: 0;
  gap: 5px;
}
.format-link:hover {
  border-color: #aebca4;
}
.format-link strong {
  font-size: 13px;
  font-weight: 550;
  display: flex;
  justify-content: space-between;
}
.format-link small {
  font: 9px/1.6 var(--mono);
  color: var(--muted);
  overflow-wrap: anywhere;
}
.format-link .format-file {
  color: #617254;
}
.detail-metadata {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-top: 28px;
  padding: 17px 0;
  font-size: 12px;
}
.detail-metadata summary {
  cursor: pointer;
}
.detail-metadata dl {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 10px;
  margin-top: 20px;
}
.detail-metadata dt {
  color: var(--muted);
}
.detail-metadata dd {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.detail-actions {
  display: flex;
  align-items: center;
  gap: 23px;
  margin-top: 24px;
  font-size: 11px;
}
.skip {
  position: fixed;
  top: -80px;
  left: 20px;
  background: white;
  padding: 8px;
  z-index: 50;
}
.skip:focus {
  top: 5px;
}
.reveal {
  animation: entry 0.5s ease both;
}
.search-section.reveal {
  animation-delay: 0.07s;
}
@keyframes entry {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (max-width: 1320px) {
  .shell {
    margin: 0 48px;
  }
}
@media (max-width: 950px) {
  .shell {
    margin: 0 28px;
  }
  .topbar {
    padding: 22px 28px;
  }
  .hero {
    gap: 28px;
    grid-template-columns: 1fr 220px;
  }
  .workspace {
    grid-template-columns: minmax(0, 1fr) 270px;
    gap: 24px;
  }
  .book-grid {
    grid-template-columns: 1fr;
  }
  .hero h1 {
    font-size: 32px;
  }
  .serif-title {
    font-size: 34px;
  }
  .section-heading {
    flex-wrap: wrap;
  }
  .search-options {
    flex-wrap: wrap;
  }
  .catalog-note {
    padding-left: 20px;
  }
  .catalog-note strong {
    font-size: 46px;
  }
}
@media (max-width: 680px) {
  .shell {
    margin: 0 20px;
  }
  .topbar {
    padding: 18px 20px;
  }
  .brand {
    font-size: 17px;
  }
  .brand-mark {
    width: 32px;
    height: 36px;
    font-size: 26px;
  }
  nav {
    gap: 16px;
  }
  nav .connection {
    font-size: 0;
    gap: 0;
  }
  .hero {
    padding: 38px 0 29px;
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .hero h1 {
    font-size: 31px;
  }
  .serif-title {
    font-size: 31px;
  }
  .intro {
    font-size: 12px;
  }
  .catalog-note {
    padding: 14px 0 0;
    border-left: 0;
    border-top: 1px solid #d9ddd5;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: baseline;
    column-gap: 15px;
  }
  .catalog-note .eyebrow {
    grid-column: 1;
  }
  .catalog-note strong {
    grid-row: 1/3;
    grid-column: 2;
    font-size: 38px;
    margin: 0;
  }
  .catalog-note > span:not(.eyebrow) {
    font-size: 10px;
  }
  .catalog-note .note-line,
  .catalog-note > a {
    display: none;
  }
  .search-section {
    padding: 19px 16px 16px;
  }
  .search-row {
    flex-wrap: wrap;
    gap: 9px;
  }
  .search-box {
    flex-basis: 100%;
  }
  .search-box input {
    font-size: 13px;
  }
  .primary {
    padding: 10px 17px;
    flex: 1;
  }
  .secondary {
    padding: 10px 16px;
  }
  .search-options {
    gap: 10px;
  }
  .search-options p {
    font-size: 9px;
  }
  .search-options select {
    max-width: 100px;
  }
  .examples {
    gap: 12px;
    font-size: 10px;
  }
  .examples button {
    font-size: 10px;
  }
  .workspace {
    grid-template-columns: 1fr;
    margin-top: 29px;
    gap: 26px;
  }
  .section-heading {
    gap: 6px;
    margin-bottom: 17px;
  }
  .section-heading h2 {
    font-size: 19px;
  }
  .book-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .book-card {
    min-height: 200px;
    padding: 16px;
  }
  .book-card h3 {
    font-size: 18px;
  }
  .book-author {
    font-size: 10px;
  }
  .book-card .book-top {
    margin-bottom: 16px;
  }
  .book-score {
    display: none;
  }
  .welcome {
    padding: 26px 20px;
  }
  .quick-books button {
    font-size: 12px;
  }
  .sidebar {
    position: static;
  }
  .data-links {
    padding-bottom: 0;
  }
  footer {
    flex-direction: column;
    align-items: flex-start;
    margin-top: 35px;
    font-size: 9px;
    gap: 16px;
  }
  dialog {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    border: 0;
  }
  .dialog-top {
    padding: 16px 20px;
  }
  .dialog-content {
    padding: 24px 20px;
  }
  .dialog-content h2 {
    font-size: 30px;
  }
  .formats {
    grid-template-columns: 1fr;
  }
  .detail-actions {
    gap: 15px;
    flex-wrap: wrap;
  }
  .detail-description {
    font-size: 12px;
  }
  .detail-metadata dl {
    grid-template-columns: 65px 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

body.dialog-open {
  overflow: hidden;
}
@media (max-width: 680px) {
  dialog {
    max-width: none;
    margin: 0;
  }
}
