/* Shared Anandaya finish */
.page-back {
  margin: 0 0 20px;
}
.page-back a, .account-content a.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 16px;
  text-decoration: none;
}
.search-row .searchbox { flex: 1 1 240px; }
body {
  background: #fff8ec url("assets/images/watercolor-desktop.png") center top / 100% auto repeat-y;
}
@media (max-width: 767px) {
  body {
    background-image: url("assets/images/watercolor-mobile.png");
  }
}
body:has(#app > .account-shell) {
  background: #fff;
}
header .anandaya-logo, .marathon-page .site-header .logo {
  width: clamp(125px, 15vw, 170px);
  height: 46px;
  background: url("assets/images/anandaya-logo-transparent.png") center / 129% auto no-repeat;
}
/* Shared button treatment for both pages. */
body :is(button, [role="button"], input[type="submit"], a.primary, a.secondary,
  a.quiet, summary.quiet, a.help-action, header nav > a, :is(#programme-toggle,#books-toggle), #language, :is(#programme-menu,#books-menu) > a) {
  border-radius: 999px;
  border: 1px solid #88b4d0;
  background: linear-gradient(135deg, #f2f9fd, #dceefa);
  color: #214764;
  box-shadow: none;
  text-transform: uppercase;
}

body :is(button, [role="button"], input[type="submit"], a.primary, a.secondary,
  a.quiet, summary.quiet, a.help-action, header nav > a, :is(#programme-toggle,#books-toggle), #language, :is(#programme-menu,#books-menu) > a):is(
  :hover, :focus-visible):not(:disabled, [aria-disabled="true"]) {
  background: linear-gradient(135deg, #d7edfa, #b7dcf2);
}
body :is(button, [role="button"], input[type="submit"], a.primary, a.secondary,
  a.quiet, summary.quiet, a.help-action, header nav > a, :is(#programme-toggle,#books-toggle), #language, :is(#programme-menu,#books-menu) > a):focus-visible {
  outline: 2px solid #214764;
  outline-offset: 2px;
}
/* Persistent selection stays warm orange, including while hovered. */
body :is(button, [role="button"], input[type="submit"], a.primary, a.secondary,
  a.quiet, summary.quiet, a.help-action, header nav > a, :is(#programme-toggle,#books-toggle), #language, :is(#programme-menu,#books-menu) > a):is(
  [aria-expanded="true"], [aria-pressed="true"], [aria-selected="true"],
  [aria-current="page"], .active, :active) {
  background: linear-gradient(135deg, #ffe8cc, #fac494);
  border-color: #c78950;
  color: #653c20;
}
.home-dte-inner {
  padding-top: clamp(22px, 3vw, 42px);
  padding-bottom: clamp(24px, 4vw, 48px);
  align-items: center;
}
.home-inline-about { margin: 18px 0 20px; max-width: 62ch; }
.home-inline-about h2 { font-size: clamp(23px, 2.5vw, 30px); margin: 0 0 10px; }
.home-inline-about p { font-family: Anandaya, Arial, sans-serif; font-size: 16px; line-height: 1.65; }
.home-future { min-height: 180px; background: #fff; }
.dte-progress-report { max-width: 760px; padding: 18px; }
.dte-progress-report .progress-heading { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.dte-progress-report h2 { font-size: 24px; margin: 0; }
.progress-count { display: inline-flex; gap: 16px; font-size: 18px; }
.progress-done { color: #63713e; }
.progress-pending { color: #85434d; }
.dte-progress-report progress { height: 7px; accent-color: #63713e; margin-top: 12px; }
.dte-progress-report ul { grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 6px; margin: 12px 0 0; }
.dte-progress-report li { padding: 0; border-color: #e0e3d9; background: #fff; }
.dte-progress-report li a { display: flex; width: 100%; min-height: 44px; padding: 6px 9px; justify-content: space-between; gap: 8px; text-decoration: none; }
.dte-progress-report li a:hover { background: #f5f7ee; }
.dte-progress-report li a:focus-visible { outline: 2px solid #63713e; outline-offset: 2px; }
.handoff-chat.faq-launch .chat-bubble { border-color: currentColor; }
@media (max-width: 767px) {
  .home-dte-inner { padding-top: 22px; gap: 18px; }
  .home-future { min-height: 100px; }
  .dte-progress-report { padding: 14px; }
}
body :is(:is(#programme-menu,#books-menu) > a, #language-menu button, button[data-letter]) {
  text-transform: none;
}
:is(#programme-menu,#books-menu) > a + a {
  margin-top: 6px;
}
.home-dte {
  background: rgb(255 248 235 / 40%);
}
.home-destinations .home-destination,
.book-library .book-categories a.book-category {
  background-image: none;
}
.home-destinations .books-destination,
.book-library .book-categories a.category-ltr-en,
.book-library .book-categories a.category-ltr-hi {
  background-color: rgb(255 237 215 / 78%);
}
.home-destinations .marathon-destination,
.book-library .book-categories a.category-rtl-en,
.book-library .book-categories a.category-rtl-hi {
  background-color: rgb(237 243 250 / 82%);
}
.handoff-chat.faq-launch {
  flex-wrap: nowrap;
  width: max-content;
  min-width: 116px;
  max-width: calc(100vw - 28px);
  height: 44px;
  padding: 0 15px;
  white-space: nowrap;
}
.handoff-chat.faq-launch .chat-label {
  display: inline;
  width: auto;
  height: auto;
  border: 0;
  font-size: 13px;
  line-height: 1;
}
.handoff-chat.faq-launch .chat-bubble {
  display: block;
  flex: 0 0 15px;
  width: 15px;
  height: 11px;
  border-radius: 4px;
}

footer:has(.footer-rights) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  border-top: 1px solid #e9e2d8;
}
footer .footer-rights { flex: 1 1 auto; text-align: center; }
@media (max-width: 600px) {
  footer:has(.footer-rights) { justify-content: center; text-align: center; }
  footer .footer-rights { flex-basis: 100%; }
}

footer .footer-socials { display: flex; flex: 0 0 100%; gap: 8px; align-items: center; }
.footer-socials a {
  display: inline-grid; place-items: center; width: 44px; height: 44px;
  border-radius: 50%; border: 1px solid #88b4d0;
  color: #fff; background: #bd540f; border-color: transparent;
}
.footer-socials a:has(.social-youtube) { background: #ff0033; }
.footer-socials a:has(.social-instagram) { background: linear-gradient(145deg, #833ab4, #c13584 46%, #e1306c 67%, #f77737); }
.footer-socials a:hover { filter: brightness(.9); }

.footer-socials a:focus-visible { outline: 2px solid #214764; outline-offset: 2px; }
.footer-socials a > span { display: block; position: relative; box-sizing: border-box; margin: 0; color: inherit; }
.social-youtube { width: 20px; height: 14px; border: 2px solid currentColor; border-radius: 5px; }
.social-youtube::after {
  content: ""; position: absolute; top: 2px; left: 6px;
  border-left: 5px solid currentColor; border-top: 3px solid transparent; border-bottom: 3px solid transparent;
}
.social-instagram { width: 17px; height: 17px; border: 2px solid currentColor; border-radius: 5px; }
.social-instagram::before, .social-instagram::after { content: ""; position: absolute; border-radius: 50%; }
.social-instagram::before { inset: 3px; border: 1.5px solid currentColor; }
.social-instagram::after { width: 2px; height: 2px; top: 1px; right: 1px; background: currentColor; }
.social-web { width: 17px; height: 17px; border: 1.5px solid currentColor; border-radius: 50%; }
.social-web::before, .social-web::after { content: ""; position: absolute; }
.social-web::before { inset: -1px 3px; border: 1px solid currentColor; border-radius: 50%; }
.social-web::after { left: 0; right: 0; top: 50%; border-top: 1px solid currentColor; }

/* Keep page titles compact and reserve the largest heading for the home hero. */
#app h1 {
  font-size: clamp(26px, 2.8vw, 36px);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
#app .home-dte h1 {
  font-size: clamp(34px, 4.4vw, 56px);
  line-height: 1.1;
}
#app .book-library.category-page h1 {
  font-size: clamp(25px, 2.6vw, 34px);
  margin-bottom: 16px;
}

.sounds-library { padding-block-start: clamp(12px, 2vw, 20px); }
.sounds-library .learning-main .page-title { padding: 0 0 10px; }
.sounds-library .page-back { margin-bottom: 8px; }
.sounds-library .learning-main .page-title h1 {
  font-size: clamp(22px, 3vw, 30px);
  margin: 0;
}
.sounds-library .search-row { gap: 8px; margin-bottom: 10px; }
.sounds-library .letters { margin-block: 0; }
.sounds-library .result-count { margin-block: 8px 10px; }

.home-footer-space {
  height: clamp(44px, 8vw, 92px);
  background: #fff;
}
body:has(#app > .home-footer-space) footer:has(.footer-rights) {
  background: transparent;
}

#contact {
  box-sizing: border-box;
  width: fit-content;
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 24px);
  padding: 8px;
  overflow: hidden;
}
#contact .close {
  display: grid;
  place-items: center;
  float: none;
  width: 44px;
  height: 44px;
  margin: 0 0 4px auto;
  padding: 0;
  line-height: 1;
}
#contact .dialog-invitation-image {
  display: block;
  width: auto;
  height: auto;
  max-width: min(520px, calc(100vw - 40px));
  max-height: calc(100dvh - 88px);
  object-fit: contain;
}

/* Compact cards on the letter sounds library. */
.sounds-library .learning-main { container-type: inline-size; }
.sounds-library #results {
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}
.sounds-library #results > .empty { grid-column: 1 / -1; }
.sounds-library #results .card-art { height: 80px; padding: 12px; }
.sounds-library #results .big-letter { font-size: 48px; }
.sounds-library #results .card-art span:last-child { width: 32px; height: 32px; }
.sounds-library #results .card-body { padding: 12px; }
.sounds-library #results h3 { font-size: 16px; line-height: 1.3; margin: 0; }
.sounds-library #results .card-bottom { padding-top: 6px; }
.sounds-library #results .card-bottom > button { flex-shrink: 0; }

@container (min-width: 350px) {
  .sounds-library #results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container (min-width: 570px) {
  .sounds-library #results { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@container (min-width: 790px) {
  .sounds-library #results { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
