/* The site's own parts, the same on every page (the site's pages, the games section, the book editor): the header and its
   menu, the footer, the cookie bar, the floating WhatsApp button, the skip link and the site's popup. Their markup is
   written into every page by tools/site_chrome.py, their behavior is js/wix.js and js/site.js; every page links this
   file. Each rule starts at one of those parts, so a page's own CSS never reaches in and these rules never reach out
   (the games pages use names like .btn and .pill for their own things). The design tokens are here too: one place. */
:root, :is(.site-header, .site-footer, .consent, .cookie-settings, .od-dialog, .wa-float, .skip-link) {
  --ink: #213330;
  --pink: #fa57c4;
  --pink-deep: #b0298a;   /* small pink text: 4.5:1 on white and mint (WCAG AA) */
  --pink-strong: #cf3399; /* pink buttons (white text 4.5:1) and large pink text */
  --teal: #74b3a8;
  --teal-dark: #4f6360;
  --mint: #daf2ee;
  --glow-purple: rgba(95, 91, 205, 0.7);
  --glow-blue: rgba(87, 176, 250, 0.7);
  --head: "Varela Round", "Assistant", Arial, sans-serif;
  --body: "League Spartan", Arial, sans-serif;
}
.lang-he, .lang-he :is(.site-header, .site-footer, .consent, .od-dialog) { --body: "Assistant", "League Spartan", Arial, sans-serif; }
/* Arabic: Hebrew book titles fall back to Assistant */
.lang-ar, .lang-ar :is(.site-header, .site-footer, .consent, .od-dialog) { --head: "Noto Sans Arabic", "Varela Round", Arial, sans-serif; --body: "Noto Sans Arabic", "Assistant", "League Spartan", Arial, sans-serif; }
.lang-ar :is(.site-header, .site-footer) { font-weight: 400; }
/* The parts' own base, so a page's own element rules (a games page's a, img, p) don't reach in */
:is(.site-header, .site-footer) { font-family: var(--body); font-weight: 300; font-size: 18px; line-height: 1.35; color: var(--ink); }
.lang-he :is(.site-header, .site-footer) { font-weight: 400; }
:is(.site-header, .site-footer, .consent, .od-dialog) :is(*, *::before, *::after) { box-sizing: border-box; }
:is(.site-header, .site-footer, .consent, .od-dialog) img { max-width: 100%; height: auto; display: block; }
:is(.site-header, .site-footer, .consent, .od-dialog) a { color: inherit; }
:is(.site-header, .site-footer, .consent, .od-dialog) p { margin: 0 0 .6em; }
:is(.site-header, .site-footer, .consent, .cookie-settings, .od-dialog, .wa-float, .skip-link) :focus-visible,
:is(.wa-float, .skip-link, .cookie-settings):focus-visible { outline: 3px solid var(--pink-strong); outline-offset: 3px; }

/* The parts' button (the footer's call to action, the cookie bar, the popup): pink, or .light (white); inside its part, so the part's
   own link color above doesn't win */
