/* Maths Chase home page, UK design (2026-11-27). For includes/home-uk.inc; everything is under .mh.
   The site's own font and colours: brand blue, lime, navy for words only (no navy backgrounds).
   The pictures are the game's own. */

@font-face
{
  font-family: "Figtree";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url(/fonts/figtree.woff2) format("woff2");
}

.mh
{
  --mh-navy: #1f3350;
  --mh-ink: #2a3a52;
  --mh-slate: #56657b;
  --mh-blue: #3a68ae;
  --mh-blue-dark: #2f568f;
  --mh-tint: #f0f4fb;
  --mh-line: #dbe4f1;
  --mh-edge: #c6d3e5;
  --mh-lime: #a9d622;
  --mh-lime-dark: #8fb81a;
  --mh-shadow: 0 14px 32px rgba(31, 51, 80, .13);
  /* one unit of the little scene under the form (the runner is 112 units tall) */
  --mh-u: clamp(.6px, .17vw, 1px);
  margin: 0;
  background: #fff;
  color: var(--mh-ink);
  font-family: "Figtree", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

.mh *, .mh *:before, .mh *:after
{
  box-sizing: border-box;
}

.mh [hidden]
{
  display: none !important;
}

.mh img
{
  max-width: 100%;
  height: auto;
}

.mh-wrap
{
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

.mh a
{
  color: var(--mh-blue);
}

.mh a:focus-visible, .mh button:focus-visible, .mh select:focus-visible, .mh input:focus-visible
{
  outline: 3px solid var(--mh-lime);
  outline-offset: 2px;
}

/* ---- the logo bar ---- */
.mh-head
{
  padding: 12px 0;
  background: #fff;
  border-bottom: 1px solid var(--mh-line);
}

.mh-logo
{
  display: inline-block;
  line-height: 0;
}

.mh-logo img
{
  display: block;
  width: 230px;
}

/* ---- the top of the page: the heading, the three steps and Start, over the sky of the game ---- */
.mh-hero
{
  position: relative;
  padding-top: 34px;
  background: linear-gradient(180deg, #bed5ff 0%, #d2e1ff 100%);
}

.mh .mh-hero__title
{
  max-width: 920px;
  margin: 0 auto 28px;
  color: var(--mh-navy);
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.02em;
  text-align: center;
}

/* The lime stroke of the site's headings: under the letters, tilted 1 degree, still. */
.mh-mark
{
  position: relative;
  z-index: 0;
  white-space: nowrap;
}

.mh-mark:before
{
  content: "";
  position: absolute;
  top: 80%;
  right: -.04em;
  bottom: 1%;
  left: -.04em;
  z-index: -1;
  border-radius: 999px;
  background: var(--mh-lime);
  transform: rotate(-1deg);
}

.mh-setup
{
  position: relative;
  z-index: 2;
  margin: 0;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--mh-shadow);
}

.mh-steps
{
  display: grid;
  grid-template-columns: 1.12fr 1fr 1fr;
}

.mh .mh-step
{
  min-width: 0;
  margin: 0;
  padding: 24px 26px 22px;
  border: 0;
  border-left: 1px solid var(--mh-line);
}

.mh .mh-step:first-child
{
  border-left: 0;
}

.mh .mh-step__title
{
  display: flex;
  align-items: center;
  gap: 10px;
  float: left;
  width: 100%;
  margin: 0 0 14px;
  padding: 0;
  color: var(--mh-navy);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
}

.mh .mh-step__title + *
{
  clear: both;
}

.mh-step__n
{
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--mh-lime);
  color: var(--mh-navy);
  font-size: 17px;
  font-weight: 800;
}

.mh .mh-label
{
  display: block;
  margin: 0 0 5px;
  color: var(--mh-slate);
  font-size: 14px;
  font-weight: 700;
}

.mh .mh-select, .mh .mh-input, .mh .mh-num
{
  display: block;
  width: 100%;
  height: 46px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid var(--mh-edge);
  border-radius: 12px;
  background-color: #fff;
  box-shadow: none;
  color: var(--mh-navy);
  font: inherit;
  font-size: 17px;
  font-weight: 600;
}

.mh .mh-select
{
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%233a68ae' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 8px;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.mh .mh-select:hover, .mh .mh-input:hover, .mh .mh-num:hover
{
  border-color: var(--mh-blue);
}

/* the number boxes that go with the question type: one of the five sets shows */
.mh-range
{
  margin-top: 14px;
  padding: 14px 14px 12px;
  border-radius: 16px;
  background: var(--mh-tint);
}

.mh .mh-range__title
{
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  color: var(--mh-navy);
  font-size: 16px;
  font-weight: 800;
}

.mh-range__ico
{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 21px;
  font-weight: 800;
  line-height: 1;
}

.mh-range__ico--t { background: rgba(230, 138, 25, .2); color: #b9650a; }
.mh-range__ico--a { background: rgba(0, 132, 255, .16); color: #1667c2; }
.mh-range__ico--s { background: rgba(241, 43, 42, .15); color: #c42a2a; }
.mh-range__ico--b { background: rgba(109, 82, 210, .16); color: #5a43b8; }
.mh-range__ico--d { background: rgba(52, 198, 53, .2); color: #23802a; }

.mh-range__row
{
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  color: var(--mh-slate);
  font-size: 15px;
  font-weight: 600;
}

.mh-range__what
{
  flex: 1 1 auto;
  min-width: 0;
  color: var(--mh-navy);
}

.mh-range__row label
{
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.mh .mh-range__row .mh-num
{
  width: 62px;
  height: 40px;
  padding: 0 6px;
  text-align: center;
}

/* the five characters, as pictures to pick from */
.mh-chars
{
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.mh-char
{
  display: block;
  grid-column: span 2;
  margin: 0;
  cursor: pointer;
}

/* the second row (two tiles) sits in the middle */
.mh-char:nth-child(4)
{
  grid-column: 2 / span 2;
}

.mh-char input
{
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.mh-char__box
{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  padding: 10px 2px 8px;
  border: 2px solid var(--mh-line);
  border-radius: 14px;
  background: #fff;
}

/* The picture fits inside a box of this height and keeps its own shape (a fixed height with the tile's
   narrow width had stretched the wider characters). */
.mh .mh-char__box img
{
  display: block;
  width: 100%;
  height: 96px;
  object-fit: contain;
  object-position: center bottom;
}

.mh-char__name
{
  margin-top: 6px;
  color: var(--mh-navy);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.1;
}

.mh-char:hover .mh-char__box
{
  border-color: var(--mh-blue);
}

.mh-char input:checked + .mh-char__box
{
  border-color: var(--mh-lime-dark);
  background: #f4fae6;
  box-shadow: 0 0 0 2px var(--mh-lime);
}

.mh-char input:focus-visible + .mh-char__box
{
  outline: 3px solid var(--mh-blue);
  outline-offset: 2px;
}

/* ---- chaser speed: an Off button and a bar of ten levels. The levels up to the chosen one are filled,
   from lime (slow) to orange (fast); the words on the right of the heading say Off or the level. ---- */
.mh-speed__head
{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.mh .mh-speed__head .mh-label
{
  margin: 0;
}

.mh-speed__now
{
  padding: 3px 12px;
  border-radius: 999px;
  background: #f4fae6;
  color: #3f6600;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.3;
  white-space: nowrap;
}

.mh-speed__now.is-off
{
  background: #e9eef6;
  color: var(--mh-slate);
}

.mh-speed__row
{
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.mh-speed__off, .mh-speed__seg
{
  position: relative;
  display: block;
  margin: 0;
  cursor: pointer;
}

.mh-speed input
{
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.mh-speed__off
{
  flex: 0 0 auto;
}

.mh-speed__off span
{
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  height: 44px;
  padding: 0 10px;
  border: 2px solid var(--mh-edge);
  border-radius: 12px;
  background: #fff;
  color: var(--mh-slate);
  font-size: 15px;
  font-weight: 800;
}

.mh-speed__off:hover span
{
  border-color: var(--mh-blue);
}

.mh-speed__off input:checked + span
{
  border-color: var(--mh-slate);
  background: var(--mh-slate);
  color: #fff;
}

.mh-speed__bar
{
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 3px;
  min-width: 0;
  padding: 3px;
  border: 2px solid var(--mh-edge);
  border-radius: 12px;
  background: #fff;
}

.mh-speed__seg span
{
  display: flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  border-radius: 4px;
  background: #e9eef6;
  color: #8a98ad;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}

.mh-speed__seg:first-child span
{
  border-radius: 8px 4px 4px 8px;
}

.mh-speed__seg:last-child span
{
  border-radius: 4px 8px 8px 4px;
}

.mh-speed__seg:hover span
{
  background: #d6e0ef;
  color: var(--mh-navy);
}

.mh-speed__seg.is-on span
{
  color: var(--mh-navy);
}

.mh-speed__seg--1.is-on span { background: #a9d622; }
.mh-speed__seg--2.is-on span { background: #b6d521; }
.mh-speed__seg--3.is-on span { background: #c3d320; }
.mh-speed__seg--4.is-on span { background: #d0cf1f; }
.mh-speed__seg--5.is-on span { background: #dcc81e; }
.mh-speed__seg--6.is-on span { background: #e5bd1d; }
.mh-speed__seg--7.is-on span { background: #eab01c; }
.mh-speed__seg--8.is-on span { background: #eca21b; }
.mh-speed__seg--9.is-on span { background: #ec951a; }
.mh-speed__seg--10.is-on span { background: #e68a19; }

/* the chosen level stands out from the filled ones before it */
.mh-speed__seg input:checked + span
{
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--mh-navy);
  font-size: 16px;
  font-weight: 800;
  position: relative;
  z-index: 1;
}

.mh-speed input:focus-visible + span
{
  outline: 3px solid var(--mh-blue);
  outline-offset: 2px;
}

.mh-speed__ends
{
  display: flex;
  justify-content: space-between;
  margin: 4px 2px 0 62px;
  color: var(--mh-slate);
  font-size: 12px;
  font-weight: 600;
}

.mh-pair
{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.mh .mh-hint
{
  margin: 14px 0 0;
  color: var(--mh-slate);
  font-size: 14px;
  line-height: 1.4;
}

.mh-sr
{
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Play Sounds: a switch; Email Results: a tick box that opens the address box */
.mh-switch, .mh-tick
{
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--mh-navy);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.mh-switch input
{
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.mh-switch__track
{
  position: relative;
  flex: 0 0 auto;
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: #c6d3e5;
  transition: background-color .15s ease;
}

.mh-switch__track:after
{
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(31, 51, 80, .3);
  transition: transform .15s ease;
}

.mh-switch input:checked + .mh-switch__track
{
  background: var(--mh-lime-dark);
}

.mh-switch input:checked + .mh-switch__track:after
{
  transform: translateX(20px);
}

.mh-switch input:focus-visible + .mh-switch__track
{
  outline: 3px solid var(--mh-blue);
  outline-offset: 2px;
}

.mh-tick input
{
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--mh-blue);
}

.mh-emailbox
{
  flex: 1 1 200px;
  max-width: 280px;
}

/* the foot of the form: the two options on the left, the two buttons on the right */
.mh-go
{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  padding: 18px 26px 22px;
  border-top: 1px solid var(--mh-line);
}

.mh-go__opts
{
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
}

.mh-go__btns
{
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.mh .mh-start
{
  min-width: 240px;
  min-height: 62px;
  padding: 10px 40px;
  border: 2px solid var(--mh-lime-dark);
  border-radius: 16px;
  background: var(--mh-lime);
  box-shadow: 0 5px 0 var(--mh-lime-dark);
  color: var(--mh-navy);
  font: inherit;
  font-size: 23px;
  font-weight: 800;
  line-height: 1.1;
  cursor: pointer;
}

.mh .mh-start:hover
{
  background: #b4de35;
}

.mh .mh-start:active
{
  box-shadow: none;
  transform: translateY(5px);
}

.mh .mh-center
{
  margin: 30px 0 0;
  text-align: center;
}

.mh .mh-btn
{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 8px 28px;
  border: 2px solid var(--mh-blue);
  border-radius: 14px;
  background: #fff;
  color: var(--mh-blue);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.15;
  text-decoration: none;
}

.mh .mh-btn:hover
{
  background: #e8f0fc;
}

.mh .mh-btn--main
{
  border-color: var(--mh-blue);
  background: var(--mh-blue);
  color: #fff;
}

.mh .mh-btn--main:hover
{
  border-color: var(--mh-blue-dark);
  background: var(--mh-blue-dark);
}

/* the game's own picture under the form: the bridge over the sea, the chosen character on it and,
   when a chaser is set, the monster behind */
.mh-scene
{
  position: relative;
  height: calc(var(--mh-u) * 300);
  margin-top: 6px;
  background-image: url("/maths-games/maths-chase/images/background.jpg");
  background-repeat: repeat-x;
  background-position: center calc(var(--mh-u) * -150);
  background-size: auto calc(var(--mh-u) * 1342);
}

.mh .mh-scene img
{
  position: absolute;
  bottom: calc(var(--mh-u) * 128);
  width: auto;
  max-width: none;
}

.mh .mh-scene__hero
{
  left: 58%;
  height: calc(var(--mh-u) * 112);
}

.mh .mh-scene__monster
{
  left: 36%;
  height: calc(var(--mh-u) * 104);
}

/* The little scene has the look of the game. The picture is laid down twice: still, as before (the box
   itself), and its top part, the sky and the bridge, in two boxes that sway (the outer turns about the
   right-hand end of the bridge, the inner about the left-hand end, each in its own time). The sea is drawn
   by the script as bands of waves that lie over the sea of the picture (without the script the picture's
   sea shows). The flag is tied to the far rope; three clouds drift behind it.
   Nothing moves until the script has put mh-fx on the scene (never for a device that asks for less
   movement). */
.mh-scene
{
  overflow: hidden;
}

.mh-scene__sway, .mh-scene__sway2, .mh-waves
{
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

.mh-scene__sway
{
  transform-origin: 100% calc(var(--mh-u) * 172);
}

.mh-scene__sway2
{
  transform-origin: 0 calc(var(--mh-u) * 172);
}

.mh-scene__land
{
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: calc(var(--mh-u) * 224);
  background-image: url("/maths-games/maths-chase/images/background.jpg");
  background-repeat: repeat-x;
  background-position: center calc(var(--mh-u) * -150);
  background-size: auto calc(var(--mh-u) * 1342);
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(var(--mh-u) * 212), transparent calc(var(--mh-u) * 224));
  mask-image: linear-gradient(to bottom, #000 calc(var(--mh-u) * 212), transparent calc(var(--mh-u) * 224));
}

/* The bridge drawn by the page (the small script next to the scene in includes/home-uk.inc), as in the game:
   small logs, 28 units wide, one every 33 units, and two ropes over them. With it the scene shows a plain sky
   (and, until the sea is drawn, the sea's colours) instead of the old picture. */
.mh-scene--drawn
{
  background: linear-gradient(180deg, #ccddff 0, #e2eefe calc(var(--mh-u) * 128), #f1f5ff calc(var(--mh-u) * 212), #dbf8f7 calc(var(--mh-u) * 214), #93dcea 100%);
}

.mh-scene--drawn .mh-scene__land
{
  background-image: none;
  -webkit-mask-image: none;
  mask-image: none;
}

.mh-logdefs
{
  position: absolute;
  width: 0;
  height: 0;
}

.mh .mh-log
{
  position: absolute;
  top: calc(var(--mh-u) * 146);
  left: calc(var(--mh-u) * (var(--x) - 17));
  display: block;
  width: calc(var(--mh-u) * 34);
  max-width: none;
  height: calc(var(--mh-u) * 66);
  overflow: visible;
  transform: translateY(calc(var(--mh-u) * var(--d))) rotate(var(--r));
  transform-origin: 50% 34.1%;
}

.mh .mh-ropes
{
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: calc(var(--mh-u) * var(--w));
  max-width: none;
  height: calc(var(--mh-u) * 260);
  overflow: visible;
}

.mh-rope
{
  fill: none;
  stroke: #26100a;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mh-rope-hi
{
  fill: none;
  stroke: #5c3f20;
  stroke-width: 1;
  stroke-dasharray: 2 7;
  opacity: .55;
}

/* on the drawn bridge the far rope lies lower than in the picture: the pole of the flag goes down to it */
.mh .mh-scene--drawn .mh-scene__flag
{
  bottom: calc(var(--mh-u) * 139);
}

/* The sea drawn by the script (scripts/home-uk.js): bands of waves, one behind the other, each far longer
   than the window (--l units), so that it can slide by one repeat of its outline (--p units) and still fill
   the strip. A few short white glints come and go on it. */
.mh-wave
{
  position: absolute;
  top: calc(var(--mh-u) * var(--y));
  left: 0;
  width: calc(var(--mh-u) * var(--l));
  height: calc(var(--mh-u) * var(--h));
}

.mh-wave svg
{
  display: block;
  width: 100%;
  height: 100%;
}

.mh-glint
{
  position: absolute;
  top: calc(var(--mh-u) * var(--y));
  left: var(--x);
  display: block;
  width: calc(var(--mh-u) * 30);
  height: calc(var(--mh-u) * 9);
  border-top: calc(var(--mh-u) * 2.5) solid #fff;
  border-radius: 50%;
  opacity: 0;
}

/* the flag: its pole is tied to the far rope, 27.5 units above the line of the feet */
.mh .mh-scene__flag
{
  position: absolute;
  bottom: calc(var(--mh-u) * 152);
  left: 84%;
  display: block;
  width: auto;
  height: calc(var(--mh-u) * 120);
}

.mh .mh-scene__cloud
{
  position: absolute;
  top: calc(var(--mh-u) * var(--y));
  left: var(--x);
  display: block;
  width: calc(var(--mh-u) * var(--w));
  height: auto;
  opacity: var(--o);
}

.mh-scene__cloud--1
{
  --y: 6;
  --x: 12%;
  --w: 110;
  --o: .85;
  --t: 110s;
  --d: -22s;
}

.mh-scene__cloud--2
{
  --y: 22;
  --x: 70%;
  --w: 74;
  --o: .6;
  --t: 170s;
  --d: -120s;
}

.mh-scene__cloud--3
{
  --y: 13;
  --x: 43%;
  --w: 90;
  --o: .72;
  --t: 140s;
  --d: -66s;
}

.mh-fx .mh-scene__sway
{
  animation: mh-sway-l 5.9s ease-in-out infinite;
}

.mh-fx .mh-scene__sway2
{
  animation: mh-sway-r 7.7s ease-in-out infinite;
}

.mh-fx .mh-wave
{
  animation: mh-wave-bob var(--bt) ease-in-out infinite alternate;
}

.mh-fx .mh-wave svg
{
  animation: mh-wave-run var(--t) linear infinite;
}

.mh-fx .mh-wave--right svg
{
  animation-direction: reverse;
}

.mh-fx .mh-glint
{
  animation: mh-glint var(--t) ease-in-out var(--d) infinite;
}

.mh-fx .mh-scene__cloud
{
  left: 0;
  animation: mh-drift var(--t) linear var(--d) infinite;
}

/* --mh-tilt is the angle that moves the far end of the bridge by four units; the script sets it */
@keyframes mh-sway-l
{
  0%, 100% { transform: rotate(0deg); }
  28% { transform: rotate(calc(var(--mh-tilt, .1deg) * -1)); }
  56% { transform: rotate(calc(var(--mh-tilt, .1deg) * .6)); }
  80% { transform: rotate(calc(var(--mh-tilt, .1deg) * -.5)); }
}

@keyframes mh-sway-r
{
  0%, 100% { transform: rotate(0deg); }
  22% { transform: rotate(calc(var(--mh-tilt, .1deg) * -.6)); }
  50% { transform: rotate(var(--mh-tilt, .1deg)); }
  76% { transform: rotate(calc(var(--mh-tilt, .1deg) * -.35)); }
}

@keyframes mh-wave-run
{
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(var(--mh-u) * var(--p) * -1)); }
}

@keyframes mh-wave-bob
{
  0% { transform: translateY(calc(var(--mh-u) * var(--by) * -1)); }
  100% { transform: translateY(calc(var(--mh-u) * var(--by))); }
}

@keyframes mh-glint
{
  0%, 100% { opacity: 0; transform: translateX(0) scaleX(.6); }
  45% { opacity: .9; transform: translateX(calc(var(--mh-u) * 8)) scaleX(1); }
  80% { opacity: 0; transform: translateX(calc(var(--mh-u) * 14)) scaleX(.8); }
}

@keyframes mh-drift
{
  0% { transform: translateX(-110%); }
  100% { transform: translateX(calc(100vw + 10%)); }
}

/* ---- the sections below ---- */
.mh-band
{
  padding: 64px 0;
  background: #fff;
}

.mh-band--tint
{
  background: var(--mh-tint);
}

/* the globe picture has this pale blue painted into it */
.mh-band--sky
{
  background: #d5edf9;
}

.mh .mh-h2
{
  margin: 0 0 14px;
  color: var(--mh-navy);
  font-size: clamp(24px, 2.6vw, 34px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.02em;
}

.mh .mh-h2--center
{
  margin-bottom: 30px;
  text-align: center;
}

.mh .mh-h3
{
  margin: 14px 0 6px;
  color: var(--mh-navy);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.25;
}

.mh-band p
{
  margin: 0;
  color: var(--mh-slate);
}

.mh-split
{
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 48px;
}

.mh .mh-split__img
{
  display: block;
  justify-self: center;
  width: 100%;
  max-width: 470px;
  height: auto;
}

.mh-split__text
{
  max-width: 520px;
}

.mh-split__text p
{
  font-size: 18px;
}

.mh .mh-topics
{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.mh .mh-topics li
{
  margin: 0;
  padding: 6px 14px;
  border-radius: 999px;
  background: #fff;
  color: var(--mh-navy);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  list-style: none;
}

.mh .mh-lead
{
  max-width: 560px;
  margin: -18px auto 28px;
  color: var(--mh-slate);
  font-size: 18px;
  text-align: center;
}

.mh-subjects
{
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

.mh .mh-subject
{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px 10px 20px;
  border: 1px solid var(--mh-line);
  border-radius: 18px;
  background: #fff;
  color: var(--mh-navy);
  text-decoration: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.mh .mh-subject:hover
{
  border-color: var(--mh-blue);
  box-shadow: var(--mh-shadow);
}

.mh-subject .icon
{
  display: block;
  width: 64px;
  height: 64px;
}

.mh-subject__name
{
  font-size: 18px;
  font-weight: 800;
}

.mh-features
{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.mh-feature
{
  padding: 28px 24px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(31, 51, 80, .07);
  text-align: center;
}

.mh-feature img
{
  display: block;
  width: auto;
  height: 96px;
  margin: 0 auto;
}

.mh .mh-feature .mh-h3
{
  margin-top: 18px;
}

.mh-feature p
{
  max-width: 300px;
  margin: 0 auto;
}

/* ---- "Maths Chase builds confidence as you progress": the introduction and the picture on one side,
   three numbered steps on the other. Each step carries a small, still copy of the chaser bar. ---- */
.mh-grow
{
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  align-items: center;
  gap: 56px;
}

.mh-grow__intro p
{
  max-width: 440px;
  font-size: 18px;
}

.mh .mh-grow__img
{
  display: block;
  width: 100%;
  max-width: 370px;
  height: auto;
  margin: 26px 0 0;
}

.mh .mh-path
{
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: mh-step;
}

/* the line that joins the three numbers */
.mh-path:before
{
  content: "";
  position: absolute;
  top: 44px;
  bottom: 44px;
  left: 41px;
  width: 3px;
  border-radius: 3px;
  background: var(--mh-line);
}

.mh .mh-path__step
{
  position: relative;
  margin: 0 0 14px;
  padding: 20px 22px 20px 84px;
  border-radius: 18px;
  background: var(--mh-tint);
  list-style: none;
  counter-increment: mh-step;
}

.mh .mh-path__step:last-child
{
  margin-bottom: 0;
}

.mh-path__step:before
{
  content: counter(mh-step);
  position: absolute;
  top: 20px;
  left: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--mh-lime);
  color: var(--mh-navy);
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
}

.mh .mh-path__step .mh-h3
{
  margin: 0 0 4px;
}

.mh-path__step p
{
  margin: 0;
}

.mh-mini
{
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
}

.mh-mini__off
{
  padding: 3px 9px;
  border: 2px solid var(--mh-edge);
  border-radius: 8px;
  background: #fff;
  color: var(--mh-slate);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.mh-mini__off.is-on
{
  border-color: var(--mh-slate);
  background: var(--mh-slate);
  color: #fff;
}

.mh-mini__bar
{
  display: grid;
  grid-template-columns: repeat(10, 16px);
  gap: 2px;
  padding: 2px;
  border: 2px solid var(--mh-edge);
  border-radius: 8px;
  background: #fff;
}

.mh-mini__bar i
{
  display: block;
  height: 14px;
  border-radius: 2px;
  background: #e9eef6;
}

.mh-mini__bar i.on:nth-child(1) { background: #a9d622; }
.mh-mini__bar i.on:nth-child(2) { background: #b6d521; }
.mh-mini__bar i.on:nth-child(3) { background: #c3d320; }
.mh-mini__bar i.on:nth-child(4) { background: #d0cf1f; }
.mh-mini__bar i.on:nth-child(5) { background: #dcc81e; }
.mh-mini__bar i.on:nth-child(6) { background: #e5bd1d; }

@media only screen and (max-width: 860px)
{
  .mh-grow
  {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
  }

  .mh-grow__intro
  {
    text-align: center;
  }

  .mh-grow__intro p
  {
    max-width: none;
  }

  .mh .mh-grow__img
  {
    max-width: 280px;
    margin: 20px auto 0;
  }
}

@media only screen and (max-width: 520px)
{
  .mh .mh-path__step
  {
    padding: 18px 16px 18px 70px;
  }

  .mh-path__step:before
  {
    left: 14px;
  }

  .mh-path:before
  {
    left: 33px;
  }

  .mh-mini__bar
  {
    grid-template-columns: repeat(10, 13px);
  }
}

/* ---- the foot: the same links as before ---- */
.mh-foot
{
  background: var(--mh-tint);
  border-top: 1px solid var(--mh-line);
  color: var(--mh-slate);
  font-size: 15px;
}

.mh-foot__grid
{
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  padding-top: 44px;
  padding-bottom: 36px;
}

.mh-foot__about p
{
  max-width: 300px;
  margin: 0 0 14px;
}

.mh .mh-foot__title
{
  margin: 0 0 12px;
  color: var(--mh-navy);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.mh .mh-foot__link
{
  color: var(--mh-slate);
  text-decoration: none;
}

.mh-foot__col .mh-foot__link
{
  display: block;
  padding: 5px 0;
}

.mh .mh-foot__link:hover
{
  color: var(--mh-blue);
  text-decoration: underline;
}

.mh-foot__bottom
{
  padding: 16px 0;
  border-top: 1px solid var(--mh-line);
  font-size: 14px;
}

/* ---- narrower: the three steps one under another ---- */
@media only screen and (max-width: 980px)
{
  .mh-steps
  {
    grid-template-columns: 1fr;
  }

  .mh .mh-step
  {
    padding: 20px 20px 18px;
    border-top: 1px solid var(--mh-line);
    border-left: 0;
  }

  .mh .mh-step:first-child
  {
    border-top: 0;
  }

  .mh-chars
  {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
  }

  .mh-char, .mh-char:nth-child(4)
  {
    grid-column: auto;
  }

  .mh .mh-char__box img
  {
    height: 120px;
  }

  .mh-subjects
  {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .mh-split
  {
    gap: 28px;
  }
}

@media only screen and (max-width: 700px)
{
  .mh
  {
    font-size: 16px;
  }

  .mh-wrap
  {
    padding: 0 14px;
  }

  .mh-logo img
  {
    width: 190px;
  }

  .mh-hero
  {
    padding-top: 22px;
  }

  .mh .mh-hero__title
  {
    margin-bottom: 20px;
  }

  .mh-setup
  {
    border-radius: 20px;
  }

  .mh .mh-step
  {
    padding: 18px 16px 16px;
  }

  .mh .mh-char__box img
  {
    height: 84px;
  }

  .mh-char__name
  {
    font-size: 12px;
  }

  .mh-go
  {
    padding: 16px 16px 18px;
  }

  .mh-go__btns
  {
    flex: 1 1 100%;
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .mh .mh-start
  {
    width: 100%;
    min-width: 0;
  }

  .mh-emailbox
  {
    flex-basis: 100%;
    max-width: none;
  }

  .mh-band
  {
    padding: 44px 0;
  }

  .mh-split
  {
    grid-template-columns: 1fr;
  }

  .mh-split--flip .mh-split__img
  {
    order: -1;
  }

  .mh .mh-split__img
  {
    max-width: 320px;
  }

  .mh-split__text
  {
    max-width: none;
    text-align: center;
  }

  .mh .mh-topics
  {
    justify-content: center;
  }

  .mh-subjects
  {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .mh-features
  {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .mh-foot__grid
  {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding-top: 32px;
  }

  .mh-foot__about
  {
    grid-column: 1 / -1;
  }
}

/* ==== the "All Games" page (includes/all-games-uk.inc) ==== */
.ag-hero
{
  padding: 24px 0 30px;
}

.mh .ag-back
{
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 700;
}

.mh .ag-back a
{
  color: var(--mh-blue-dark);
  text-decoration: none;
  text-transform: capitalize;
}

.mh .ag-back a:before
{
  content: "\2039\00a0";
}

.mh .ag-back a:hover
{
  text-decoration: underline;
}

.mh .ag-title
{
  margin: 0;
  color: var(--mh-navy);
  font-size: clamp(32px, 4.2vw, 48px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.026em;
}

.mh .ag-intro
{
  max-width: 640px;
  margin: 12px 0 0;
  color: var(--mh-ink);
  font-size: 18px;
}

/* the link to the progress page (progress/default.asp), under the intro of All Games */
.mh .ag-progress
{
  margin: 16px 0 0;
}

.mh .ag-progress a
{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 6px 20px 6px 16px;
  border: 2px solid var(--mh-blue);
  border-radius: 999px;
  background: #fff;
  color: var(--mh-blue);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.15;
  text-decoration: none;
}

.mh .ag-progress a:hover
{
  background: #eef3fc;
}

.mh .ag-progress svg
{
  flex: none;
  width: 20px;
  height: 20px;
  fill: #ffc233;
  stroke: #d99a00;
  stroke-width: 3;
  stroke-linejoin: round;
}

.ag-body
{
  padding: 28px 0 64px;
  background: var(--mh-tint);
}

.ag-cols
{
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: start;
  gap: 28px;
}

/* Multi Select: a switch and what it does */
.ag-multi
{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-bottom: 16px;
  padding: 14px 18px;
  border: 1px solid var(--mh-line);
  border-radius: 16px;
  background: #fff;
}

.mh .ag-multi__switch
{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--mh-navy);
  font: inherit;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
}

.ag-multi__switch[aria-pressed="true"] .mh-switch__track
{
  background: var(--mh-lime-dark);
}

.ag-multi__switch[aria-pressed="true"] .mh-switch__track:after
{
  transform: translateX(20px);
}

.ag-multi__text
{
  color: var(--mh-slate);
  font-size: 15px;
}

/* the groups of games: a card each, the big ones the full width, the two small ones side by side */
.ag-groups
{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 16px;
}

.ag-group
{
  padding: 18px 20px 20px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(31, 51, 80, .07);
}

.ag-group--wide
{
  grid-column: 1 / -1;
}

.mh .ag-group__title
{
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  color: var(--mh-navy);
  font-size: 21px;
  font-weight: 800;
  line-height: 1.2;
}

.ag-group__title .mh-range__ico
{
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  font-size: 19px;
}

.mh .ag-sub
{
  margin: 14px 0 8px;
  color: var(--mh-slate);
  font-size: 14px;
  font-weight: 700;
}

.mh .ag-group__title + .ag-sub
{
  margin-top: 0;
}

.mh .ag-list
{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mh .ag-list li
{
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mh .ag-game
{
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 6px 16px;
  border: 1px solid var(--mh-edge);
  border-radius: 999px;
  background: #fff;
  color: var(--mh-navy);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}

.mh .ag-game:hover
{
  border-color: var(--mh-blue);
  background: #e8f0fc;
  color: var(--mh-blue-dark);
}

/* a game that is not in the list of games yet: with Multi Select on it is greyed and has no tick box */
.mh.is-multi .ag-game--new
{
  border-style: dashed;
  opacity: .55;
  cursor: not-allowed;
}

.is-multi .ag-game.ag-game--new:before
{
  display: none;
}

.ag-group__title .mh-range__ico
{
  white-space: nowrap;
}

/* with Multi Select on, every game has a tick box and a press ticks it */
.is-multi .ag-game:before
{
  content: "";
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 0 8px 0 -4px;
  border: 2px solid var(--mh-edge);
  border-radius: 5px;
  background: #fff;
}

.mh.is-multi .ag-game.is-chosen
{
  border-color: var(--mh-lime-dark);
  background: #f4fae6;
  color: var(--mh-navy);
}

.is-multi .ag-game.is-chosen:before
{
  border-color: var(--mh-lime-dark);
  background: var(--mh-lime) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.5l2.6 2.6L10 3.4' fill='none' stroke='%231f3350' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px 12px no-repeat;
}

.mh .ag-plain
{
  padding: 0 4px;
  color: var(--mh-slate);
  text-decoration: none;
}

/* the settings, in a card that stays in view beside the games */
.ag-side
{
  position: sticky;
  top: 16px;
}

.ag-settings
{
  padding: 18px 20px 20px;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--mh-shadow);
}

.ag-settings__title
{
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--mh-navy);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
  list-style: none;
  cursor: pointer;
}

.ag-settings__title::-webkit-details-marker
{
  display: none;
}

.ag-settings__title:after
{
  content: "";
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  margin-right: 4px;
  border-right: 2.5px solid var(--mh-blue);
  border-bottom: 2.5px solid var(--mh-blue);
  transform: rotate(45deg);
  transition: transform .15s ease;
}

.ag-settings[open] .ag-settings__title:after
{
  transform: rotate(-135deg);
}

.mh .ag-settings__note
{
  margin: 6px 0 2px;
  color: var(--mh-slate);
  font-size: 14px;
  line-height: 1.4;
}

.mh .ag-settings__label
{
  margin: 16px 0 6px;
}

.mh .ag-chars .mh-char__box img
{
  height: 84px;
}

.ag-speed, .mh .ag-sounds
{
  margin-top: 16px;
}

.ag-settings__foot
{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 18px;
}

.mh .ag-update
{
  min-height: 46px;
  cursor: pointer;
  font-family: inherit;
}

.ag-saved
{
  color: var(--mh-slate);
  font-size: 14px;
  font-weight: 700;
}

.ag-saved.is-ok
{
  color: #3f6600;
}

.ag-saved.is-bad
{
  color: #b42318;
}

/* the bar of a multi game, at the foot of the window while Multi Select is on */
.ag-mixbar
{
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 20;
  padding: 12px 0;
  border-top: 1px solid var(--mh-line);
  background: #fff;
  box-shadow: 0 -8px 24px rgba(31, 51, 80, .14);
}

.ag-mixbar__in
{
  display: flex;
  align-items: center;
  gap: 16px;
}

.ag-mixbar__what
{
  flex: 1 1 auto;
  min-width: 0;
}

.mh .ag-mixbar__title
{
  margin: 0;
  color: var(--mh-navy);
  font-size: 16px;
  font-weight: 800;
}

.ag-mixbar__title span
{
  display: inline-block;
  margin-left: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  background: #f4fae6;
  color: #3f6600;
  font-size: 14px;
}

.ag-mixbar__list
{
  overflow: hidden;
  color: var(--mh-slate);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ag-mixbar__form
{
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
  margin: 0;
}

.mh .ag-mixbar__clear
{
  min-height: 50px;
  padding: 6px 18px;
  cursor: pointer;
  font-family: inherit;
}

.mh .ag-mixbar__go
{
  min-width: 0;
  min-height: 50px;
  padding: 6px 24px;
  box-shadow: 0 4px 0 var(--mh-lime-dark);
  font-size: 18px;
}

.mh .ag-mixbar__go[disabled]
{
  box-shadow: none;
  opacity: .5;
  cursor: not-allowed;
}

.mh--games.is-multi
{
  padding-bottom: 88px;
}

@media only screen and (max-width: 980px)
{
  .ag-cols
  {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  /* the settings come first, folded away (the script closes them) */
  .ag-side
  {
    position: static;
    order: -1;
  }

  .mh .ag-chars .mh-char__box img
  {
    height: 96px;
  }
}

@media only screen and (max-width: 700px)
{
  .ag-body
  {
    padding: 16px 0 44px;
  }

  .ag-groups
  {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .ag-group
  {
    padding: 16px 14px 16px;
  }

  .mh .ag-game
  {
    padding: 6px 13px;
    font-size: 15px;
  }

  .ag-mixbar__in
  {
    flex-wrap: wrap;
    gap: 8px;
  }

  .ag-mixbar__form
  {
    flex: 1 1 100%;
  }

  .mh .ag-mixbar__go
  {
    flex: 1 1 auto;
  }

  .mh--games.is-multi
  {
    padding-bottom: 132px;
  }

  .mh .ag-chars .mh-char__box img
  {
    height: 84px;
  }
}
