/* Aunt Magwe: colors match the printables pack. Mobile first. No external fonts or scripts. */
:root {
  --teal: #1E4E52;
  --teal-dark: #163B3E;
  --mustard: #F2B544;
  --cream: #F8EEDE;
  --coral: #E8775A;
  --paper: #FFFDF8;
  --ink: #1F3335;
  --muted: #4A5F61;
  --line: #E6D4B5;
  --field: #5E7B7E;
  --error: #A13A1E;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 1.125rem;
  line-height: 1.55;
}

.wrap { max-width: 46rem; margin: 0 auto; padding: 0 16px; }

a { color: var(--teal); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--coral); }

:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute; left: -9999px; top: 8px;
  background: var(--teal); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 10;
}
.skip:focus { left: 16px; }

/* Header: like the printables' running head */
.top { border-bottom: 3px solid var(--teal); background: var(--cream); }
.top-row { display: flex; align-items: center; justify-content: space-between; min-height: 56px; }
.brand-face { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--mustard); vertical-align: middle; margin-right: 10px; }
.brand-name {
  font-size: .85rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--teal); text-decoration: none; font-weight: bold; padding: 8px 0;
}
.stars span { font-size: .95rem; margin-left: 4px; }
.stars span:nth-child(odd) { color: var(--mustard); }
.stars span:nth-child(2) { color: var(--coral); }

main.wrap { padding-top: 28px; padding-bottom: 48px; }
@media (min-width: 700px) { main.wrap { padding-top: 40px; } }

h1 {
  color: var(--teal);
  font-size: clamp(1.85rem, 7vw, 2.6rem);
  line-height: 1.12;
  margin: 0 0 14px;
}
h1::after {
  content: ""; display: block; width: 64px; height: 5px;
  background: var(--mustard); border-radius: 3px; margin-top: 14px;
}
h2 { color: var(--teal); font-size: 1.3rem; line-height: 1.25; margin: 28px 0 8px; }

.lead { font-size: 1.12rem; margin: 0; }

/* Hero: title, one line, and the printables page as a little paper sheet */
.hero {
  display: grid;
  grid-template-columns: 1fr 96px;
  grid-template-areas: "title title" "lead img";
  gap: 4px 16px;
  align-items: start;
  margin-bottom: 24px;
}
.hero h1 { grid-area: title; }
.hero .lead { grid-area: lead; align-self: center; }
.hero-img { grid-area: img; margin: 0; }
.hero-img img {
  display: block; width: 100%; height: auto;
  background: #fff; border-radius: 4px;
  box-shadow: 0 1px 2px rgba(30, 78, 82, .25), 0 8px 18px rgba(30, 78, 82, .18);
  transform: rotate(2.5deg);
}
@media (min-width: 700px) {
  .hero {
    grid-template-columns: 1fr 190px;
    grid-template-rows: auto 1fr;
    grid-template-areas: "title img" "lead img";
    gap: 0 40px;
    margin-bottom: 32px;
  }
  .hero .lead { align-self: start; }
}

/* Artwork from the book's illustrated cover (cover lettering cropped off) */
.art {
  margin: 0 0 24px; border-radius: 18px; overflow: hidden; background: var(--cream);
  box-shadow: 0 1px 2px rgba(30, 78, 82, .18), 0 12px 28px rgba(30, 78, 82, .12);
}
.art img { display: block; width: 100%; height: auto; }
.art-banner img { aspect-ratio: 992 / 692; max-height: 210px; object-fit: cover; object-position: 50% 38%; }
@media (min-width: 700px) {
  .art-banner { max-width: 500px; margin-left: auto; margin-right: auto; }
  .art-banner img { max-height: none; }
}
.art-home { margin-bottom: 28px; }
.lead-home { margin-bottom: 24px; }

/* Form card */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 16px 22px;
  box-shadow: 0 10px 28px rgba(30, 78, 82, .08);
}
@media (min-width: 560px) { .card { padding: 28px 28px 30px; } }
.card > :first-child { margin-top: 0; }

.field { margin: 0 0 18px; }
label, .label { display: block; font-weight: bold; color: var(--teal); margin-bottom: 6px; }
.opt { font-weight: normal; color: var(--muted); }
.hint { margin: -2px 0 8px; font-size: .95rem; color: var(--muted); }

