:root {
  --ink: #2f2638;
  --paper: #fffdf2;
  --cream: #fff5d2;
  --purple: #7957b8;
  --purple-dark: #51337f;
  --lavender: #d8c1ff;
  --red: #d94343;
  --green: #4b8a62;
  --yellow: #f4cb4f;
  --orange: #ec8b4c;
  --blue: #3d68ba;
  --shadow: 6px 7px 0 rgba(47, 38, 56, .14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background-color: #f2e9ff;
  background-image:
    radial-gradient(circle at 20% 15%, rgba(255,255,255,.8) 0 2px, transparent 3px),
    radial-gradient(circle at 80% 35%, rgba(121,87,184,.11) 0 1px, transparent 2px);
  background-size: 33px 33px, 21px 21px;
  font-family: Verdana, Geneva, sans-serif;
  line-height: 1.6;
}

img { display: block; max-width: 100%; }
a { color: var(--purple-dark); }
a:hover { text-decoration-thickness: 3px; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -5rem;
  z-index: 20;
  padding: .7rem 1rem;
  background: var(--ink);
  color: white;
}
.skip-link:focus { top: 1rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  max-width: 1180px;
  margin: 0 auto;
  padding: .9rem 1.25rem;
  background: rgba(255, 253, 242, .94);
  border: 3px solid var(--ink);
  border-top: 0;
  border-radius: 0 0 20px 20px;
  box-shadow: 3px 4px 0 rgba(47, 38, 56, .14);
}

.brand {
  display: flex;
  align-items: center;
  gap: .55rem;
  color: var(--ink);
  font-family: "Comic Sans MS", "Bradley Hand", cursive;
  font-size: 1.35rem;
  font-weight: 900;
  text-decoration: none;
}
.brand-mark { color: var(--red); font-size: 1.7rem; transform: rotate(-8deg); }
nav { display: flex; flex-wrap: wrap; gap: .35rem 1.1rem; }
nav a { color: var(--ink); font-size: .88rem; font-weight: 800; text-decoration: none; }
nav a:hover { color: var(--purple); transform: rotate(-1deg); }
.nav-current { color: var(--purple); text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 5px; }

main { width: min(1120px, calc(100% - 2rem)); margin: 2rem auto 5rem; }
section { margin: 2.4rem 0; scroll-margin-top: 6rem; }

.paper-panel {
  position: relative;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 28px 20px 31px 18px;
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  grid-template-columns: 1.18fr .82fr;
  gap: 2rem;
  align-items: center;
  padding: clamp(1.4rem, 4vw, 3.4rem);
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  width: 170px;
  height: 40px;
  right: -42px;
  bottom: 16px;
  background: repeating-linear-gradient(-8deg, transparent 0 6px, rgba(217,67,67,.8) 7px 10px);
  transform: rotate(-8deg);
}

.eyebrow {
  margin: 0 0 .35rem;
  color: var(--purple-dark);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
}

h1, h2, h3 {
  margin-top: 0;
  font-family: "Comic Sans MS", "Bradley Hand", cursive;
  line-height: 1.08;
}
h1 { margin-bottom: 1rem; font-size: clamp(2.5rem, 6vw, 5.4rem); letter-spacing: -.05em; }
h1 span { color: var(--purple); font-size: .66em; letter-spacing: -.03em; }
h2 { margin-bottom: .7rem; font-size: clamp(2rem, 4vw, 3.2rem); }
h3 { font-size: 1.35rem; }
.lede { max-width: 62ch; font-size: 1.04rem; }

.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.35rem 0; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: .65rem 1rem;
  border: 3px solid var(--ink);
  border-radius: 15px 12px 17px 10px;
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
  box-shadow: 3px 4px 0 var(--ink);
  transition: transform .12s ease, box-shadow .12s ease;
}
.button:hover { transform: translate(2px, 2px) rotate(-1deg); box-shadow: 1px 2px 0 var(--ink); }
.button.primary { background: var(--yellow); }
.button.secondary { background: var(--lavender); }
.button.disabled { cursor: not-allowed; opacity: .65; box-shadow: none; background: #ddd4df; }
.button.disabled:hover { transform: none; }

.scribble-note {
  max-width: 64ch;
  margin: 1.1rem 0 0;
  padding-left: 1rem;
  border-left: 5px solid var(--red);
  font-family: "Comic Sans MS", "Bradley Hand", cursive;
  font-size: .9rem;
}

.taped-image { margin: 1rem; transform: rotate(2deg); }
.taped-image::before {
  content: "";
  position: absolute;
  z-index: 2;
  width: 38%;
  height: 30px;
  top: -12px;
  left: 31%;
  background: rgba(255, 240, 170, .78);
  transform: rotate(-4deg);
}
.taped-image img { border: 3px solid var(--ink); border-radius: 16px 22px 15px 25px; }
.taped-image figcaption { margin-top: .55rem; text-align: center; font-family: "Comic Sans MS", cursive; font-weight: 800; }

.survey-ticker {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .6rem 1rem;
  align-items: center;
  padding: .85rem 1rem;
  background: var(--ink);
  color: white;
  border: 3px solid var(--ink);
  border-radius: 18px 13px 20px 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.ticker-label { display: flex; align-items: center; gap: .7rem; padding-right: .8rem; border-right: 2px dashed rgba(255,255,255,.45); }
.ticker-label > span { color: var(--yellow); font-size: 2rem; transform: rotate(-9deg); }
.ticker-label .eyebrow { margin: 0; color: #d8c1ff; font-size: .62rem; }
.ticker-label h2 { margin: 0; font-size: 1.25rem; white-space: nowrap; }
.ticker-window { min-width: 0; overflow: hidden; outline-offset: 4px; }
.ticker-track { display: flex; width: max-content; animation: ticker-scroll 34s linear infinite; }
.ticker-window:hover .ticker-track,
.ticker-window:focus .ticker-track,
.ticker-window:focus-within .ticker-track { animation-play-state: paused; }
.ticker-group { display: flex; flex: none; align-items: center; gap: .8rem; padding-right: .8rem; }
.ticker-item {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-width: 275px;
  padding: .48rem .7rem;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid white;
  border-radius: 13px 17px 12px 15px;
  box-shadow: 2px 2px 0 rgba(0,0,0,.35);
}
.ticker-fruit { flex: none; font-size: 1.7rem; }
.ticker-details { display: grid; min-width: 0; line-height: 1.25; }
.ticker-details strong { overflow: hidden; font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.ticker-details small { color: #695d70; font-size: .64rem; }
.ticker-amount { margin-left: auto; color: var(--green); font-size: .9rem; }
.ticker-hint { grid-column: 2; margin: 0; color: #d9d1df; font-size: .65rem; }
.ticker-empty { width: 100%; animation: none; }
@keyframes ticker-scroll { to { transform: translateX(-50%); } }

.section-heading { margin-bottom: 1.2rem; }
.section-heading > p:last-child { max-width: 70ch; }
.split-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.heading-critter { width: 150px; border: 3px solid var(--ink); border-radius: 50%; transform: rotate(4deg); }

.snapshot { padding: 1.5rem 0; }
.snapshot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.total-card, .payout-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 130px;
  padding: 1.1rem;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 18px 12px 20px 13px;
  box-shadow: 4px 5px 0 rgba(47,38,56,.16);
}
.total-card { background: var(--lavender); transform: rotate(-1deg); }
.total-card strong { font-size: 2.5rem; line-height: 1; }
.payout-card strong { color: var(--green); font-size: 1.55rem; }
.card-label, .payout-card span { font-size: .82rem; font-weight: 800; }
.plain-note { max-width: 78ch; margin: 1rem 0 0; font-size: .88rem; }

.diary-section, .reviews-section { padding: clamp(1.35rem, 4vw, 2.8rem); }
.diary-list { display: grid; gap: 1rem; }
.diary-entry { padding: 1.2rem; background: var(--cream); border: 3px dashed var(--purple); border-radius: 16px; }
.entry-top { display: flex; justify-content: space-between; gap: 1rem; align-items: start; }
.entry-total { color: var(--purple-dark); font-family: "Comic Sans MS", cursive; font-size: 1.8rem; font-weight: 900; white-space: nowrap; }
.entry-items { display: grid; gap: .45rem; margin: .9rem 0; padding: 0; list-style: none; }
.entry-items li { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 2px dotted rgba(47,38,56,.3); }
.entry-note { margin-bottom: 0; font-size: .92rem; }
.entry-badge { display: inline-block; margin-bottom: .45rem; padding: .15rem .55rem; border: 2px solid var(--ink); border-radius: 999px; background: white; font-size: .72rem; font-weight: 900; text-transform: uppercase; }

.fruit-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: .75rem; }
.fruit-grid div {
  display: grid;
  place-items: center;
  min-height: 128px;
  padding: .8rem;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 15px 22px 13px 19px;
  text-align: center;
}
.fruit-grid div:nth-child(even) { transform: rotate(1deg); }
.fruit-grid span { font-size: 2.2rem; }
.fruit-grid small { font-size: .72rem; }

.review-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.review-card { position: relative; display: flex; flex-direction: column; padding: 1.25rem; background: white; border: 3px solid var(--ink); border-radius: 16px 23px 14px 20px; }
.review-card:nth-child(2n) { transform: rotate(.45deg); }
.review-card h3 { margin-bottom: .25rem; }
.review-meta { display: flex; flex-wrap: wrap; gap: .45rem; margin: .5rem 0 .8rem; }
.tag { padding: .18rem .55rem; border: 2px solid var(--ink); border-radius: 999px; background: var(--cream); font-size: .72rem; font-weight: 800; }
.review-card .button { align-self: start; margin-top: auto; }
.referral-copy { margin-top: .8rem; font-size: .75rem; }

.critter-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.critter-card { margin: 0; padding: .65rem; border: 3px solid var(--ink); border-radius: 22px 15px 25px 12px; box-shadow: var(--shadow); }
.critter-card:nth-child(2) { transform: rotate(1deg); }
.critter-card img { aspect-ratio: 1; object-fit: cover; border: 2px solid var(--ink); border-radius: 16px; }
.critter-card figcaption { display: grid; padding: .75rem .4rem .35rem; }
.critter-card strong { font-family: "Comic Sans MS", cursive; font-size: 1.45rem; }
.critter-card span { font-size: .78rem; }
.critter-card.yellow { background: #ffe481; }
.critter-card.green { background: #a9ecc3; }
.critter-card.orange { background: #ffc095; }

.disclosure { display: grid; grid-template-columns: 180px 1fr; gap: 1.4rem; align-items: center; padding: 1.4rem; }
.disclosure img { border: 3px solid var(--ink); border-radius: 50%; transform: rotate(-4deg); }
.disclosure h2 { font-size: 2.1rem; }

footer {
  display: grid;
  justify-items: center;
  gap: .3rem;
  padding: 2rem 1rem 3rem;
  background: var(--ink);
  color: white;
  text-align: center;
  font-size: .82rem;
}
footer p { margin: 0; }
footer a { color: #ffe481; font-weight: 900; }

.blog-main { max-width: 1040px; }
.blog-hero {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  align-items: center;
  gap: 2rem;
  padding: clamp(1.4rem, 4vw, 3rem);
  overflow: hidden;
}
.blog-hero h1 { margin-bottom: 1rem; font-size: clamp(3rem, 7vw, 5.6rem); }
.blog-hero-art { width: min(390px, 100%); justify-self: end; }
.journal-intro {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .8rem 1.1rem;
  background: var(--yellow);
  border: 3px solid var(--ink);
  border-radius: 13px 21px 12px 18px;
  box-shadow: 4px 5px 0 rgba(47,38,56,.16);
  transform: rotate(-.35deg);
}
.journal-intro > span { flex: none; font-size: 2.3rem; transform: rotate(-12deg); }
.journal-intro p { margin: 0; font-size: .88rem; }
.blog-posts { margin-top: 3rem; }
.blog-post-list { display: grid; gap: 2rem; }
.blog-post {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 1.7rem;
  align-items: start;
  padding: 1.35rem;
}
.blog-post:nth-child(even) { grid-template-columns: minmax(0, 1fr) 230px; }
.blog-post:nth-child(even) .blog-post-art { order: 2; transform: rotate(1.5deg); }
.blog-post-art { margin: 0; transform: rotate(-1.5deg); }
.blog-post-art img { aspect-ratio: 1; object-fit: cover; border: 3px solid var(--ink); border-radius: 17px 24px 15px 22px; }
.blog-post-art figcaption { margin-top: .45rem; font-family: "Comic Sans MS", cursive; font-size: .74rem; font-weight: 800; text-align: center; }
.blog-date { display: inline-block; margin: 0 0 .55rem; padding: .18rem .6rem; background: var(--lavender); border: 2px solid var(--ink); border-radius: 999px; font-size: .72rem; font-weight: 900; }
.blog-post-copy h3 { margin-bottom: 1rem; color: var(--purple-dark); font-size: clamp(1.65rem, 4vw, 2.5rem); }
.blog-post-copy p:not(.blog-date) { max-width: 68ch; }
.blog-post-copy p:last-child { margin-bottom: 0; }
.blog-empty { padding: 2rem; background: var(--paper); border: 3px dashed var(--purple); border-radius: 18px; }

@media (max-width: 850px) {
  .hero { grid-template-columns: 1fr; }
  .hero-art { width: min(480px, 90%); justify-self: center; }
  .snapshot-grid { grid-template-columns: repeat(2, 1fr); }
  .fruit-grid { grid-template-columns: repeat(3, 1fr); }
  .blog-hero { grid-template-columns: 1fr; }
  .blog-hero-art { width: min(420px, 86%); justify-self: center; }
}

@media (max-width: 620px) {
  .site-header { position: static; align-items: flex-start; flex-direction: column; }
  nav { gap: .35rem .8rem; }
  main { width: min(100% - 1rem, 1120px); margin-top: 1rem; }
  .hero { padding: 1.25rem; }
  h1 { font-size: 2.65rem; }
  .snapshot-grid, .review-grid, .critter-grid { grid-template-columns: 1fr; }
  .fruit-grid { grid-template-columns: repeat(2, 1fr); }
  .split-heading { align-items: start; }
  .heading-critter { width: 92px; }
  .entry-top { display: block; }
  .disclosure { grid-template-columns: 90px 1fr; align-items: start; }
  .disclosure p { grid-column: 1 / -1; }
  .survey-ticker { grid-template-columns: 1fr; }
  .ticker-label { border-right: 0; border-bottom: 2px dashed rgba(255,255,255,.45); padding: 0 0 .55rem; }
  .ticker-hint { grid-column: 1; }
  .ticker-item { min-width: 245px; }
  .blog-post,
  .blog-post:nth-child(even) { grid-template-columns: 1fr; }
  .blog-post-art,
  .blog-post:nth-child(even) .blog-post-art { order: 0; width: min(290px, 88%); justify-self: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .ticker-window { overflow-x: auto; }
  .ticker-track { animation: none; }
  .ticker-group[aria-hidden="true"] { display: none; }
}