:is(.site-footer, .consent, .od-dialog) .site-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 45px; padding: 0 34px; border-radius: 50px; border: 0;
  font-family: var(--head); font-size: 15px; text-decoration: none; cursor: pointer;
  background: var(--pink-strong); color: #fff; box-shadow: 0 0 6px var(--glow-purple); transition: transform .2s ease, box-shadow .2s ease;
}
:is(.site-footer, .consent, .od-dialog) .site-btn:hover { box-shadow: 0 0 14px var(--glow-purple); transform: translateY(-2px); }
:is(.site-footer, .consent, .od-dialog) .site-btn.light { background: #fff; color: var(--ink); box-shadow: 0 0 6px var(--glow-blue); }

/* Header: above the page; on the home page it floats over the hero video */
.site-header { position: relative; z-index: 30; }
.bq-home .site-header { position: absolute; top: 0; left: 0; right: 0; }
.site-header, .site-footer { font-family: var(--body); line-height: 1.35; }
.site-header .header-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 3vw; }
.site-header .logo img { width: clamp(140px, 17vw, 217px); filter: drop-shadow(0 2px 6px rgba(0,0,0,.18)); }
.site-header .header-actions { display: flex; align-items: center; gap: 12px; }
:is(.site-header, .site-footer) .pill {
  display: inline-flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 14px;
  background: #fff; border-radius: 30px;
  box-shadow: 0 0 6px var(--glow-blue);
  text-decoration: none; font-family: var(--head); font-size: 15px; color: var(--ink);
  position: relative;
}
:is(.site-header, .site-footer) .pill svg { width: 20px; height: 20px; fill: var(--ink); color: var(--ink); }
:is(.site-header, .site-footer) .pill .count { display: none; position: absolute; top: -7px; inset-inline-end: -7px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--pink-strong); color: #fff; font-size: 12px; line-height: 20px; text-align: center; box-shadow: 0 1px 4px rgba(0,0,0,.25); pointer-events: none; }
:is(.site-header, .site-footer) .pill .count.on { display: block; }
/* The language menu (<details>): the page's language, opening the other two (the footer's upwards) */
:is(.site-header, .site-footer) .lang-menu { position: relative; }
:is(.site-header, .site-footer) .lang-menu > summary { list-style: none; cursor: pointer; gap: 6px; }
:is(.site-header, .site-footer) .lang-menu > summary::-webkit-details-marker { display: none; }
:is(.site-header, .site-footer) .lang-menu .chevron { width: 14px; height: 14px; transition: transform .2s ease; }
:is(.site-header, .site-footer) .lang-menu[open] .chevron { transform: rotate(180deg); }
:is(.site-header, .site-footer) .lang-list {
  position: absolute; z-index: 61; top: calc(100% + 8px); inset-inline-end: 0; min-width: 150px; padding: 6px;
  display: flex; flex-direction: column; background: #fff; border-radius: 16px; box-shadow: 0 0 9px rgba(95,91,205,.3);
}
.site-footer .lang-list { top: auto; bottom: calc(100% + 8px); }
:is(.site-header, .site-footer) .lang-list a { display: flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 12px; color: var(--ink); text-decoration: none; font-family: var(--head); font-size: 15px; }
:is(.site-header, .site-footer) .lang-list a:is(:hover, :focus-visible) { background: var(--mint); }
.site-header .menu-toggle {
  width: 47px; height: 47px; border-radius: 50%; border: 0; cursor: pointer;
  background: #fff; color: var(--teal); box-shadow: 0 0 6px var(--glow-blue);
  display: grid; place-items: center;
}
.site-header .menu-toggle svg { width: 24px; height: 24px; }
.site-header .main-nav {
  display: none; position: absolute; right: 3vw; top: 72px;
  flex-direction: column; min-width: 230px; padding: 14px 0;
  background: rgba(255,255,255,.96); border-radius: 20px;
  box-shadow: 0 0 9px rgba(95,91,205,.3);
}
.site-header .main-nav.open { display: flex; }
.site-header .main-nav .nav-user { display: flex; flex-direction: column; margin: 0 14px 10px; padding: 6px 0; border-radius: 14px; background: var(--mint); }
.site-header .main-nav .nav-user + a { margin-top: 2px; padding-top: 13px; border-top: 1px solid rgba(33,51,48,.14); }
.site-header .main-nav .nav-user > a, .site-header .main-nav .nav-user > button { margin: 0 6px; border-radius: 10px; }
.site-header .main-nav .nav-user > a, .site-header .main-nav .nav-user > .nav-logout { padding: 8px 10px; }
.site-header .main-nav a, .site-header .main-nav .nav-logout { display: flex; align-items: center; gap: 12px; }
.site-header .main-nav .nav-ico { width: 22px; height: 22px; flex: none; color: var(--teal-dark); }
[dir="rtl"] .site-header .main-nav .nav-ico-dir { transform: scaleX(-1); }
.site-header .main-nav .nav-user > a:hover, .site-header .main-nav .nav-user > button:hover { background: rgba(250,87,196,.1); }
.site-header .main-nav a { padding: 9px 24px; text-decoration: none; font-family: var(--head); font-size: 16px; }
.site-header .main-nav a:hover { color: var(--pink-strong); background: rgba(250,87,196,.07); }
.site-header .main-nav .nav-logout { padding: 9px 24px; border: 0; background: none; color: inherit; font-family: var(--head); font-size: 16px; text-align: start; cursor: pointer; }
.site-header .main-nav .nav-logout:hover { color: var(--pink-strong); background: rgba(250,87,196,.07); }
.site-header .main-nav .nav-sub { display: flex; flex-direction: column; margin-top: -6px; }
.site-header .main-nav .nav-sub a { min-height: 44px; padding: 0 24px; padding-inline-start: 58px; font-family: inherit; font-size: 15px; color: var(--pink-deep); }
.site-footer { position: relative; z-index: 2; background: var(--ink); color: #dfe8e5; padding: 0 0 26px; }
.site-footer .footer-wave { position: absolute; left: 0; top: -38px; width: 100%; height: 40px; display: block; }
.site-footer .footer-wave path { fill: var(--ink); }
.site-footer .footer-cta {
  width: min(1100px, 92vw); margin: 0 auto; padding: 34px 0 30px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.site-footer .footer-cta-title { margin: 0; font-family: var(--head); font-size: clamp(22px, 2.4vw, 28px); color: #fff; }
.site-footer .footer-grid { width: min(1100px, 92vw); margin: 0 auto; padding: 40px 0 30px; display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 34px; }
.site-footer .footer-brand p { font-size: 16px; line-height: 1.5; margin: 12px 0 18px; max-width: 300px; }
.site-footer .footer-logo img { width: 160px; }
.site-footer .socials { display: flex; gap: 10px; margin-bottom: 16px; }
.site-footer .socials a {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.08); color: #fff; transition: background .2s ease, transform .2s ease;
}
.site-footer .socials a:hover { background: var(--pink-strong); transform: translateY(-3px); }
.site-footer .socials svg { width: 20px; height: 20px; fill: currentColor; }
.site-footer .wa-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px;
  background: #25d366; color: #0b3d22; text-decoration: none; font-family: var(--head); font-size: 14px; transition: transform .2s ease;
}
.site-footer .wa-pill:hover { transform: translateY(-2px); }
.site-footer .wa-pill svg { width: 20px; height: 20px; fill: currentColor; }
.site-footer .footer-head { font-family: var(--head); font-size: 15px; letter-spacing: .08em; text-transform: uppercase; color: var(--pink); margin: 6px 0 12px; }
.site-footer nav { display: flex; flex-direction: column; gap: 2px; }
.site-footer nav a { color: #dfe8e5; text-decoration: none; font-size: 16px; line-height: 32px; transition: color .2s ease, transform .2s ease; }
.site-footer nav a:hover { color: #fff; transform: translateX(3px); }
.site-footer .footer-bottom {
  width: min(1100px, 92vw); margin: 0 auto; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12);
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: 14px; opacity: .9;
}
.site-footer .footer-bottom p { margin: 0; }
.site-footer .lang-menu > summary { box-shadow: none; height: 38px; padding: 0 16px; }
.wa-float {
  position: fixed; z-index: 60; bottom: calc(var(--bottom-bar, 0px) + 18px); left: 18px; width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center; background: #25d366; color: #fff;
  box-shadow: 0 6px 18px rgba(0,0,0,.25); transition: transform .2s ease;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 32px; height: 32px; fill: currentColor; }
.consent {
  position: fixed; z-index: 70; inset-inline: 0; bottom: 0;
  padding: 8px max(16px, calc((100vw - 1100px) / 2)); padding-bottom: max(8px, env(safe-area-inset-bottom));
  display: flex; align-items: center; justify-content: center; gap: 14px;
  background: #fff; color: var(--ink); box-shadow: 0 -4px 18px rgba(33,51,48,.14); font-size: 14px;
}
.consent p { margin: 0; line-height: 1.35; }
.consent a { color: var(--pink-deep); text-decoration: underline; white-space: nowrap; }
.consent .consent-actions { display: flex; gap: 8px; flex: none; }
.consent .site-btn { min-height: 44px; min-width: 92px; padding: 0 16px; font-size: 15px; font-weight: 700; }
.consent .consent-decline { background: #fff; color: #4d5e5a; border: 1.5px solid #9aa8a5; font-weight: 400 !important; }
.consent .consent-decline:hover { background: #f2f6f5; }
@media (max-width: 600px) {
  .consent { gap: 10px; padding-inline: 12px; font-size: 13px; }
  .consent .site-btn { min-width: 0; padding: 0 12px; font-size: 14px; }
  .wa-float { width: 52px; height: 52px; bottom: calc(var(--bottom-bar, 0px) + 14px); left: 14px; }
}
[dir="rtl"] .site-header .main-nav { right: auto; left: 3vw; }
[dir="rtl"] .site-footer nav a:hover { transform: translateX(-3px); }
@media (max-width: 900px) {
  .site-header .header-row { flex-wrap: wrap; column-gap: 10px; row-gap: 10px; }
  .site-header .header-actions { display: contents; }
  .site-header .menu-toggle { order: 1; }
  .site-header .header-row::after { content: ""; order: 2; flex-basis: 100%; height: 1px; background: rgba(255,255,255,.8); box-shadow: 0 1px 0 rgba(33,51,48,.08); }
  .site-header .header-actions :is(.pill, .lang-menu) { order: 3; flex: 1 1 0; justify-content: center; height: 42px; }
  .site-header .header-actions .lang-menu { display: flex; }
  .site-header .header-actions .lang-menu > summary { flex: 1; }
  .site-header .main-nav { top: calc(100% - 4px); }
  .site-footer .footer-grid { grid-template-columns: 1fr 1fr; }
  .site-footer .footer-brand { grid-column: 1 / -1; }
  .site-footer .footer-cta { justify-content: center; text-align: center; }
}
@media (max-width: 560px) {
  .site-footer .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .site-footer .footer-grid nav:last-child { grid-column: 1 / -1; }
  .site-footer .footer-bottom { justify-content: center; text-align: center; }
  .site-header .logo img { width: 130px; }
}
.od-dialog { border: 0; border-radius: 28px; padding: 26px; max-width: min(440px, 92vw); text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.od-dialog::backdrop { background: rgba(20,30,28,.55); }
.od-dialog img { width: 200px; height: 200px; object-fit: cover; margin: 0 auto 12px; }
.od-dialog h2 { font-size: 22px; }
.cookie-settings { border: 0; background: none; color: inherit; font: inherit; font-size: 14px; text-decoration: underline; cursor: pointer; padding: 4px; opacity: .85; }
.cookie-settings:hover { opacity: 1; }
.skip-link { position: fixed; top: 8px; inset-inline-start: 8px; z-index: 100; padding: 10px 18px; border-radius: 999px; background: var(--ink); color: #fff; font-family: var(--head); text-decoration: none; transform: translateY(-160%); transition: transform .15s ease; }
.skip-link:focus { transform: none; }
.site-header .main-nav { z-index: 60; max-height: calc(100dvh - 150px); max-width: min(360px, 94vw); overflow-y: auto; overscroll-behavior: contain; }
.site-header .main-nav > * { flex-shrink: 0; }
.site-header .main-nav summary { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 9px 24px; font-family: var(--head); font-size: 16px; cursor: pointer; list-style: none; }
.site-header .main-nav summary::-webkit-details-marker { display: none; }
.site-header .main-nav summary::after { content: ""; flex: none; width: 7px; height: 7px; margin-inline-start: auto; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .2s; }
.site-header .main-nav details[open] > summary::after { transform: rotate(-135deg); }
.site-header .main-nav summary:hover { color: var(--pink-strong); background: rgba(250,87,196,.07); }
.site-header .main-nav .nav-fold > .nav-sub { margin-top: 0; }
.site-header .main-nav .nav-fold .nav-sub a { padding-block: 6px; line-height: 1.3; }
.site-header .main-nav .nav-fold .nav-fold > summary { padding-inline-start: 58px; font-family: inherit; font-size: 15px; color: var(--pink-deep); }
.site-header .main-nav .nav-fold .nav-fold .nav-sub a { min-height: 40px; padding-block: 6px; padding-inline-start: 76px; font-size: 14.5px; line-height: 1.3; color: inherit; }
.site-header .main-nav .nav-fold .nav-fold .nav-fold > summary { padding-inline-start: 84px; font-size: 14.5px; color: inherit; }
.site-header .main-nav .nav-fold .nav-fold .nav-fold .nav-sub a { padding-inline-start: 104px; }
@media (prefers-reduced-motion: reduce) {
  .site-header .main-nav summary::after { transition: none; }
}
