:root {
  --green: #2a641f;
  --button: #45b36b;
  --button-hover: #3a9c5c;
  --card: #f6f5f4;
  --text: #0d0d0d;
  --muted: #404040;
  --line: #e4e2df;
  --star: #f2b01e;
  --error: #d93025;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Open Sans', Arial, sans-serif;
  color: var(--text);
  background: #fff;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; }
a { color: var(--green); }
.container { max-width: 900px; margin: 0 auto; padding: 0 16px; }
.section { padding-top: 32px; padding-bottom: 48px; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- Buttons & inputs ---------- */
.btn {
  display: inline-block;
  background: var(--button);
  color: #fff;
  border: 0;
  border-radius: 25px;
  padding: 11px 20px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s;
}
.btn:hover { background: var(--button-hover); }
.btn:disabled { opacity: .7; cursor: wait; }
.btn-outline {
  display: inline-block;
  background: #fff; color: var(--text);
  border: 1px solid #ccc; border-radius: 25px;
  padding: 10px 20px; font-size: 14px; text-decoration: none;
}
.btn-outline:hover { background: #f1f1f1; }
.input {
  width: 100%;
  height: 42px;
  border: 1px solid #ccc;
  border-radius: 25px;
  padding: 0 16px;
  font: inherit;
  font-size: 14px;
  outline: none;
  background: #fff;
  transition: border-color .15s;
}
.input:focus { border-color: var(--button); }
.input.invalid { border-color: var(--error); }
.textarea { height: auto; border-radius: 16px; padding: 12px 16px; resize: vertical; min-height: 120px; }
.hp { position: absolute; left: -9999px; }
.error { color: var(--error); font-size: 13px; margin: 0; }
.error:empty { display: none; }
.badge { display: inline-block; background: #e8f3e6; color: var(--green); font-size: 12px; font-weight: 600; border-radius: 12px; padding: 2px 10px; }

/* ---------- Stars & cards ---------- */
.stars { display: inline-flex; gap: 6px; vertical-align: middle; }
.stars svg { width: 18px; height: 18px; fill: var(--star); }
.stars svg.off { fill: #ddd; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.card {
  background: var(--card);
  border-radius: 10px;
  padding: 32px 33px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-size: 13px;
  color: var(--muted);
}
.card .stars { margin-bottom: 20px; }
.card blockquote { margin: 0 0 24px; }
.card blockquote p { margin: 0 0 8px; }
.card__name { font-weight: 600; color: var(--text); margin: 0 0 6px; }
.card__role { margin: 0; }

/* ---------- Site header / footer ---------- */
.site-header { border-bottom: 1px solid var(--line); }
.site-header__inner { display: flex; justify-content: space-between; align-items: center; height: 60px; gap: 16px; }
.site-logo { font-weight: 700; font-size: 18px; color: var(--text); text-decoration: none; }
.site-nav { display: flex; gap: 20px; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: 14px; }
.site-nav a:hover { color: var(--green); }
.site-footer { background: var(--green); color: #fff; padding: 20px 0; font-size: 13px; }
.site-footer p { margin: 0; }
.site-footer a { color: #fff; }

/* ---------- Home ---------- */
.home-hero { background: var(--card); padding: 56px 0; text-align: center; }
.home-hero h1 { font-size: 40px; margin: 0 0 8px; }
.home-hero__tagline { font-size: 18px; color: var(--muted); margin: 0; }
.section-title { font-size: 26px; font-weight: 600; margin: 0 0 20px; letter-spacing: -.5px; }
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 24px; }
.book-card { background: var(--card); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.book-card__cover { display: block; aspect-ratio: 4 / 5; background: #eee; text-decoration: none; }
.book-card__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.book-card__body { padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.book-card__body h3 { margin: 0; font-size: 18px; }
.book-card__body h3 a { color: var(--text); text-decoration: none; }
.book-card__body p { margin: 0; font-size: 14px; }
.book-card__actions { margin-top: auto; padding-top: 10px; }
.cover-placeholder {
  display: flex; align-items: center; justify-content: center; text-align: center;
  width: 100%; height: 100%; padding: 24px;
  background: linear-gradient(135deg, #45b36b, #2a641f);
  color: #fff; font-weight: 700; font-size: 22px; text-decoration: none;
}
.cover-placeholder--lg { aspect-ratio: 4 / 5; border-radius: 12px; font-size: 28px; }
.about { background: var(--card); padding: 48px 0; margin-top: 16px; }
.about__inner { display: flex; gap: 32px; align-items: flex-start; }
.about__photo { width: 200px; height: 200px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }

/* ---------- Book page ---------- */
.book-hero { display: grid; grid-template-columns: 300px 1fr; gap: 40px; align-items: start; }
.book-hero__cover img { width: 100%; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.12); display: block; }
.book-hero h1 { font-size: 34px; margin: 0 0 4px; line-height: 1.15; }
.book-hero__subtitle { font-size: 18px; color: var(--muted); margin: 0 0 10px; }
.prose { font-size: 15px; }
.small-title { font-size: 16px; margin: 24px 0 10px; }
.buy-links { display: flex; flex-wrap: wrap; gap: 10px; }
.extras { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin: 40px 0; }
.extra-card {
  display: flex; flex-direction: column; gap: 4px;
  background: var(--card); border-radius: 10px; padding: 18px 20px;
  text-decoration: none; color: var(--text); border: 1px solid transparent; transition: border-color .15s;
}
.extra-card:hover { border-color: var(--button); }
.extra-card span { font-size: 13px; color: var(--muted); }
.notfound { text-align: center; }

/* ---------- Landing pages (printables / review) ---------- */
.hero { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; padding-top: 16px; }
.landing h1 { font-size: 26px; line-height: 1.1; margin: 0 0 16px; font-weight: 600; }
.lead { font-size: 13px; margin: 0 0 8px; }
.hero__art img { width: 100%; max-width: 420px; display: block; margin: 0 auto; }
.landing form { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.landing form .btn { align-self: flex-start; margin-top: 4px; }
.success h2 { font-size: 20px; margin: 0 0 8px; }
.success p { font-size: 14px; margin: 0 0 16px; }
.join { font-size: 26px; font-weight: 600; color: #333; margin: 24px 0 16px; letter-spacing: -.5px; }
.cta { background: var(--green); color: #fff; text-align: center; padding: 10px 16px 40px; margin-top: 24px; }
.cta h2 { font-style: italic; font-weight: 700; font-size: 26px; margin: 0 0 22px; letter-spacing: -.5px; }
.landing main + .cta { margin-top: 24px; }

/* Review page */
.review-top { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; padding-top: 16px; }
.rating-summary { display: flex; align-items: center; gap: 8px; font-size: 14px; flex-wrap: wrap; }
.review-form-wrap { background: var(--card); border-radius: 12px; padding: 24px; }
.rating-input { border: 0; padding: 0; margin: 0; min-width: 0; }
.rating-input legend { font-size: 13px; color: var(--muted); padding: 0; margin-bottom: 4px; }
.rating-stars { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.rating-input input { position: absolute; opacity: 0; pointer-events: none; }
.rating-input label { cursor: pointer; }
.rating-input svg { width: 30px; height: 30px; fill: #ddd; transition: fill .1s; }
.rating-input label:hover svg,
.rating-input label:hover ~ label svg,
.rating-input input:checked ~ label svg { fill: var(--star); }
.rating-input input:focus-visible + label svg { outline: 2px solid var(--button); outline-offset: 2px; border-radius: 4px; }
.rating-input.invalid svg { fill: #f3c7c3; }

@media (max-width: 720px) {
  .hero, .review-top, .grid, .book-hero { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .hero__art { order: -1; }
  .book-hero__cover { max-width: 260px; }
  .landing h1, .join, .cta h2, .section-title { font-size: 22px; }
  .home-hero h1 { font-size: 30px; }
  .card { padding: 24px; }
  .about__inner { flex-direction: column; align-items: center; text-align: center; }
  .about__photo { width: 160px; height: 160px; }
}
