:root {
  --accent: #b8df43;
  --accent-dark: #58751d;
  --soft-green: #eef4e4;
  --warm-paper: #fbfaf6;
}

body {
  background: var(--warm-paper);
}

.site-header {
  border-top: 3px solid #20221f;
  position: sticky;
  top: 0;
  z-index: 50;
  transition: box-shadow .25s ease;
}

@media (min-width: 781px) {
  .site-header .header-tools,
  .site-header .desktop-nav,
  .site-header .wordmark img,
  .site-header .icon-button { transition: height .25s ease, width .25s ease, top .25s ease, transform .25s ease; }
  .site-header.is-compact { box-shadow: 0 8px 25px rgba(24, 30, 24, .08); }
  .site-header.is-compact .header-tools { height: 70px; justify-content: flex-start; }
  .site-header.is-compact .wordmark { position: absolute; left: 44px; z-index: 2; }
  .site-header.is-compact .wordmark img { width: 53px; }
  .site-header.is-compact .icon-button { z-index: 3; top: 20px; }
  .site-header.is-compact .desktop-nav {
    position: absolute;
    inset: 0 0 auto;
    height: 70px;
    border-top: 0;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(12px);
  }
  .site-header.is-compact .nav-inner { gap: clamp(42px, 5vw, 74px); }
  .site-header.is-compact .nav-inner > a,
  .site-header.is-compact .nav-group > a { padding-top: 22px; padding-bottom: 20px; }
  .site-header.is-compact .submenu { top: 69px; }
}

.desktop-nav {
  background: rgba(255, 255, 255, .78);
}

.nav-inner > a,
.nav-group > a {
  position: relative;
  transition: color .22s ease;
}

.nav-inner > a::after,
.nav-group > a::after {
  content: '';
  position: absolute;
  right: 4px;
  bottom: 15px;
  left: 4px;
  border-bottom: 2px solid var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}

.nav-inner > a:hover,
.nav-group > a:hover {
  color: var(--accent-dark);
}

.nav-inner > a:hover::after,
.nav-group > a:hover::after {
  transform: scaleX(1);
}

.home {
  position: relative;
  padding-top: 76px;
}

.home::before {
  content: '';
  position: absolute;
  z-index: -1;
  top: 45px;
  right: 0;
  width: min(28vw, 430px);
  height: 210px;
  background: var(--soft-green);
  border-radius: 120px 0 0 120px;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 18px;
}

.section-heading::after {
  content: '';
  width: 65px;
  border-top: 3px solid var(--accent);
}

.book-tile img {
  box-shadow: 0 0 0 1px #e7e7e2, 0 15px 28px transparent;
  transition: transform .3s cubic-bezier(.2,.75,.25,1), box-shadow .3s ease;
}

.book-tile h3 {
  transition: color .2s ease;
}

.book-tile:hover img {
  transform: translateY(-9px);
  box-shadow: 0 0 0 1px #ddd, 0 18px 30px #28331e22;
}

.book-tile:hover h3 {
  color: var(--accent-dark);
}

.author-banner {
  outline: 1px solid transparent;
  outline-offset: 0;
  transition: transform .3s ease, outline-color .3s ease, outline-offset .3s ease;
}

.author-banner:hover {
  transform: translateY(-9px);
  outline-color: var(--accent-dark);
  outline-offset: 6px;
}

.feature {
  position: relative;
  display: block;
  min-height: 0;
  margin-top: 96px;
  padding: clamp(38px, 5vw, 68px);
  background: #97c8ba;
  box-shadow: none;
}

.feature::before {
  content: none;
  position: absolute;
  z-index: 2;
  top: 18px;
  right: 22px;
  font: 10px monospace;
  letter-spacing: 1.5px;
  color: #264e43;
}

.feature > img,
.feature-copy > strong {
  display: none;
}

.feature-copy {
  padding: 0;
}

.feature-video {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  border: 10px solid #ffffff42;
  outline: 1px solid #517e70;
  box-shadow: 0 16px 30px #244d4030;
}

.board-sections {
  padding-top: 82px;
  padding-bottom: 82px;
}

.board-heading {
  position: relative;
}

.board-heading::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: -2px;
  width: 42px;
  border-bottom: 3px solid var(--accent);
}

.board-heading a {
  transition: color .2s ease, transform .2s ease;
}

.board-heading a:hover {
  color: var(--accent-dark);
  transform: translateX(4px);
}

.mini-row {
  position: relative;
  transition: padding-left .22s ease, background .22s ease;
}

.mini-row::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: var(--accent);
  transform: scaleY(0);
  transition: transform .22s ease;
}

.mini-row:hover {
  padding-left: 13px;
  background: #fff;
}

.mini-row:hover::before {
  transform: scaleY(1);
}

.attachment-mark {
  display: inline-block;
  margin-left: 10px;
  padding: 2px 6px;
  border: 1px solid #b9c994;
  color: var(--accent-dark);
  font-size: 9px;
  font-weight: 500;
  line-height: 1.4;
  vertical-align: 1px;
}

.attachment-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 10px;
  padding: 18px 20px;
  border: 1px solid #dfe2d8;
  border-left: 4px solid var(--accent);
  background: #fff;
}

.attachment-list {
  margin-top: 38px;
}

.attachment-list h3 {
  margin: 0 0 14px;
  font-size: 16px;
}

.attachment-list h3 small {
  color: #888;
  font-size: 11px;
  font-weight: 400;
}

.attachment-box strong,
.attachment-box small {
  display: block;
}

.attachment-box small {
  margin-top: 3px;
  color: #888;
}

