:root {
  --ink: #19140d;
  --text: #40372d;
  --muted: #70665a;
  --line: #e6d8bf;
  --paper: #fffaf0;
  --soft: #fff2cf;
  --white: #ffffff;
  --gold: #d4941c;
  --gold-dark: #835504;
  --shadow: 0 22px 55px rgba(54, 38, 9, 0.16);
  color: var(--ink);
  background: #fffdf8;
  font-family: Charter, Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% 0%, rgba(212, 148, 28, 0.22), transparent 26rem),
    linear-gradient(180deg, #fff6dc 0%, #fffdf8 42%, #ffffff 100%);
}

a {
  color: inherit;
}

.skip-link {
  left: 1rem;
  position: absolute;
  top: -4rem;
  z-index: 50;
}

.skip-link:focus {
  background: var(--ink);
  color: var(--white);
  padding: 0.75rem 1rem;
  top: 1rem;
}

.site-header,
.site-footer,
main {
  margin: 0 auto;
  max-width: 1180px;
}

.site-header {
  align-items: center;
  border-bottom: 1px solid rgba(230, 216, 191, 0.85);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 1.05rem 1.25rem;
}

.brand {
  align-items: center;
  display: inline-flex;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-mark {
  align-items: center;
  background: linear-gradient(135deg, #ffe180, var(--gold) 58%, #72500b);
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(131, 85, 4, 0.2);
  color: #211600;
  display: inline-flex;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 1.05rem;
  font-weight: 900;
  height: 2.5rem;
  justify-content: center;
  width: 2.5rem;
}

.brand strong,
.brand small,
.site-nav a,
.button,
.eyebrow,
.meta,
.stat,
.site-footer,
.email-list,
.admin-table {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}

.brand strong {
  display: block;
  font-size: 1rem;
}

.brand small {
  color: var(--muted);
  display: block;
  font-size: 0.78rem;
  margin-top: 0.1rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  justify-content: flex-end;
}

.site-nav a {
  border-radius: 999px;
  color: #3d3429;
  font-size: 0.9rem;
  padding: 0.55rem 0.78rem;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: var(--soft);
  color: #211703;
}

main {
  padding: 0 1.25rem 4rem;
}

.hero {
  align-items: center;
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: minmax(0, 1.05fr) minmax(270px, 0.62fr);
  min-height: calc(100vh - 78px);
  padding: 4rem 0;
}

.page {
  padding: clamp(3rem, 6vw, 5rem) 0 2rem;
}

.band {
  border-top: 1px solid var(--line);
  padding: clamp(3rem, 6vw, 5rem) 0;
}

.eyebrow,
.meta {
  color: var(--gold-dark);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  margin: 0 0 1rem;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  color: var(--ink);
  line-height: 1.06;
  margin: 0;
}

h1 {
  font-size: clamp(2.65rem, 7vw, 5.8rem);
  max-width: 12ch;
}

.page h1 {
  font-size: clamp(2.45rem, 5vw, 4.7rem);
  max-width: 13ch;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  max-width: 15ch;
}

h3 {
  font-size: 1.25rem;
}

p {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.72;
}

.lede {
  color: var(--text);
  font-size: clamp(1.18rem, 2.2vw, 1.45rem);
  max-width: 40rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.button {
  align-items: center;
  border: 1px solid #bd7f0a;
  border-radius: 8px;
  display: inline-flex;
  font-weight: 850;
  justify-content: center;
  min-height: 2.95rem;
  padding: 0.8rem 1rem;
  text-decoration: none;
}

.button.primary {
  background: var(--gold);
  box-shadow: 0 12px 28px rgba(138, 86, 3, 0.18);
  color: #1d1403;
}

.button.secondary {
  background: rgba(255, 255, 255, 0.78);
  color: #2b2112;
}

.button.danger {
  background: #8b2416;
  border-color: #8b2416;
  color: #ffffff;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.54;
}

.button.small {
  font-size: 0.8rem;
  min-height: 2.2rem;
  padding: 0.5rem 0.65rem;
}

.cover-wrap {
  justify-self: center;
  max-width: 390px;
  width: min(100%, 390px);
}

.cover {
  aspect-ratio: 2 / 3;
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: block;
  height: auto;
  object-fit: cover;
  width: 100%;
}

.cover-note {
  color: #756b5d;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.86rem;
  margin-top: 0.9rem;
  text-align: center;
}

.section-head {
  align-items: end;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1fr);
  margin-bottom: 2rem;
}

.section-head p {
  margin: 0;
}

.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.35rem;
}

.card p {
  font-size: 0.98rem;
  margin-bottom: 0;
}

.book-card {
  align-items: center;
  display: grid;
  gap: 1.4rem;
  grid-template-columns: minmax(140px, 210px) minmax(0, 1fr);
}

.book-card img {
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(57, 40, 9, 0.14);
  width: 100%;
}

.list {
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.75;
  margin: 1rem 0 0;
  padding-left: 1.2rem;
}

.note {
  background: var(--paper);
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  color: var(--text);
  padding: 1rem 1.15rem;
}

.email-list {
  display: grid;
  gap: 0.8rem;
  margin-top: 1.4rem;
}

.email-list a {
  align-items: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 0.95rem 1rem;
  text-decoration: none;
}

.email-list span {
  color: var(--muted);
  font-size: 0.86rem;
}

.email-list strong {
  overflow-wrap: anywhere;
}

.comments-layout {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1fr);
}

