/* Letter pages */
.letter-page { display: flex; flex-direction: column; }

/* Hero (dark) */
.lp-hero { position: relative; padding-block: 64px 96px; background: var(--forest); color: #fff; overflow: hidden; }
.lp-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .07) 1.2px, transparent 1.2px);
  background-size: 22px 22px;
  pointer-events: none;
}
.lp-mark {
  position: absolute;
  right: -40px;
  bottom: -120px;
  font-family: var(--font-head);
  font-size: 560px;
  font-weight: 600;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 2px rgba(255, 255, 255, .06);
  pointer-events: none;
  user-select: none;
}
.lp-hero-inner { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 64px; align-items: center; }
.lp-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; }
.lp-hero .crumbs { background: rgba(255, 255, 255, .1); }
.lp-hero .crumbs a { background-image: linear-gradient(var(--sun), var(--sun)); }
.lp-copy h1 { font-size: clamp(30px, 3.8vw, 44px); }
.lp-copy h1 .hl { display: inline-grid; place-items: center; min-width: 1.3em; padding-inline: 8px; border-radius: 10px; background: var(--sun); color: #000; }
.lp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.lp-hero .link-arrow { background-image: linear-gradient(var(--sun), var(--sun)); }
.lp-facts { display: grid; grid-template-columns: repeat(3, auto); gap: 12px; }
.lp-fact {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px 12px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .12);
}
.lp-fact .hv-ico { color: #000; }
.lp-fact span:last-child { display: flex; flex-direction: column; line-height: 1.35; }
.lp-fact strong { font-family: var(--font-head); font-size: 20px; font-weight: 600; }

.lp-visual { position: relative; display: flex; justify-content: center; }
.lp-frame { position: relative; width: 100%; max-width: 460px; padding: 28px 0; }
.lp-img {
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  background: var(--forest-2);
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 30px 60px rgba(0, 0, 0, .3);
}
.lp-frame .hv-chip { color: #000; }
button.hv-chip { font: inherit; cursor: pointer; text-align: left; }
.hv-sound:hover { border-color: #000; }
.hv-sound.speaking .hv-ico { animation: pulse .8s var(--ease) infinite; }
@keyframes pulse { 50% { transform: scale(1.12); } }


/* Jump bar */
.jump { position: sticky; top: var(--header-h); z-index: 20; background: #fff; border-bottom: 1px solid var(--line); }
.jump-inner { display: flex; justify-content: center; align-items: center; gap: 8px; padding-block: 12px; overflow-x: auto; scrollbar-width: none; }
.jump-inner::-webkit-scrollbar { display: none; }
.jump a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--cream);
  font-weight: 700;
  white-space: nowrap;
  transition: background .3s var(--ease), color .3s var(--ease);
}
.jump a:hover { background: var(--sun); }
.jump a.active { background: var(--forest); color: #fff; }

/* Phonics */
.phonics { display: grid; grid-template-columns: 340px 1fr; gap: 20px; align-items: stretch; }
.ph-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 32px;
  border-radius: 10px;
  background: var(--sun);
  overflow: hidden;
}
.ph-tile::before {
  content: "";
  position: absolute;
  right: -50px;
  bottom: -50px;
  width: 200px;
  height: 200px;
  border-radius: 10px;
  border: 28px solid rgba(255, 255, 255, .35);
}
.ph-tile > * { position: relative; }
.ph-big {
  display: grid;
  place-items: center;
  width: 140px;
  height: 140px;
  border-radius: 10px;
  background: #fff;
  font-family: var(--font-head);
  font-size: 64px;
  font-weight: 600;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .08);
}
.ph-tile h3 { font-size: 22px; }
.ph-tile-txt { display: flex; flex-direction: column; gap: 8px; }
.say {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px 6px 6px;
  border-radius: 10px;
  background: #000;
  color: #fff;
  font-weight: 800;
  transition: background .3s var(--ease);
}
.say .say-ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--sun); color: #000; }
.say:hover { background: var(--forest); }
.say.speaking .say-ico { animation: pulse .8s var(--ease) infinite; }
.ph-rows { display: flex; flex-direction: column; gap: 12px; }
.ph-sounds { display: grid; grid-template-columns: 1fr; gap: 12px; }
.ph-sounds.two { grid-template-columns: 1fr 1fr; }
.ph-row { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 24px; border-radius: 10px; background: var(--cream); }
.ph-ipa {
  display: grid;
  place-items: center;
  min-width: 72px;
  height: 72px;
  padding-inline: 12px;
  border-radius: 10px;
  background: #fff;
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 600;
}
.ph-row h3 { font-size: 20px; }
.ph-row-txt { display: flex; flex-direction: column; gap: 4px; }
.ph-words { display: flex; flex-wrap: wrap; gap: 8px; }
.word {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #fff;
  font-weight: 700;
  transition: background .3s var(--ease);
}
.word b { font-weight: 800; box-shadow: inset 0 -6px 0 var(--sun); }
.word .ic { opacity: .4; transition: opacity .3s var(--ease); }
.word:hover { background: var(--sun); }
.word:hover b { box-shadow: inset 0 -6px 0 #fff; }
.word:hover .ic, .word.speaking .ic { opacity: 1; }
.ph-tip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tip { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 18px 20px; border-radius: 10px; border: 1px solid var(--line); }
.tip-ico { display: grid; place-items: center; flex-shrink: 0; width: 40px; height: 40px; border-radius: 10px; background: var(--forest); color: #fff; }
.tip div { display: flex; flex-direction: column; gap: 2px; }

/* Animals (dark band) */
.an-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font-weight: 800;
  transition: background .3s var(--ease), color .3s var(--ease);
}
.chip-btn:hover { background: rgba(255, 255, 255, .16); }
.chip-btn.active { background: var(--sun); color: #000; }
.chip-btn small { font-size: 16px; font-weight: 600; }
.an-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.an-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .12);
  color: #fff;
  overflow: hidden;
  animation: fade-up .45s var(--ease);
}
.an-card.is-hidden { display: none; }
.an-num {
  position: absolute;
  right: 18px;
  top: 10px;
  font-family: var(--font-head);
  font-size: 48px;
  font-weight: 600;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255, 255, 255, .15);
  pointer-events: none;
}
.an-top { position: relative; display: flex; align-items: center; gap: 10px; }
.an-ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; background: var(--sun); color: #000; }
.an-tag { font-weight: 800; }
.an-name { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.an-card h3 { font-size: 22px; }
.an-card h3 b { font-weight: 600; box-shadow: inset 0 -8px 0 rgba(255, 200, 61, .55); }
.an-say { display: grid; place-items: center; flex-shrink: 0; width: 36px; height: 36px; border-radius: 10px; background: rgba(255, 255, 255, .1); color: #fff; transition: background .3s var(--ease), color .3s var(--ease); }
.an-say:hover, .an-say.speaking { background: var(--sun); color: #000; }
.an-card p { flex: 1; }
.an-home { display: inline-flex; align-items: center; gap: 8px; padding-top: 12px; border-top: 1px dashed rgba(255, 255, 255, .2); font-weight: 700; }

/* Quiz (cream band) */
.quiz-board { display: grid; grid-template-columns: 300px 1fr; border-radius: 10px; background: #fff; overflow: hidden; box-shadow: 0 24px 50px rgba(14, 59, 44, .08); }
.quiz-side {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  padding: 32px;
  background: var(--forest);
  color: #fff;
  overflow: hidden;
}
.quiz-side::before {
  content: "?";
  position: absolute;
  right: -10px;
  bottom: -60px;
  font-family: var(--font-head);
  font-size: 240px;
  font-weight: 600;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 2px rgba(255, 255, 255, .08);
}
.quiz-side > * { position: relative; }
.quiz-count { font-weight: 800; }
.quiz-steps { display: flex; flex-direction: column; gap: 8px; }
.quiz-steps span {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .06);
  font-weight: 700;
  transition: background .3s var(--ease), color .3s var(--ease);
}
.quiz-steps em { font-style: normal; }
.quiz-steps span i { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 10px; background: rgba(255, 255, 255, .1); font-style: normal; font-family: var(--font-head); }
.quiz-steps span.now { background: var(--sun); color: #000; }
.quiz-steps span.now i { background: #fff; }
.quiz-steps span.done i { background: var(--sun); color: #000; }
.quiz-score { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.quiz-score .hv-ico { color: #000; }
.quiz-main { display: flex; flex-direction: column; gap: 28px; padding: 40px; }
.quiz-q { font-family: var(--font-head); font-size: clamp(22px, 2.4vw, 30px); font-weight: 600; line-height: 1.25; }
.quiz-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.q-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px 12px;
  border-radius: 10px;
  background: var(--cream);
  border: 2px solid transparent;
  font-weight: 800;
  text-align: center;
  transition: background .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease), transform .3s var(--ease);
}
.q-opt:hover { border-color: #000; transform: translateY(-3px); }
.q-letter {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 10px;
  background: #fff;
  font-family: var(--font-head);
  font-size: 32px;
  font-weight: 600;
}
.q-opt.right { background: var(--forest); color: #fff; border-color: var(--forest); }
.q-opt.right .q-letter { background: var(--sun); color: #000; }
.q-opt.wrong { animation: shake .4s var(--ease); border-color: #000; }
.quiz-opts.locked .q-opt { pointer-events: none; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.quiz-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 16px; min-height: 70px; padding-top: 20px; border-top: 1px dashed var(--line); }
.quiz-msg { font-weight: 800; }
.quiz-next {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px 6px 6px;
  border-radius: 10px;
  background: #000;
  color: #fff;
  font-weight: 800;
  white-space: nowrap;
  display: none;
  transition: background .3s var(--ease);
}
.quiz-next.show { display: inline-flex; animation: fade-up .35s var(--ease); }
.quiz-next span:first-child { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--sun); color: #000; }
.quiz-next:hover { background: var(--forest); }

/* Printable (white band) */
.dl-box { display: grid; grid-template-columns: 1fr 1.1fr; border-radius: 10px; background: var(--cream); overflow: hidden; }
.dl-stage {
  position: relative;
  display: grid;
  place-items: center;
  padding: 72px 32px 48px;
  background: var(--sun);
  overflow: hidden;
}
.dl-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(0, 0, 0, .08) 1.2px, transparent 1.2px);
  background-size: 22px 22px;
}
.sheet {
  position: relative;
  width: 100%;
  max-width: 340px;
  aspect-ratio: 612 / 792;
  padding: 16px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 30px 60px rgba(0, 0, 0, .18);
  transform: rotate(-3deg);
  transition: transform .5s var(--ease);
}
.dl-stage:hover .sheet { transform: rotate(0deg) scale(1.02); }
.sheet svg { width: 100%; height: 100%; }
.dl-badge {
  position: absolute;
  top: 24px;
  left: 24px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 10px;
  background: #000;
  color: #fff;
  font-weight: 800;
}
.dl-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; padding: 48px; }
.dl-copy h2 { font-size: clamp(26px, 3vw, 36px); }
.dl-steps { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.dl-step { display: flex; align-items: center; gap: 16px; padding: 14px 16px; border-radius: 10px; background: #fff; }
.dl-step-n { display: grid; place-items: center; flex-shrink: 0; width: 40px; height: 40px; border-radius: 10px; background: var(--forest); color: #fff; font-family: var(--font-head); font-weight: 600; }
.dl-step div { display: flex; flex-direction: column; }
.dl-inside { display: flex; flex-wrap: wrap; gap: 8px; }
.dl-inside span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-weight: 700; }
.dl-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.dl-size { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }

/* FAQ two columns */
.lp-faq { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; align-items: start; }

/* Letter nav */
.l-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.l-nav a {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 24px;
  border-radius: 10px;
  background: var(--cream);
}
.l-nav a:last-child { flex-direction: row-reverse; text-align: right; }
.l-nav-letter {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 10px;
  background: #fff;
  font-family: var(--font-head);
  font-size: 30px;
  font-weight: 600;
  transition: background .3s var(--ease);
}
.l-nav a:hover .l-nav-letter { background: var(--sun); }
.l-nav-txt { display: flex; flex-direction: column; flex: 1; }
.l-nav-txt strong { font-family: var(--font-head); font-size: 20px; font-weight: 600; }
.l-go {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #000;
  color: #fff;
  transition: background .35s var(--ease), color .35s var(--ease), transform .4s var(--ease);
}
.l-nav a:first-child:hover .l-go { transform: translateX(-3px); background: var(--sun); color: #000; }
.l-nav a:last-child:hover .l-go { transform: translateX(3px); background: var(--sun); color: #000; }
.l-strip { display: grid; grid-template-columns: repeat(26, minmax(0, 1fr)); gap: 6px; }
.l-strip a {
  display: grid;
  place-items: center;
  height: 42px;
  border-radius: 10px;
  background: var(--cream);
  font-family: var(--font-head);
  font-weight: 600;
  transition: background .3s var(--ease), transform .3s var(--ease);
}
.l-strip a:hover { background: var(--sun); transform: translateY(-2px); }
.l-strip a[aria-current="page"] { background: var(--forest); color: #fff; }

@media (max-width: 1280px) {
  .an-grid { grid-template-columns: repeat(3, 1fr); }
  .phonics { grid-template-columns: 1fr; }
  .l-strip { grid-template-columns: repeat(13, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  .lp-hero { padding-block: 48px 72px; }
  .lp-hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .an-grid { grid-template-columns: 1fr 1fr; }
  .lp-faq { grid-template-columns: 1fr; }
  .lp-mark { font-size: 380px; }
  .quiz-board, .dl-box { grid-template-columns: 1fr; }
  .quiz-steps { flex-direction: row; flex-wrap: wrap; }
  .ph-tip { grid-template-columns: 1fr 1fr 1fr; }
}
@media (max-width: 640px) {
  .lp-hero { padding-block: 32px 56px; }
  .lp-facts { grid-template-columns: 1fr 1fr; }
  .an-grid, .l-nav { grid-template-columns: 1fr; }
  .ph-tile { flex-direction: column; align-items: flex-start; padding: 24px; }
  .ph-big { width: 100px; height: 100px; font-size: 48px; }
  .ph-sounds.two { grid-template-columns: 1fr; }
  .ph-row { padding: 20px; }
  .jump-inner { justify-content: flex-start; }
  .quiz-side, .quiz-main, .dl-copy { padding: 24px; }
  .quiz-opts { grid-template-columns: 1fr; }
  .q-opt { flex-direction: row; justify-content: flex-start; padding: 12px; }
  .q-letter { width: 48px; height: 48px; font-size: 24px; }
  .dl-stage { padding: 64px 24px 32px; }
  .l-strip { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .l-nav a { padding: 18px; }
  .lp-mark { font-size: 260px; bottom: -60px; }
  .lp-facts { grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; }
  .lp-fact { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; }
  .lp-frame { padding: 24px 0; }
  .hv-chip { padding: 8px 10px; gap: 8px; }
  .hv-chip .hv-ico { width: 32px; height: 32px; }
  .hv-chip > span:not(.hv-ico) > span { display: none; }
  .hv-sound { left: 0; }
  .hv-dl { right: 0; }
  .jump-inner { padding-block: 10px; }
  .jump a { padding: 7px 12px; }
  .ph-tile { flex-direction: column; align-items: flex-start; gap: 16px; }
  .ph-big { width: 88px; height: 88px; font-size: 40px; }
  .ph-tip { grid-template-columns: 1fr; }
  .tip { padding: 16px; }
  .an-tools { flex-wrap: nowrap; overflow-x: auto; width: 100%; scrollbar-width: none; }
  .an-tools::-webkit-scrollbar { display: none; }
  .chip-btn { white-space: nowrap; }
  .quiz-side { gap: 16px; }
  .quiz-side::before { font-size: 160px; bottom: -40px; }
  .quiz-steps { flex-direction: row; flex-wrap: nowrap; gap: 6px; }
  .quiz-steps span { padding: 6px; }
  .quiz-steps em { display: none; }
  .dl-steps .dl-step { padding: 12px; }
  /* Phonics mobile */
  #sound .sec { gap: 28px; }
  .phonics { gap: 12px; }
  .ph-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 22px; }
  .ph-tile::before { width: 140px; height: 140px; right: -40px; bottom: -40px; border-width: 20px; }
  .ph-tile .ph-tile-txt { gap: 4px; }
  .ph-tile .ph-tile-txt h3 { font-size: 20px; }
  .ph-big { width: 88px; height: 88px; font-size: 40px; }
  .ph-row { gap: 12px; padding: 20px; }
  .ph-ipa { min-width: 56px; height: 56px; font-size: 22px; padding-inline: 8px; }
  .ph-row-txt { gap: 2px; }
  .ph-row-txt h3 { font-size: 18px; }
  .ph-words { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; width: 100%; }
  .word { justify-content: space-between; padding: 10px 12px; }
  .ph-tip { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 2px; }
  .ph-tip::-webkit-scrollbar { display: none; }
  .tip { flex: 0 0 78%; scroll-snap-align: start; padding: 16px; background: #fff; }
}

/* Long words never spill out of their box */
.word { min-width: 0; }
.word span { min-width: 0; overflow-wrap: anywhere; hyphens: auto; }
.an-name h3, .q-opt span:last-child, .dl-step div { min-width: 0; overflow-wrap: anywhere; }

.an-quick { display: flex; flex-direction: column; gap: 8px; padding: 20px; border-radius: 10px; border: 1px dashed rgba(255, 255, 255, .25); }
.an-src { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.an-src a { font-weight: 800; box-shadow: inset 0 -2px 0 var(--sun); }

/* Animal fact pages: linked names in cards */
.an-card h3 a { color: inherit; }
.an-card h3 a:hover { color: var(--sun); }
.an-card .an-more { align-self: flex-start; color: var(--sun); }

/* Word (N letter) pages: short sticky tile */
.phonics.word-phonics { align-items: start; }
.word-phonics .ph-tile { position: sticky; top: calc(var(--header-h) + 84px); }
@media (max-width: 1280px) {
  .word-phonics .ph-tile { position: static; }
}