.attachment-box a {
  flex: none;
  padding: 10px 17px;
  background: #222;
  color: #fff;
  text-decoration: none;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}

.attachment-box a:hover {
  background: var(--accent);
  color: #17200d;
  transform: translateY(-2px);
}

.search-submit,
.contact button,
.admin-submit {
  transition: background .2s ease, color .2s ease, transform .2s ease;
}

.search-submit:hover,
.contact button:hover,
.admin-submit:hover {
  background: var(--accent);
  color: #17200d;
  transform: translateY(-2px);
}

footer {
  border-top: 1px solid #d9d9d3;
}

.copyright a {
  transition: color .2s ease;
}

.copyright a:hover {
  color: var(--accent-dark);
}

.footer-admin-logout { display: block; margin: 10px 0 0 auto; padding: 6px 10px; border: 1px solid #bbb; background: transparent; color: #666; font-size: 11px; cursor: pointer; transition: border-color .2s, color .2s, background .2s; }
.footer-admin-logout:hover { border-color: #222; background: #222; color: #fff; }
.footer-admin-logout[hidden] { display: none; }

@media (max-width: 780px) {
  .site-header { border-top-width: 2px; }
  .home::before { top: 20px; width: 45vw; height: 150px; }
  .section-heading::after { width: 42px; }
  .home { padding-top: 42px; }
  .feature { margin-top: 62px; padding: 24px 18px; box-shadow: none; }
  .board-sections { padding-top: 62px; padding-bottom: 62px; }
  .attachment-box { align-items: flex-start; flex-direction: column; }
  .footer-admin-logout { margin-left: 0; }
}

/* Readability pass: keep the airy layout while bringing functional copy up a step. */
body {
  font-size: 15px;
}

.nav-inner > a,
.nav-group > a {
  font-size: 15px;
}

.submenu a {
  font-size: 14px;
}

.section-heading {
  font-size: 27px;
}

.book-tile h3 {
  font-size: 16px;
  line-height: 1.55;
}

.book-category,
.mini-row time {
  font-size: 13px;
}

.board-heading h2 {
  font-size: 24px;
}

.board-heading a {
  font-size: 12px;
}

.mini-row {
  font-size: 15px;
  line-height: 1.6;
}

.filters button {
  font-size: 15px;
}

.detail-body,
.contact {
  font-size: 15px;
}

/* Book detail: one cover, tidy columns, and a calmer editorial rhythm. */
.book-detail { max-width: 1120px; }
.detail-back {
  display: inline-block;
  margin-bottom: 20px;
  color: #6d716b;
  font-size: 13px;
  text-decoration: none;
  transition: color .2s, transform .2s;
}
.detail-back:hover { color: #315f49; transform: translateX(-3px); }
.book-detail .detail-head {
  grid-template-columns: minmax(280px, 390px) 1fr;
  gap: clamp(48px, 7vw, 90px);
  align-items: center;
  padding: clamp(35px, 5vw, 62px);
  background: #f0eee7;
}
.detail-cover {
  display: grid;
  place-items: center;
  min-height: 470px;
}
.book-detail .detail-cover img {
  width: auto;
  max-width: 100%;
  height: 470px;
  object-fit: contain;
  box-shadow: 10px 16px 28px rgba(27, 31, 25, .14);
}
.detail-summary h1 { margin: 12px 0 20px; font-size: clamp(32px, 4vw, 48px); letter-spacing: -1.8px; }
.detail-summary i { display: block; width: 54px; border-top: 3px solid #a7d83f; }
.detail-summary p { margin-top: 23px; color: #777; }
.book-detail .detail-body { margin-top: 55px; padding-top: 0; border-top: 0; }
.book-detail .detail-body > p:has(> img:only-child) { display: none; }
.book-detail .detail-body table { table-layout: fixed; border-top: 2px solid #222; }
.book-detail .detail-body td { padding: 24px 26px; line-height: 1.85; border-bottom-color: #ddd; }
.book-detail .detail-body td:first-child { width: 170px; background: #f3f2ed; }

footer {
  font-size: 12px;
}

@media (max-width: 780px) {
  body { font-size: 15px; }
  .section-heading { font-size: 23px; }
  .book-tile h3 { font-size: 15px; }
  .mobile-drawer > a { font-size: 16px; }
  .book-detail .detail-head { grid-template-columns: 1fr; gap: 30px; padding: 28px 22px; }
  .detail-cover { min-height: 0; }
  .book-detail .detail-cover img { height: min(430px, 112vw); }
  .book-detail .detail-body table { table-layout: auto; }
  .book-detail .detail-body td { display: block; width: 100%; padding: 18px; }
  .book-detail .detail-body td:first-child { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; }
}

.artist-group-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 22px 0;
  padding: 0;
  border: 0;
}

.artist-group-options legend {
  grid-column: 1 / -1;
  margin-bottom: 7px;
  font-weight: 600;
}

.artist-group-options label {
  position: relative;
  margin: 0;
  cursor: pointer;
}

.artist-group-options input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.artist-group-options span {
  display: flex;
  min-height: 50px;
  align-items: center;
  padding: 12px 15px;
  border: 1px solid #d5d5d0;
  background: #fff;
  transition: border-color .2s, background .2s, color .2s;
}

.artist-group-options input:checked + span {
  border-color: #222;
  background: #222;
  color: #fff;
}

.artist-group-options label:hover span {
  border-color: var(--accent-dark);
}

@media (max-width: 520px) {
  .artist-group-options { grid-template-columns: 1fr; }
}
