
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@500;600;700&display=swap');

:root {
  --ink: #35271f;
  --muted: #78675a;
  --paper: #fbf7f0;
  --cream: #f2e8d9;
  --line: #dfd0bd;
  --accent: #8b4b2e;
  --gold: #c39443;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: var(--paper);
  color: var(--ink);
  font-family: "DM Sans", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.7;
}

.site-header {
  padding: 64px 24px 38px;
  background-color: #eee0ce;
  background-image: linear-gradient(135deg, #f4e9d9, #e6d1b7);
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.19em;
}

h1,
h2,
.book-title {
  font-family: "Playfair Display", Georgia, serif;
}

h1 {
  margin: 0;
  font-size: clamp(2.7rem, 6vw, 4.4rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.15;
}

.intro {
  max-width: 610px;
  margin: 18px auto 28px;
  color: #665345;
  font-size: 1.02rem;
}

.collection-note {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
  max-width: 760px;
  margin: 0 auto;
  padding-top: 18px;
  border-top: 1px solid #d6c1a7;
  color: #6d5140;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

main {
  width: min(1200px, calc(100% - 40px));
  margin: 0 auto;
}

.inventory-section {
  padding: 54px 0 30px;
}

.section-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: 24px;
}

.section-heading .eyebrow {
  margin-bottom: 4px;
}

h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 600;
  line-height: 1.3;
}

.section-note {
  max-width: 300px;
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 0.86rem;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background-color: #fffdf9;
  box-shadow: 0 8px 24px rgb(75 48 29 / 6%);
}

table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  text-align: left;
}

thead {
  background-color: #49372b;
  color: #fff8ed;
}

th {
  padding: 17px 16px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

td {
  padding: 19px 16px;
  border-bottom: 1px solid rgb(110 79 55 / 12%);
  vertical-align: middle;
  font-size: 0.87rem;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  filter: brightness(0.975);
}

td:first-child {
  width: 43%;
  min-width: 330px;
}

.book-cell {
  padding-top: 21px;
  padding-bottom: 21px;
}

span {
  display: inline-block;
}

.book-title {
  display: inline-block;
  width: 100%;
  margin-bottom: 7px;
  color: #503222;
  font-size: 1.13rem;
  font-weight: 700;
  line-height: 1.4;
}

.series-label {
  display: inline-block;
  margin: 0 0 8px;
  padding: 2px 7px;
  border-radius: 4px;
  background-color: #eee0ce;
  color: #775035;
  font-size: 0.7rem;
  font-weight: 700;
}

.book-pitch {
  display: inline-block;
  width: 100%;
  margin-bottom: 12px;
  color: #6d5b4e;
  font-size: 0.82rem;
  line-height: 1.65;
}

.book-profile {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 7px;
}

.book-profile span {
  padding: 3px 7px;
  border: 1px solid #e7d9c7;
  border-radius: 4px;
  background-color: #f8f0e5;
  color: #66513f;
  font-size: 0.69rem;
  line-height: 1.5;
}

.table-caption {
  margin: 13px 2px 0;
  color: var(--muted);
  font-size: 0.78rem;
}

/* Row background gradients required by freeCodeCamp. */
tr[class="read"] {
  background-image: linear-gradient(90deg, #edf4ec, #fbfdf9);
}

tr[class="to-read"] {
  background-image: linear-gradient(90deg, #fbefdc, #fffaf2);
}

tr[class="in-progress"] {
  background-image: linear-gradient(90deg, #e8eff8, #f9fbff);
}

/* Status badges for books to read. */
tr[class="to-read"] span[class="status"] {
  border: 1px solid #bd8b3f;
  background-image: linear-gradient(135deg, #f7dfad, #fff0ce);
  color: #6c4816;
}

/* Status badges for completed books. */
tr[class="read"] span[class="status"] {
  border: 1px solid #719477;
  background-image: linear-gradient(135deg, #cfe4ce, #e7f2e4);
  color: #285438;
}

/* Status badges for the book currently being read. */
tr[class="in-progress"] span[class="status"] {
  border: 1px solid #7897c2;
  background-image: linear-gradient(135deg, #d2e1f5, #eaf1fc);
  color: #294f7c;
}

/* Shared status and rating dimensions. */
span[class="status"],
span[class^="rate"] {
  display: inline-block;
  height: 29px;
  width: auto;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 21px;
}

/* Individual rating dots. */
span[class^="rate"] > span {
  display: inline-block;
  border: 1px solid #b9a58e;
  border-radius: 50%;
  margin: 0 2px;
  height: 12px;
  width: 12px;
  background-color: #fffaf2;
  vertical-align: middle;
}

/* One-dot rating. */
span[class~="one"] > span:first-child {
  background-image: linear-gradient(135deg, #d8a54b, #f0ce78);
}

/* Two-dot rating. */
span[class~="two"] > span:nth-child(-n+2) {
  background-image: linear-gradient(135deg, #d8a54b, #f0ce78);
}

/* Three-dot rating. */
span[class~="three"] > span {
  background-image: linear-gradient(135deg, #d8a54b, #f0ce78);
}

/* Reflection section. */
.reflection {
  max-width: 850px;
  margin: 32px auto 64px;
  padding: 34px 38px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  background-color: #f4eadb;
}

.reflection .eyebrow {
  margin-bottom: 5px;
}

.reflection h2 {
  margin-bottom: 18px;
}

.reflection p:not(.eyebrow) {
  color: #5f4d40;
  font-size: 0.94rem;
}

.reflection p:last-child {
  margin-bottom: 0;
}

/* Footer. */
.site-footer {
  padding: 25px 20px;
  border-top: 1px solid var(--line);
  background-color: #eee2d2;
  color: #665345;
  text-align: center;
}

.site-footer p {
  margin: 4px 0;
  font-size: 0.82rem;
}

.site-footer .footer-mark {
  color: #8b6c53;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.13em;
}

/* Responsive layout for smaller screens. */
@media (max-width: 600px) {
  .site-header {
    padding: 46px 18px 30px;
  }

  main {
    width: calc(100% - 24px);
  }

  .inventory-section {
    padding-top: 36px;
  }

  .reflection {
    margin: 24px auto 40px;
    padding: 25px 20px;
  }

  .collection-note {
    gap: 8px;
    font-size: 0.62rem;
  }
}