.comment-form {
  display: grid;
  gap: 1rem;
}

.comment-form label {
  color: var(--text);
  display: grid;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.92rem;
  font-weight: 750;
  gap: 0.42rem;
}

.comment-form input,
.comment-form select,
.comment-form textarea {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  padding: 0.82rem 0.9rem;
  width: 100%;
}

.comment-form textarea {
  line-height: 1.55;
  resize: vertical;
}

.hidden-field {
  height: 0;
  left: -9999px;
  margin: 0;
  overflow: hidden;
  position: absolute;
  width: 0;
}

.notice {
  border-radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  margin: 0 0 1rem;
  padding: 0.95rem 1rem;
}

.notice.success {
  background: #edf8ee;
  border: 1px solid #badfbd;
  color: #28552c;
}

.notice.error {
  background: #fff0ed;
  border: 1px solid #efc3b8;
  color: #7b2b1c;
}

.comment-list {
  display: grid;
  gap: 1rem;
}

.reader-comment blockquote {
  color: var(--text);
  font-size: 1.08rem;
  line-height: 1.68;
  margin: 0.75rem 0 0;
}

.comment-type {
  color: var(--gold-dark);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.86rem;
  font-weight: 850;
  margin: 0;
}

.comment-type span {
  color: var(--muted);
  font-weight: 700;
}

.comment-author {
  color: var(--gold-dark);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.92rem;
  font-weight: 800;
  margin-bottom: 0;
  text-align: right;
}

.comment-author::before {
  content: "- ";
}

.author-reply {
  background: var(--paper);
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  margin-top: 1rem;
  padding: 1rem;
}

.author-reply p:last-child {
  margin-bottom: 0;
}

.stats {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 2rem 0;
}

.stat {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.1rem;
}

.stat strong {
  display: block;
  font-size: 2rem;
}

.stat span {
  color: var(--muted);
  font-size: 0.86rem;
}

.admin-table {
  border-collapse: collapse;
  font-size: 0.92rem;
  width: 100%;
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid var(--line);
  padding: 0.75rem;
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  color: var(--gold-dark);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.table-wrap {
  overflow-x: auto;
}

.inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.moderation-form {
  display: grid;
  gap: 0.6rem;
  min-width: 16rem;
}

.moderation-form label {
  color: var(--text);
  display: grid;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.84rem;
  font-weight: 750;
  gap: 0.35rem;
}

.moderation-form textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  line-height: 1.45;
  padding: 0.65rem;
  resize: vertical;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
  padding: 2rem 1.25rem;
}

.site-footer a {
  color: inherit;
  margin-right: 1rem;
}

.cookie-banner {
  align-items: center;
  background: rgba(25, 20, 13, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  bottom: 1rem;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
  color: #fff8e8;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  left: 1rem;
  max-width: 720px;
  padding: 1rem;
  position: fixed;
  right: 1rem;
  z-index: 60;
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-banner p {
  color: #fff8e8;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.92rem;
  line-height: 1.5;
  margin: 0;
}

.cookie-actions {
  align-items: center;
  display: flex;
  flex-shrink: 0;
  gap: 0.8rem;
}

.cookie-actions a {
  color: #fff8e8;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.88rem;
}

@media (max-width: 840px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .hero,
  .section-head,
  .book-card {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 3rem;
  }

  .grid,
  .stats,
  .comments-layout {
    grid-template-columns: 1fr;
  }

  .cover-wrap {
    justify-self: start;
    max-width: 320px;
  }

  h1 {
    max-width: 11ch;
  }

  .cookie-banner {
    align-items: stretch;
    flex-direction: column;
  }
}
