/* --- YOUR ORIGINAL CSS (RESTORED) --- */
:root {
  --forest: #2D4033;
  --parchment: #FDF9F3;
  --sand: #F4EDE1;
  --gold: #D4AF37;
  --slate: #333333;
  --clay: #D2C4B0;
  --white: #fff;
  --transition: all .3s cubic-bezier(.23, 1, .32, 1)
}

* { box-sizing: border-box }

body {
  background-color: var(--parchment);
  color: var(--slate);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.7;
  margin: 0;
  -webkit-font-smoothing: antialiased
}

h1, h2, h3, h4 {
  font-family: 'Georgia', serif;
  color: var(--forest);
  line-height: 1.3
}

a {
  color: inherit; /* This fixes the blue links */
  text-decoration: none;
  transition: var(--transition)
}

.full-width { width: 100%; display: block }
.flex-column { display: flex; flex-direction: column }
.flex-gap { display: flex; flex-direction: column; gap: 12px }
.no-bg { background: 0 0 !important; border: none !important; box-shadow: none !important }
.no-underline { text-decoration: none !important; color: inherit }

.wrapper {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  max-width: 1400px;
  padding: 0 15px;
  margin: 20px auto 10px auto;
  align-items: start
}

@media (min-width:1024px) {
  .wrapper {
    grid-template-columns: 280px 1fr 280px;
    margin: 40px auto;
    padding: 0 20px
  }
  .wrapper.single-col {
    grid-template-columns: 1fr;
    max-width: 900px;
    display: block
  }
}

.main-card {
  background: var(--white);
  padding: 25px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .03)
}

@media (min-width:768px) {
  .main-card { padding: 40px }
}

.sidebar-card {
  background: var(--white);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid var(--clay);
  margin-bottom: 20px
}

aside { align-self: start }

header {
  background-color: var(--forest);
  color: var(--sand);
  padding: 1rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .1)
}

.logo-container .logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: 'Georgia', serif;
  color: var(--sand)
}

.main-nav { display: flex; gap: 25px; align-items: center }

aside .nav-link, .sidebar-nav-item {
  display: block;
  padding: 2px 0;
  line-height: 1.4;
  font-size: .85rem;
  color: var(--forest) !important;
  transition: var(--transition)
}

aside .nav-link:hover, .sidebar-nav-item:hover {
  color: var(--gold) !important;
  transform: translateX(5px)
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-align: center
}

.btn-primary { background: var(--forest); color: #fff }
.btn-gold { background: var(--gold); color: var(--forest) }
.card-hover:hover { border-color: var(--gold); transform: translateY(-4px) }

.section-divider {
  margin-top: 0;
  border-bottom: 2px solid var(--sand);
  padding-bottom: 10px;
  margin-bottom: 15px;
  font-size: 1.1rem
}

.breadcrumb-nav {
  font-size: .75rem;
  color: var(--clay);
  margin-bottom: 12px;
  opacity: .8
}

.breadcrumb-nav a { color: inherit; font-weight: 400 }
.breadcrumb-nav .sep { margin: 0 4px }
.breadcrumb-nav .current { color: var(--slate); font-weight: 500 }

.label-container { margin-bottom: 20px }

.featured-label.badge {
  display: inline-block;
  background-color: #f1d38e;
  color: var(--forest);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: .65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  line-height: 1;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .05)
}

.hero-title {
  font-size: 2.5rem;
  margin-bottom: 5px;
  margin-top: 0
}

.hero-author {
  font-size: 1.2rem;
  font-family: 'Inter', sans-serif;
  color: var(--slate);
  margin-bottom: 30px;
  font-weight: 400
}

.modern-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px
}

.modern-table th {
  padding: 15px 10px;
  text-align: left;
  border-bottom: 2px solid var(--sand);
  color: var(--forest);
  text-transform: uppercase;
  font-size: .75rem;
  letter-spacing: 1px
}

.modern-table td {
  padding: 25px 10px;
  vertical-align: top;
  border-bottom: 1px solid var(--sand)
}

.year-col { font-weight: 700; color: var(--gold); width: 80px }
.title-col { font-family: 'Georgia', serif; font-size: 1.15rem; font-weight: 700 }

.author-name {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: .85rem;
  color: var(--slate);
  font-weight: 400;
  margin-top: 4px
}

.book-cover-gen {
  width: 100%;
  aspect-ratio: 2/3;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 15% 10%;
  color: #fff;
  border-radius: 4px;
  text-align: center;
  z-index: 1;
  box-shadow: inset 18px 0 15px -10px rgba(0, 0, 0, .7), 5px 5px 20px rgba(0, 0, 0, .4);
  transition: var(--transition)
}

.book-cover-gen::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(90deg, rgba(255, 255, 255, .05) 50%, transparent 50%), linear-gradient(rgba(255, 255, 255, .05) 50%, transparent 50%);
  background-size: 4px 4px
}

.book-cover-gen[style*="background-size: 3px 3px"] {
  box-shadow: inset 12px 0 10px -8px rgba(0, 0, 0, .15), 3px 3px 10px rgba(0, 0, 0, .1) !important;
  border: 1px solid rgba(0, 0, 0, .05)
}

.book-cover-gen[style*="background-size: 3px 3px"] .cover-title {
  padding: 0 15px;
  font-style: italic;
  color: var(--forest) !important
}

.cover-title {
  font-weight: 700;
  color: #f1d38e;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden
}