input[type="email"], input[type="text"], select {
  display: block; width: 100%; min-height: 50px;
  padding: 10px 12px;
  font: inherit; font-size: 1.05rem; color: var(--ink);
  background: #fff;
  border: 2px solid var(--field);
  border-radius: 10px;
}
input[type="email"]:focus-visible, input[type="text"]:focus-visible, select:focus-visible {
  border-color: var(--teal);
  outline: 3px solid var(--teal);
  outline-offset: 2px;
  box-shadow: 0 0 0 7px rgba(242, 181, 68, .45);
}
input[name="code"] { text-transform: uppercase; letter-spacing: .08em; }
input[name="code"]::placeholder { text-transform: none; letter-spacing: 0; }
[aria-invalid="true"] { border-color: var(--error) !important; }
.field-error { color: var(--error); font-weight: bold; margin: 8px 0 0; font-size: 1rem; }
.field-error::before { content: "! "; }

.check {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--cream); border-radius: 10px; padding: 12px 14px; margin: 4px 0 20px;
}
.check input { width: 24px; height: 24px; margin: 2px 0 0; flex: none; accent-color: var(--teal); }
.check label { font-weight: normal; color: var(--ink); margin: 0; }

.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.btn {
  display: inline-block; width: 100%;
  min-height: 52px; padding: 14px 26px;
  font: inherit; font-size: 1.12rem; font-weight: bold; text-align: center; text-decoration: none;
  color: #fff; background: var(--teal);
  border: 0; border-radius: 999px; cursor: pointer;
  box-shadow: 0 4px 0 var(--mustard);
}
.btn:hover { background: var(--teal-dark); }
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--mustard); }
@media (min-width: 560px) { .btn { width: auto; } }

.small { font-size: .95rem; color: var(--muted); }
.form-foot { margin: 16px 0 0; }

.alert { border-radius: 10px; padding: 12px 16px; margin: 0 0 20px; border-left: 6px solid var(--coral); background: #FBE4DA; color: #4A1E10; }
.alert p { margin: 0; }
.alert-ok { border-left-color: var(--teal); background: #E3EFEE; color: var(--ink); }

/* Downloads */
.downloads { margin-top: 8px; }
.paper { margin: 0 0 14px; }
.dl-row { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 560px) { .dl-row { grid-template-columns: 1fr 1fr; } }
.btn-dl {
  display: flex; flex-direction: column; align-items: flex-start; text-align: left;
  border-radius: 16px; padding: 16px 20px 16px 72px; position: relative; width: 100%;
}
.btn-dl::before {
  content: "↓"; position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--mustard); color: var(--teal);
  font-size: 1.35rem; line-height: 40px; text-align: center; font-weight: bold;
}
.dl-main { font-size: 1.3rem; }
.dl-sub { font-size: .9rem; font-weight: normal; opacity: .92; }

.singles { margin: 18px 0 8px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 4px 16px; }
.singles summary { cursor: pointer; font-weight: bold; color: var(--teal); padding: 12px 0; min-height: 44px; }
.singles summary .dl-sub { color: var(--muted); opacity: 1; }
.singles ul { list-style: none; margin: 0 0 8px; padding: 0; }
.singles li {
  display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; justify-content: space-between;
  padding: 10px 0; border-top: 1px dashed var(--line);
}
.single-links { display: flex; gap: 8px; }
.single-links a {
  display: inline-block; padding: 7px 14px; min-height: 40px; line-height: 1.5;
  border: 2px solid var(--teal); border-radius: 999px; text-decoration: none; font-size: .95rem; font-weight: bold;
}
.single-links a:hover { background: var(--teal); color: #fff; }

.done-note { margin: 0 0 18px; }

/* Text pages */
.prose { max-width: 40rem; }
.prose ul { padding-left: 1.2em; }
.prose li { margin: 6px 0; }
.placeholder { background: #FCE9C0; color: var(--ink); padding: 1px 6px; border-radius: 4px; font-weight: bold; }
.updated { color: var(--muted); font-size: .95rem; }

/* Home */
.home-actions { display: grid; gap: 14px; margin: 8px 0 0; }
.home-actions p { margin: 0; }
.home-actions h2 { margin: 0; }

/* Footer: thin mustard rule, like the printables */
.foot { border-top: 2px solid var(--mustard); color: var(--muted); font-size: .95rem; }
.foot p { margin: 18px 0 28px; }
