/* drdirt.earth/plant-rescue: a choose-the-cure storybook. Book-like pages, big type. */
* { box-sizing: border-box; }
html, body { margin: 0; }
html { background: #e3d7b6; }
body {
  font-family: Nunito, "Segoe UI", system-ui, sans-serif;
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.45;
  color: #2b2116;
  background: radial-gradient(ellipse at 30% 0%, #f6efd9 0%, #e9dfc2 60%, #d9cba4 100%) fixed;
  min-height: 100vh;
}
[hidden] { display: none !important; }
h1, h2 { font-family: Fredoka, Nunito, system-ui, sans-serif; line-height: 1.1; margin: 0; }
button { font: inherit; cursor: pointer; }

.view { max-width: 980px; margin: 0 auto; padding: 14px 16px 40px; }
.bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.pill-link {
  display: inline-flex; align-items: center; gap: .3em; padding: .45em 1em; border-radius: 999px; border: 0;
  background: #2f7d3b; color: #fff; font-weight: 800; text-decoration: none; font-size: .9em;
  box-shadow: 0 5px 14px rgba(29, 79, 42, .25);
}
.pill-link:hover { background: #1d4f2a; }
.draft { margin-left: auto; padding: .2em .8em; border-radius: 999px; background: #fff3cc; color: #7a5a00; font-weight: 800; font-size: .75em; border: 2px dashed #e0b84a; }

/* ---------- Home ---------- */
.home-head { display: grid; grid-template-columns: 220px 1fr; gap: 22px; align-items: center; }
.home-art { width: 100%; filter: drop-shadow(0 12px 22px rgba(59, 42, 28, .25)); }
.kicker { margin: 0; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #2f7d3b; font-size: .8em; }
.home h1 { font-size: clamp(38px, 5vw, 62px); color: #3b2a1c; margin: .1em 0 .25em; }
.how { margin: 0; font-size: 1.02em; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-top: 26px; }
.card {
  display: flex; flex-direction: column; gap: .4em; text-align: left; padding: 18px 18px 16px; border-radius: 22px;
  background: #fffaf0; border: 3px solid #eadfc9; box-shadow: 0 10px 24px rgba(59, 42, 28, .14); color: inherit;
  transition: transform .15s ease, border-color .15s ease;
}
.card:hover, .card:focus-visible { transform: translateY(-3px); border-color: #2f7d3b; }
.card .cover { font-size: 64px; line-height: 1; }
.card b { font-family: Fredoka, Nunito, sans-serif; font-size: 1.2em; line-height: 1.15; color: #3b2a1c; }
.card .tool { font-weight: 800; color: #2f7d3b; font-size: .8em; text-transform: uppercase; letter-spacing: .04em; }
.card .blurb { font-size: .92em; }
.card .best { margin-top: auto; font-weight: 800; color: #9a6b00; min-height: 1.4em; }

/* ---------- A book page ---------- */
.page {
  position: relative; background: #fffdf6; border-radius: 10px 22px 22px 10px; padding: 22px 30px 22px;
  min-height: min(78vh, 720px); display: flex; flex-direction: column;
  box-shadow: inset 14px 0 18px -14px rgba(90, 62, 30, .35), 0 16px 40px rgba(59, 42, 28, .22);
  border-left: 6px solid #d8c7a0;
}
.page.turn-out { animation: turnOut .22s ease-in forwards; }
.page.turn-in { animation: turnIn .32s ease-out; }
.page.turn-out-back { animation: turnOutBack .22s ease-in forwards; }
.page.turn-in-back { animation: turnInBack .32s ease-out; }
@keyframes turnOut { to { opacity: 0; transform: translateX(-36px) rotateY(8deg); } }
@keyframes turnIn { from { opacity: 0; transform: translateX(36px) rotateY(-8deg); } }
@keyframes turnOutBack { to { opacity: 0; transform: translateX(36px) rotateY(-8deg); } }
@keyframes turnInBack { from { opacity: 0; transform: translateX(-36px) rotateY(8deg); } }
.page-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.stamp { font-size: 1.8em; width: 1.7em; height: 1.7em; display: grid; place-items: center; border-radius: 50%; background: #f3ead2; border: 2px solid #e1d2ad; }
.book-title { margin: 0; font-weight: 800; color: #8a7350; font-size: .8em; text-transform: uppercase; letter-spacing: .05em; }
.scene { text-align: center; font-size: clamp(64px, 11vw, 120px); letter-spacing: .08em; margin: .25em 0 .3em; line-height: 1.15; }
.scene img { height: 1.6em; vertical-align: middle; }
.verse { font-family: Georgia, "Book Antiqua", "Times New Roman", serif; font-size: 1.3em; line-height: 1.65; max-width: 30em; margin: 0 auto; }
.verse p { margin: 0 0 1em; }
/* A line too long for a phone wraps with a hanging indent, like a poetry book. */
.verse .line { display: block; padding-left: 1.2em; text-indent: -1.2em; }
.ask { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 1.2em 0 .6em; }
.ask-face { width: 64px; height: 64px; border-radius: 50%; background: #fff3cc; border: 3px solid #ffc93c; }
.ask h2 { font-size: 1.5em; color: #1d4f2a; }

.choices { display: grid; gap: 14px; max-width: 40em; margin: 0 auto; }
.choice {
  display: flex; flex-direction: column; gap: .25em; text-align: left; padding: 14px 18px; border-radius: 18px;
  border: 3px solid #4aa8de; background: #e2f2fc; color: #17384d; font-weight: 700; line-height: 1.35;
  animation: glow 2.2s ease-in-out infinite;
}
.choice:nth-child(2) { animation-delay: -1.1s; }
.choice:hover, .choice:focus-visible { background: #cfe9fa; transform: scale(1.015); }
.choice.main { border-color: #2f7d3b; background: #e4f3d8; color: #1d4f2a; align-items: center; text-align: center; font-size: 1.05em; }
@keyframes glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(74, 168, 222, .0); } 50% { box-shadow: 0 0 0 7px rgba(74, 168, 222, .28); } }

/* Page turns: a lit arrow when there's more to read. */
.turns { margin-top: auto; padding-top: 18px; display: flex; align-items: center; justify-content: space-between; }
.turn { width: 68px; height: 68px; border-radius: 50%; border: 0; display: grid; place-items: center; padding: 0; }
.turn.back { background: transparent; color: #b3a07a; border: 2px solid #e1d2ad; width: 54px; height: 54px; }
.turn.next { margin-left: auto; background: #2f7d3b; color: #fff; box-shadow: 0 8px 18px rgba(29, 79, 42, .3); animation: nudge 1.8s ease-in-out infinite; }
.turn.next:hover { background: #1d4f2a; }
@keyframes nudge { 0%, 100% { transform: translateX(0) scale(1); } 50% { transform: translateX(6px) scale(1.12); } }
.the-end { font-family: Fredoka, sans-serif; font-weight: 700; font-size: 1.6em; color: #2f7d3b; margin: 0 auto; }

.trail { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; font-size: 1.3em; }
.trail span { width: 1.6em; height: 1.6em; display: grid; place-items: center; border-radius: 50%; background: #fffaf0; border: 2px solid #e1d2ad; }

/* ---------- Scorecard ---------- */
.scorecard h2 { font-size: clamp(32px, 4.5vw, 48px); color: #3b2a1c; margin: .15em 0; }
.stars { font-size: 2.2em; margin: 0; letter-spacing: .1em; }
.score-sum { font-weight: 700; margin: .3em 0; }
.score-path { font-size: 1.5em; margin: .2em 0 .6em; letter-spacing: .12em; }
.picks { list-style: none; padding: 0; margin: 0 0 1em; display: grid; gap: 12px; }
.picks li { padding: 12px 16px; border-radius: 16px; border-left: 8px solid; }
.picks li.right { background: #e4f3d8; border-color: #2f7d3b; }
.picks li.wrong { background: #fde6e7; border-color: #e4525c; }
.picks .what { font-weight: 800; display: block; margin-bottom: .25em; }
.lesson { font-weight: 800; color: #1d4f2a; background: #fff3cc; border-radius: 14px; padding: .6em .9em; }

@media (max-width: 640px) {
  .home-head { grid-template-columns: 1fr; text-align: center; }
  .home-art { max-width: 200px; margin: 0 auto; }
  .page { padding: 18px 16px 22px; }
  .verse { font-size: 1.05em; }
  .trail { margin-left: 0; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .page.turn-out, .page.turn-in, .page.turn-out-back, .page.turn-in-back, .choice, .turn.next { animation: none; }
}

/* Nature's twist: the right answer, but nature changed things. */
.twist-tag { display: inline-block; margin: 0 0 .6em; padding: .25em .9em; border-radius: 999px; background: #e6f0ff; color: #1f4f8a; font-family: 'Fredoka', sans-serif; font-weight: 700; border: 2px solid #9cc0f0; }