.cover-author {
  font-family: 'Inter', sans-serif;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  opacity: .9;
  margin-top: auto
}

.book-large { width: 240px }
.book-medium { width: 140px; margin: 0 auto }
.book-sidebar { width: 100%; max-width: 220px; margin: 0 auto }

.smaller-text { font-size: .75rem !important }
.large-text { font-size: 1.8rem !important }
.tiny-text { font-size: .5rem !important }

.featured-container {
  display: flex;
  flex-direction: column;
  gap: 40px;
  align-items: flex-start;
  margin-bottom: 60px
}

/* This was missing in the 'organized' version, fixing the big cover */
.featured-book-output {
  flex: 0 0 240px;
  width: 240px;
  perspective: 1000px
}

@media (min-width:768px) {
  .featured-container {
    flex-direction: row;
    align-items: center
  }
}

.context-box {
  margin-top: 50px;
  padding: 30px;
  background: var(--parchment);
  border-radius: 12px;
  border: 1px solid var(--clay);
  position: relative;
  overflow: hidden
}

.quote-mark {
  position: absolute;
  top: -20px;
  right: 10px;
  font-size: 8rem;
  color: rgba(212, 175, 55, .1);
  font-family: 'Georgia', serif;
  line-height: 1
}

/* This was missing, causing the checkbox to show */
.hidden-checkbox {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  appearance: none
}

.search-container {
  display: flex;
  align-items: center;
  position: relative
}

.search-form {
  width: 0;
  overflow: hidden;
  transition: width .4s cubic-bezier(.4, 0, .2, 1);
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap
}

#search-toggle:checked~.search-form {
  width: 240px;
  margin-left: 10px
}

.search-input {
  background: rgba(255, 255, 255, .1);
  border: 1px solid var(--gold);
  color: #fff;
  padding: 6px 12px;
  border-radius: 4px;
  width: 160px;
  font-size: .85rem
}

.search-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 25px
}

.search-result-item {
  justify-content: space-between;
  height: 100%
}

.result-title {
  margin: 10px 0;
  font-size: 1.1rem;
  line-height: 1.3
}

.author-subtext {
  font-size: .85rem;
  color: var(--slate);
  opacity: .8;
  margin-bottom: 10px
}

.award-tag {
  font-size: .65rem;
  color: var(--gold);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px
}

.winner-year {
  margin-top: auto;
  border-top: 1px solid var(--sand);
  padding-top: 12px;
  font-size: .8rem;
  font-weight: 700;
  color: var(--forest)
}

.empty-state {
  text-align: center;
  padding: 60px 0
}

.empty-text {
  font-size: 1.2rem;
  color: var(--clay);
  margin-bottom: 25px
}

.footer-card {
  background-color: var(--forest);
  color: var(--white);
  margin-top: 20px;
  padding: 30px 0 0 0
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  align-items: start
}

@media (min-width:768px) {
  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr 1fr
  }
}

.footer-heading-main {
  color: var(--white);
  margin-top: 0;
  font-size: 1.5rem
}

.footer-category {
  font-size: .75rem;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
  letter-spacing: 1px
}

.footer-description {
  font-size: .85rem;
  line-height: 1.5;
  margin-bottom: 15px;
  color: rgba(255, 255, 255, .9)
}

.footer-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: .85rem;
  line-height: 2.2
}

.footer-link {
  color: rgba(255, 255, 255, .8);
  transition: var(--transition)
}

.footer-link:hover { color: var(--gold) }

.footer-bottom {
  margin-top: 30px;
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, .1);
  text-align: center
}

.footer-copy {
  font-size: .75rem;
  opacity: .7;
  margin: 0;
  color: var(--white)
}

.footer-bottom-link {
  color: var(--white);
  text-decoration: underline;
  margin-left: 10px
}

.btn-small {
  font-size: .8rem;
  padding: 10px 20px
}

.curator-box .curator-title {
  color: var(--gold);
  margin-top: 0;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 1px
}

.curator-box .curator-text {
  font-style: italic;
  opacity: .9;
  font-size: .9rem;
  line-height: 1.5;
  margin-bottom: 10px;
  color: var(--forest)
}

.curator-box .curator-attribution {
  display: block;
  font-size: .75rem;
  font-weight: 700;
  color: var(--clay);
  text-align: right
}

/* --- NEW ADDITIONS FOR DECADE FILTER ONLY --- */

/* 1. Enables smooth scrolling when clicking anchor links */
html { scroll-behavior: smooth; }

/* 2. Styling for the new Sticky Decade Navigation */
.decade-nav {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 30px;
  padding: 15px;
  background: var(--sand);
  border-radius: 8px;
  position: sticky;
  top: 80px; /* Sits below the header */
  z-index: 10;
  border: 1px solid var(--clay);
}

.decade-label {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--forest);
  letter-spacing: 1px;
}

.decade-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.decade-link {
  font-size: 0.85rem;
  color: var(--forest);
  padding: 4px 10px;
  border-radius: 4px;
  background: var(--white);
  border: 1px solid var(--clay);
  transition: var(--transition);
}

.decade-link:hover {
  background: var(--forest);
  color: var(--sand);
  transform: translateY(-2px);
}

/* 3. Highlights the table row when jumped to */
tr:target {
  background-color: rgba(212, 175, 55, 0.1);
  transition: background 0.5s ease;
}