/* =========================================================
   UMT (unimixedtutor.com)
   Light theme. White paper, navy ink, one blue taken from
   the lion. UI in Schibsted Grotesk; worksheet content in
   STIX Two Text, the typeface of real maths papers.
   ========================================================= */

:root {
  /* Colour */
  --paper: #ffffff;
  --canvas: #f4f6fa;
  --canvas-2: #eceff5;
  --ink: #0f1b33;
  --ink-2: #4a5672;
  --ink-3: #7b869e;
  --rule: #e4e9f2;
  --rule-strong: #d3dae7;
  --blue: #1f5bd8;
  --blue-bright: #2e6bea;
  --blue-deep: #143e9e;
  --blue-tint: #e8f0ff;
  --blue-tint-2: #d6e4ff;
  --amber-ink: #8a5a00;
  --amber-tint: #fff3d6;
  --green-ink: #17663a;
  --green-tint: #e3f6ea;
  --red-ink: #b42318;

  /* Type */
  --font-ui: "Schibsted Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-paper: "STIX Two Text", "Times New Roman", serif;

  /* Elevation: layered shadows, a hairline ring, light falling from above */
  --ring: 0 0 0 1px rgba(16, 32, 72, 0.065);
  --e1: var(--ring), 0 1px 1px rgba(16, 32, 72, 0.03), 0 2px 3px -1px rgba(16, 32, 72, 0.04),
    0 4px 8px -4px rgba(16, 32, 72, 0.05);
  --e2: var(--ring), 0 1px 1px rgba(16, 32, 72, 0.025), 0 2px 2px -1px rgba(16, 32, 72, 0.03),
    0 6px 8px -4px rgba(16, 32, 72, 0.04), 0 14px 20px -8px rgba(16, 32, 72, 0.06),
    0 28px 40px -20px rgba(20, 62, 158, 0.1);
  --e3: var(--ring), 0 1px 1px rgba(16, 32, 72, 0.03), 0 3px 4px -2px rgba(16, 32, 72, 0.04),
    0 10px 14px -6px rgba(16, 32, 72, 0.06), 0 24px 32px -12px rgba(16, 32, 72, 0.08),
    0 44px 64px -28px rgba(20, 62, 158, 0.2);
  --e4: var(--ring), 0 2px 2px rgba(16, 32, 72, 0.03), 0 6px 8px -4px rgba(16, 32, 72, 0.05),
    0 16px 24px -8px rgba(16, 32, 72, 0.08), 0 40px 56px -20px rgba(16, 32, 72, 0.12),
    0 72px 110px -40px rgba(20, 62, 158, 0.26);

  /* Radius: nested elements are concentric (inner = outer − gap) */
  --r-panel: 22px;
  --r-card: 14px;
  --r-control: 10px;
  --r-pill: 999px;

  /* Motion */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);

  /* Layout */
  --max: 1160px;
  --gutter: clamp(18px, 4vw, 40px);
  --header-h: 68px;
}

@view-transition {
  navigation: auto;
}
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 220ms;
  animation-timing-function: var(--ease-out);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.55;
  font-feature-settings: "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 700;
  text-wrap: balance;
}
h1 {
  font-size: clamp(2.3rem, 4.4vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
}
h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
}
h3 {
  font-size: 1.15rem;
  line-height: 1.25;
  letter-spacing: -0.012em;
}

p {
  margin: 0;
  text-wrap: pretty;
}

.num {
  font-variant-numeric: tabular-nums;
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection {
  background: var(--blue-tint-2);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 8px 14px;
  border-radius: var(--r-control);
  transition: transform 160ms var(--ease-out);
}
.skip-link:focus {
  transform: translateY(72px);
}

/* ---------- Links ---------- */
.text-link {
  color: var(--blue);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
  text-decoration-color: color-mix(in srgb, var(--blue) 35%, transparent);
  transition: text-decoration-color 200ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .text-link:hover {
    text-decoration-color: var(--blue);
  }
}

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 20px;
  border: 0;
  border-radius: var(--r-control);
  font-weight: 600;
  font-size: 0.97rem;
  letter-spacing: -0.005em;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 140ms var(--ease-out);
}
.btn:active {
  transform: scale(0.97) translateY(0.5px);
}
.btn i {
  font-size: 1.15rem;
}
.btn-primary {
  color: #fff;
  background: linear-gradient(180deg, var(--blue-bright) 0%, var(--blue) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), inset 0 -1px 0 rgba(0, 0, 0, 0.14),
    0 0 0 1px var(--blue-deep), 0 1px 2px rgba(20, 62, 158, 0.3), 0 6px 14px -4px rgba(31, 91, 216, 0.45);
}
.btn-secondary {
  color: var(--ink);
  background: linear-gradient(180deg, #ffffff 0%, #f8f9fc 100%);
  box-shadow: inset 0 -1px 0 rgba(15, 27, 51, 0.05), var(--ring), 0 1px 2px rgba(15, 27, 51, 0.06),
    0 3px 8px -3px rgba(15, 27, 51, 0.1);
}
.btn-quiet {
  color: var(--ink-2);
  background: transparent;
  padding-inline: 12px;
}
/* Hover brightens via an overlay (opacity is cheap to animate) */
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.12);
  opacity: 0;
  transition: opacity 180ms ease;
  pointer-events: none;
}
.btn-secondary::after,
.btn-quiet::after {
  background: rgba(15, 27, 51, 0.04);
}
@media (hover: hover) and (pointer: fine) {
  .btn:hover::after {
    opacity: 1;
  }
}

/* ---------- Header: a floating glass bar ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding-top: 12px;
}
.header-shell {
  --shell-r: 18px;
  --shell-pad: 6px;
  position: relative;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 var(--shell-pad) 0 12px;
  border-radius: var(--shell-r);
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 0 0 1px rgba(15, 27, 51, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 1px 2px rgba(15, 27, 51, 0.04);
}
.header-shell::after {
  /* deeper shadow fades in once the page scrolls under the bar */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  box-shadow: 0 10px 30px -10px rgba(15, 27, 51, 0.18), 0 2px 6px -2px rgba(15, 27, 51, 0.06);
  opacity: 0;
  transition: opacity 260ms ease;
  pointer-events: none;
}
.site-header.scrolled .header-shell::after {
  opacity: 1;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(180deg, #eef4ff, var(--blue-tint-2));
  box-shadow: inset 0 0 0 1px rgba(31, 91, 216, 0.14), inset 0 1px 0 #fff;
  display: grid;
  place-items: center;
  overflow: hidden;
  transition: transform 220ms var(--ease-out);
}
.brand-mark img {
  width: 36px;
  height: 36px;
  transform: translateY(4px);
}
@media (hover: hover) and (pointer: fine) {
  .brand:hover .brand-mark {
    transform: rotate(-6deg) scale(1.04);
  }
}
.header-right {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav-indicator {
  /* one highlight that slides to whichever link is hovered */
  position: absolute;
  top: 0;
  left: 0;
  height: 40px;
  border-radius: 11px;
  background: rgba(15, 27, 51, 0.05);
  opacity: 0;
  pointer-events: none;
  transition: transform 260ms var(--ease-out), width 260ms var(--ease-out), opacity 160ms ease;
}
.nav a {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0 14px;
  border-radius: 11px;
  color: var(--ink-2);
  font-size: 0.94rem;
  font-weight: 550;
  transition: color 160ms ease;
}
.nav a[aria-current="page"] {
  color: var(--ink);
}
.nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--blue);
  translate: -50% 0;
}
@media (hover: hover) and (pointer: fine) {
  .nav a:hover {
    color: var(--ink);
  }
}
.header-cta {
  height: 46px;
  padding: 0 18px;
  border-radius: max(0px, calc(var(--shell-r) - 8px));
  font-size: 0.93rem;
}
.menu-btn {
  display: none;
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: max(0px, calc(var(--shell-r) - 8px));
}
.menu-btn svg {
  width: 22px;
  height: 22px;
}
.menu-btn line {
  transition: transform 220ms var(--ease-out), opacity 160ms ease;
  transform-origin: 12px 12px;
}
.menu-btn[aria-expanded="true"] .l1 {
  transform: translateY(5px) rotate(45deg);
}
.menu-btn[aria-expanded="true"] .l2 {
  opacity: 0;
}
.menu-btn[aria-expanded="true"] .l3 {
  transform: translateY(-5px) rotate(-45deg);
}

@media (max-width: 860px) {
  .menu-btn {
    display: inline-flex;
  }
  .nav-indicator {
    display: none;
  }
  .nav {
    --menu-pad: 6px;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: min(260px, calc(100vw - 2 * var(--gutter)));
    flex-direction: column;
    align-items: stretch;
    padding: var(--menu-pad);
    background: var(--paper);
    border-radius: var(--r-card);
    box-shadow: var(--e3);
    transform-origin: top right;
    opacity: 0;
    transform: scale(0.95);
    visibility: hidden;
    transition: opacity 160ms var(--ease-out), transform 200ms var(--ease-out), visibility 0s 200ms;
  }
  .nav.open {
    opacity: 1;
    transform: none;
    visibility: visible;
    transition: opacity 160ms var(--ease-out), transform 200ms var(--ease-out), visibility 0s;
  }
  .nav a {
    height: 46px;
    border-radius: max(0px, calc(var(--r-card) - var(--menu-pad)));
  }
  .nav a[aria-current="page"] {
    background: var(--blue-tint);
  }
  .nav a[aria-current="page"]::after {
    display: none;
  }
}
@media (max-width: 520px) {
  .header-cta {
    display: none;
  }
  .brand {
    font-size: 0.96rem;
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-block: clamp(28px, 4.5vw, 56px) clamp(40px, 5vw, 64px);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
}
.hero h1 {
  max-width: 13.5em;
}
.hero-sub {
  margin-top: 22px;
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  color: var(--ink-2);
  max-width: 31em;
}
.hero-actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.hero .search {
  margin-top: 22px;
}
.search-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-2);
}

/* Hero load: one orchestrated sequence, nothing else on the page auto-animates */
.intro {
  animation: intro 620ms var(--ease-out) both;
  animation-delay: calc(var(--d, 0) * 70ms + 60ms);
}
@keyframes intro {
  from {
    opacity: 0;
    transform: translateY(12px);
    filter: blur(4px);
  }
}

/* ---------- Desk: paper stack + mascot ---------- */
.desk {
  position: relative;
  aspect-ratio: 1 / 0.92;
  width: 100%;
  max-width: 520px;
  justify-self: end;
}
.sheet-fan {
  position: absolute;
  inset: 20% 34% 6% 5%;
}
.fan-sheet {
  position: absolute;
  inset: 0;
  background: var(--paper);
  border-radius: 6px;
  box-shadow: var(--e2);
  padding: 9% 9% 0;
  font-family: var(--font-paper);
  color: var(--ink);
  transform-origin: 50% 90%;
  animation: deal 760ms var(--ease-out) both;
}
.fan-sheet:nth-child(1) {
  transform: rotate(-9deg) translate(-4%, 3%);
  animation-delay: 120ms;
  --from: rotate(-2deg);
}
.fan-sheet:nth-child(2) {
  transform: rotate(-3deg) translate(1%, 1%);
  animation-delay: 200ms;
  --from: rotate(0deg);
}
.fan-sheet:nth-child(3) {
  transform: rotate(3deg) translate(5%, -1%);
  box-shadow: var(--e3);
  animation-delay: 280ms;
  --from: rotate(1deg);
}
@keyframes deal {
  from {
    opacity: 0;
    transform: var(--from) translateY(18px) scale(0.97);
  }
}
.fan-sheet .sheet-head {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-ui);
  font-size: clamp(0.6rem, 1.1vw, 0.72rem);
  color: var(--ink-3);
  padding-bottom: 6%;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 7%;
}
.fan-sheet ol {
  margin: 0;
  padding-left: 1.3em;
  display: grid;
  gap: 1em;
  font-size: clamp(0.72rem, 1.25vw, 0.92rem);
  line-height: 1.45;
}
.fan-sheet li::marker {
  font-weight: 700;
}
.fan-sheet .lines {
  margin-top: 1.4em;
  height: 26%;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 calc(1.6em - 1px),
    var(--rule) calc(1.6em - 1px) 1.6em
  );
}
.desk-mascot {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 58%;
}
.desk-mascot .bubble {
  position: absolute;
  bottom: calc(100% + 14px);
  right: 8%;
  width: max-content;
  max-width: min(300px, 78vw);
  transform-origin: 70% 100%;
}
.desk-mascot .bubble::after {
  left: auto;
  right: 28%;
}

/* ---------- Mascot ---------- */
.mascot {
  position: relative;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.mascot::before {
  /* ground shadow */
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: -1%;
  height: 7%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(15, 27, 51, 0.22), transparent);
}
.mascot img {
  position: relative;
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
  transform-origin: 50% 95%;
  transition: transform 160ms var(--ease-out);
}
.mascot:active img {
  transform: scale(0.97);
}
.mascot.pop-in img {
  animation: pop-in 700ms var(--ease-out) both;
  animation-delay: 380ms;
}
@keyframes pop-in {
  0% {
    opacity: 0;
    transform: translateY(14px) scale(0.94);
  }
  60% {
    opacity: 1;
    transform: translateY(-3px) scale(1.01);
  }
  100% {
    transform: none;
  }
}
.mascot.wiggle img {
  animation: wiggle 560ms var(--ease-out);
}
@keyframes wiggle {
  0% { transform: rotate(0); }
  22% { transform: rotate(-5deg) scale(1.02); }
  50% { transform: rotate(3.5deg); }
  76% { transform: rotate(-1.2deg); }
  100% { transform: rotate(0); }
}
.mascot-hint {
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--ink-3);
}

/* ---------- Speech bubble ---------- */
.bubble {
  position: relative;
  z-index: 3;
  margin: 0;
  padding: 12px 16px;
  border-radius: 16px;
  background: var(--paper);
  box-shadow: var(--e3);
  font-weight: 650;
  font-size: 1rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  text-align: center;
  opacity: 0;
  transform: scale(0.9) translateY(6px);
  transition: opacity 220ms var(--ease-out), transform 360ms var(--ease-out);
}
.bubble.show {
  opacity: 1;
  transform: none;
}
.bubble::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 14px;
  height: 14px;
  background: var(--paper);
  transform: translateX(-50%) rotate(45deg);
  border-bottom-right-radius: 3px;
  box-shadow: 1px 1px 0 rgba(15, 27, 51, 0.07);
}
.bubble-text {
  display: block;
  transition: opacity 160ms ease, filter 160ms ease, transform 160ms ease;
}
.bubble-text.swapping {
  opacity: 0;
  filter: blur(3px);
  transform: translateY(2px);
}
.bubble .hl {
  color: var(--blue);
}

/* ---------- Search ---------- */
.search {
  --search-r: 14px;
  --search-pad: 6px;
  position: relative;
  margin-top: 30px;
  max-width: 520px;
}
.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 58px;
  padding: 0 var(--search-pad) 0 18px;
  border-radius: var(--search-r);
  background: var(--paper);
  box-shadow: var(--e2);
  transition: box-shadow 200ms ease;
}
.search-field:focus-within {
  box-shadow: 0 0 0 1px var(--blue), 0 0 0 4px var(--blue-tint), 0 12px 24px -8px rgba(20, 62, 158, 0.18);
}
.search-field > i {
  color: var(--ink-3);
  font-size: 1.25rem;
}
.search-field input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  outline: none;
  font-size: 1rem;
}
.search-field input::placeholder {
  color: var(--ink-3);
}
.search-field input::-webkit-search-cancel-button {
  display: none;
}
.kbd {
  display: grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  margin-right: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-3);
  background: var(--canvas);
  border-radius: 7px;
  box-shadow: inset 0 -1px 0 var(--rule-strong);
}
@media (hover: none) {
  .kbd {
    display: none;
  }
}
.search-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 20;
  padding: var(--search-pad);
  border-radius: var(--search-r);
  background: var(--paper);
  box-shadow: var(--e4);
  max-height: 360px;
  overflow-y: auto;
  transform-origin: top center;
  opacity: 0;
  transform: scale(0.97) translateY(-4px);
  visibility: hidden;
  transition: opacity 150ms var(--ease-out), transform 180ms var(--ease-out), visibility 0s 180ms;
}
.search-results.open {
  opacity: 1;
  transform: none;
  visibility: visible;
  transition: opacity 150ms var(--ease-out), transform 180ms var(--ease-out), visibility 0s;
}
.result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: max(0px, calc(var(--search-r) - var(--search-pad)));
}
.result[aria-selected="true"] {
  background: var(--blue-tint);
}
@media (hover: hover) and (pointer: fine) {
  .result:hover {
    background: var(--canvas);
  }
}
.result-code {
  flex: none;
  min-width: 58px;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--blue);
  font-variant-numeric: tabular-nums;
}
.result-title {
  font-weight: 600;
  font-size: 0.95rem;
  display: block;
}
.result-meta {
  font-size: 0.82rem;
  color: var(--ink-3);
  display: block;
}
.result-empty {
  padding: 14px 12px;
  color: var(--ink-2);
  font-size: 0.93rem;
}

@media (max-width: 880px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .desk {
    order: -1;
    justify-self: center;
    max-width: 420px;
    margin-top: 36px;
  }
}

/* ---------- Sections ---------- */
.section {
  padding-block: clamp(44px, 6vw, 80px);
}
.section-canvas {
  background: var(--canvas);
}
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 8px 24px;
  margin-bottom: clamp(22px, 3vw, 32px);
}
.section-head > div {
  max-width: 40em;
}
.section-head p {
  margin-top: 12px;
  color: var(--ink-2);
  font-size: 1.06rem;
}

/* ---------- Try a question ---------- */
.try {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}
.try-copy p {
  margin-top: 14px;
  color: var(--ink-2);
  font-size: 1.06rem;
  max-width: 28em;
}
.try-cta {
  margin-top: 22px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.try-sheets {
  position: relative;
  display: grid;
  gap: 14px;
}
.paper-sheet {
  position: relative;
  background: var(--paper);
  border-radius: 8px;
  box-shadow: var(--e3);
  padding: clamp(22px, 3vw, 32px);
  font-family: var(--font-paper);
}
.paper-sheet-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--ink-3);
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--rule);
}
.paper-sheet p {
  font-size: 1.12rem;
  line-height: 1.6;
}
.paper-sheet .q-num {
  font-weight: 700;
  margin-right: 0.35em;
}
.answer-sheet {
  background: #fbfcff;
}
.answer-cover {
  position: absolute;
  inset: 52px 0 0;
  z-index: 2;
  display: grid;
  place-items: center;
  pointer-events: none;
  transition: opacity 220ms ease;
}
.answer-cover span {
  padding: 10px 16px;
  border-radius: var(--r-pill);
  background: var(--paper);
  box-shadow: var(--e2);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink-2);
}
.answer-sheet.open .answer-cover {
  opacity: 0;
}
.answer-sheet .paper-sheet-head span:first-child {
  color: var(--green-ink);
  font-weight: 600;
}
.steps-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
  font-size: 1.06rem;
  line-height: 1.6;
}
.steps-list li {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  opacity: 0.45;
  filter: blur(5px);
  transition: opacity 300ms ease, filter 360ms var(--ease-out);
  user-select: none;
}
.answer-sheet.open .steps-list li {
  opacity: 1;
  filter: none;
  user-select: auto;
  transition-delay: calc(var(--i) * 90ms + 60ms);
}
.steps-list .step-name {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-3);
  padding-top: 3px;
}
.qed {
  float: right;
}
@media (max-width: 880px) {
  .try {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 480px) {
  .steps-list li {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* ---------- Module index (contents page) ---------- */
.index {
  columns: 2 420px;
  column-gap: clamp(28px, 4vw, 56px);
}
.index-group {
  break-inside: avoid;
  margin-bottom: clamp(22px, 3vw, 32px);
}
.index-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1.5px solid var(--ink);
}
.index-group-head h3 {
  font-size: 1.3rem;
}
.index-group-head a.text-link {
  font-size: 0.92rem;
}
.index-group-head .count {
  color: var(--ink-3);
  font-size: 0.9rem;
}
.index-rows {
  margin: 0;
  padding: 0;
  list-style: none;
}
.index-row {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 16px 12px;
  margin-inline: -12px;
  border-radius: var(--r-control);
  border-bottom: 1px solid var(--rule);
  transition: background-color 160ms ease;
}
.index-rows li:last-child .index-row {
  border-bottom-color: transparent;
}
.index-row:active {
  background: var(--blue-tint);
}
.index-code {
  flex: none;
  width: 64px;
  font-weight: 700;
  color: var(--blue);
  font-variant-numeric: tabular-nums;
}
.index-title {
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.index-leader {
  flex: 1;
  min-width: 24px;
  border-bottom: 1.5px dotted var(--rule-strong);
  transform: translateY(-4px);
}
.index-status {
  flex: none;
  font-size: 0.9rem;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.index-go {
  flex: none;
  align-self: center;
  color: var(--ink-3);
  font-size: 1.1rem;
  transition: transform 200ms var(--ease-out), color 160ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .index-row:hover {
    background: var(--canvas);
  }
  .index-row:hover .index-go {
    color: var(--blue);
    transform: translateX(3px);
  }
}
@media (max-width: 560px) {
  .index-row {
    flex-wrap: wrap;
    row-gap: 2px;
  }
  .index-code {
    width: auto;
  }
  .index-leader {
    display: none;
  }
  .index-title {
    flex-basis: 100%;
    order: 3;
  }
  .index-status {
    margin-left: auto;
  }
  .index-go {
    display: none;
  }
}

/* Status pills (real status only) */
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}
.status-soon {
  color: var(--amber-ink);
  background: var(--amber-tint);
}
.status-live {
  color: var(--green-ink);
  background: var(--green-tint);
}
.status-new {
  color: var(--blue-deep);
  background: var(--blue-tint);
}

/* ---------- New this week ---------- */
.new-list {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
}
.new-item {
  --card-pad: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: var(--card-pad);
  border-radius: var(--r-card);
  background: var(--paper);
  box-shadow: var(--e2);
  transition: transform 200ms var(--ease-out);
}
.new-item:active {
  transform: scale(0.98);
}
.new-item .grow {
  flex: 1;
  min-width: 0;
}
.new-item .title {
  display: block;
  font-weight: 650;
}
.new-item .meta {
  display: block;
  color: var(--ink-3);
  font-size: 0.86rem;
}

/* ---------- Page header ---------- */
.page-head {
  padding-block: clamp(30px, 5vw, 64px) clamp(26px, 4vw, 40px);
}
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--ink-3);
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}
.crumbs a {
  color: var(--ink-2);
  transition: color 160ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .crumbs a:hover {
    color: var(--blue);
  }
}
.crumbs i {
  font-size: 0.9rem;
}
.page-kicker {
  font-weight: 700;
  color: var(--blue);
  font-variant-numeric: tabular-nums;
  margin-bottom: 8px;
  font-size: 1.05rem;
}
.page-head h1 {
  font-size: clamp(2.2rem, 4.6vw, 3.4rem);
}
.page-head .lede {
  margin-top: 14px;
  color: var(--ink-2);
  font-size: 1.12rem;
  max-width: 38em;
}
.page-meta {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  color: var(--ink-3);
  font-size: 0.9rem;
}

/* ---------- Module page: worksheet pairs ---------- */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 26px;
}
.mini-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 14px;
  border-radius: var(--r-control);
  background: var(--paper);
  box-shadow: var(--e1);
  min-width: min(100%, 300px);
  transition: box-shadow 200ms ease;
}
.mini-search:focus-within {
  box-shadow: 0 0 0 1px var(--blue), 0 0 0 4px var(--blue-tint);
}
.mini-search i {
  color: var(--ink-3);
}
.mini-search input {
  border: 0;
  outline: none;
  background: transparent;
  flex: 1;
  min-width: 0;
  font-size: 0.97rem;
}
.toolbar-count {
  color: var(--ink-3);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}
.col-heads,
.pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}
.col-heads {
  padding: 0 4px 10px;
  margin-bottom: 4px;
  font-weight: 650;
  font-size: 0.95rem;
  color: var(--ink-2);
  border-bottom: 1px solid var(--rule);
}
.topics {
  display: grid;
}
.topic {
  padding-block: 22px;
  border-bottom: 1px solid var(--rule);
}
.topic:last-child {
  border-bottom: 0;
}
.topic.flash .sheet-face {
  animation: flash 1400ms var(--ease-out);
}
@keyframes flash {
  0%,
  40% {
    box-shadow: 0 0 0 2px var(--blue), 0 0 0 6px var(--blue-tint), var(--e2);
  }
}
.topic-name {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
  font-weight: 650;
  font-size: 1.08rem;
  letter-spacing: -0.012em;
}
.topic-name .n {
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

/* A worksheet card looks like the sheet it downloads: a page with two
   pages tucked behind it. On hover the stack fans out slightly. */
.sheet {
  --card-pad: 16px;
  position: relative;
  isolation: isolate;
  display: block;
  border-radius: var(--r-card);
  -webkit-tap-highlight-color: transparent;
  transition: transform 220ms var(--ease-out);
}
.sheet-face {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 84px;
  padding: var(--card-pad);
  border-radius: inherit;
  background: var(--paper);
  box-shadow: var(--e2);
  text-align: left;
}
.sheet-back {
  position: absolute;
  z-index: 1;
  inset: 0;
  border-radius: inherit;
  background: var(--paper);
  box-shadow: var(--e1);
  transition: transform 260ms var(--ease-out);
}
.sheet-back.b1 {
  transform: translateY(4px) scale(0.98);
}
.sheet-back.b2 {
  z-index: 0;
  transform: translateY(8px) scale(0.955);
}
.sheet-lift {
  /* a deeper shadow layer that fades in, so hover never animates box-shadow */
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  box-shadow: var(--e4);
  opacity: 0;
  transition: opacity 220ms ease;
  pointer-events: none;
}
a.sheet:active {
  transform: scale(0.98);
}
@media (hover: hover) and (pointer: fine) {
  a.sheet:hover {
    transform: translateY(-3px);
  }
  a.sheet:hover .b1 {
    transform: translateY(6px) rotate(-1.2deg) scale(0.985);
  }
  a.sheet:hover .b2 {
    transform: translateY(11px) rotate(1.4deg) scale(0.96);
  }
  a.sheet:hover .sheet-lift {
    opacity: 1;
  }
  a.sheet:hover .sheet-dl {
    color: #fff;
  }
  a.sheet:hover .sheet-dl::before {
    opacity: 1;
  }
}
.thumb {
  flex: none;
  width: 40px;
  height: 52px;
  border-radius: max(0px, calc(var(--r-card) - var(--card-pad) - 6px));
  background: var(--paper);
  box-shadow: var(--ring), 0 2px 4px -1px rgba(15, 27, 51, 0.08);
  padding: 8px 7px;
  display: grid;
  align-content: start;
  gap: 4px;
}
.thumb span {
  display: block;
  height: 3px;
  border-radius: 2px;
  background: var(--rule-strong);
}
.thumb span:first-child {
  width: 60%;
  background: var(--blue);
}
.thumb span:nth-child(3) {
  width: 80%;
}
.thumb span:nth-child(5) {
  width: 70%;
}
.sheet.answers .thumb span:first-child {
  background: var(--green-ink);
}
.sheet-body {
  flex: 1;
  min-width: 0;
}
.sheet-title {
  display: block;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.sheet-meta {
  display: block;
  font-size: 0.86rem;
  color: var(--ink-3);
}
.sheet-dl {
  position: relative;
  isolation: isolate;
  flex: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: max(0px, calc(var(--r-card) - var(--card-pad) - 2px));
  color: var(--blue);
  background: var(--blue-tint);
  font-size: 1.2rem;
  transition: color 180ms ease;
}
.sheet-dl::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(180deg, var(--blue-bright), var(--blue));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 4px 10px -3px rgba(31, 91, 216, 0.5);
  opacity: 0;
  transition: opacity 180ms ease;
}
.sheet-dl i {
  grid-area: 1 / 1;
  transition: opacity 180ms ease, transform 220ms var(--ease-out), filter 180ms ease;
}
.sheet-dl .ti-check {
  opacity: 0;
  transform: scale(0.6);
  filter: blur(2px);
}
.sheet.done .sheet-dl {
  color: #fff;
}
.sheet.done .sheet-dl::before {
  opacity: 1;
  background: linear-gradient(180deg, #23a35a, var(--green-ink));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 4px 10px -3px rgba(23, 102, 58, 0.45);
}
.sheet.done .sheet-dl .ti-download {
  opacity: 0;
  transform: scale(0.6) translateY(4px);
  filter: blur(2px);
}
.sheet.done .sheet-dl .ti-check {
  opacity: 1;
  transform: none;
  filter: none;
}
.sheet.waiting .sheet-face {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--rule-strong);
}
.sheet.waiting .thumb {
  opacity: 0.5;
}
.sheet.waiting .sheet-meta {
  color: var(--amber-ink);
}
.no-match {
  padding: 28px;
  text-align: center;
  color: var(--ink-2);
}
.module-foot {
  margin-top: 36px;
  color: var(--ink-2);
}

@media (max-width: 600px) {
  .col-heads,
  .pair {
    gap: 10px;
  }
  .sheet {
    --card-pad: 12px;
  }
  .sheet-face {
    gap: 10px;
    min-height: 76px;
  }
  .thumb {
    display: none;
  }
  .sheet-title {
    font-size: 0.93rem;
  }
  .sheet-meta {
    font-size: 0.8rem;
  }
  .sheet-dl {
    width: 34px;
    height: 34px;
    font-size: 1.05rem;
  }
}
@media (max-width: 400px) {
  .sheet-dl {
    display: none;
  }
}

/* ---------- Empty state (sad lion) ---------- */
.empty {
  --pad: clamp(22px, 4vw, 48px);
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  align-items: center;
  gap: clamp(20px, 4vw, 56px);
  padding: var(--pad);
  border-radius: var(--r-panel);
  background: var(--paper);
  box-shadow: var(--e3);
}
.empty-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 64px;
}
.empty-stage .bubble {
  position: absolute;
  top: 0;
  left: 50%;
  translate: -50% 0;
  width: max-content;
  max-width: 250px;
  transform-origin: 50% 100%;
}
.empty-stage .mascot {
  width: min(100%, 230px);
}
.empty h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
}
.empty .lede {
  color: var(--ink-2);
  margin-top: 12px;
  font-size: 1.08rem;
  max-width: 30em;
}
.empty-actions {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.btn .swap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: opacity 160ms ease, filter 160ms ease;
}
.btn .swap.swapping {
  opacity: 0;
  filter: blur(3px);
}
@media (max-width: 760px) {
  .empty {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .empty .lede {
    margin-inline: auto;
  }
  .empty-actions {
    justify-content: center;
  }
}

/* Request form, revealed in place */
.request {
  --req-r: max(0px, calc(var(--r-panel) - 10px));
  margin-top: 24px;
  padding: 20px;
  border-radius: var(--req-r);
  background: var(--canvas);
  text-align: left;
  transform-origin: top center;
  transition: opacity 220ms var(--ease-out), transform 280ms var(--ease-out), display 280ms allow-discrete;
}
.request[hidden] {
  display: none;
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
}
@starting-style {
  .request:not([hidden]) {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
}
.request h3 {
  font-size: 1.05rem;
}
.request > p {
  color: var(--ink-2);
  font-size: 0.93rem;
  margin-top: 4px;
}

/* ---------- Forms ---------- */
.form {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}
.field {
  display: grid;
  gap: 6px;
  align-content: start;
}
.field label {
  font-size: 0.92rem;
  font-weight: 600;
}
.field .opt {
  color: var(--ink-3);
  font-weight: 400;
}
.input,
.select,
.textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 0;
  border-radius: var(--r-control);
  background: var(--paper);
  box-shadow: inset 0 1px 2px rgba(15, 27, 51, 0.05), 0 0 0 1px var(--rule-strong);
  font-size: 1rem;
  outline: none;
  transition: box-shadow 180ms ease;
}
.textarea {
  min-height: 116px;
  resize: vertical;
  line-height: 1.5;
}
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%234a5672' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}
.input:focus,
.select:focus,
.textarea:focus {
  box-shadow: 0 0 0 1px var(--blue), 0 0 0 4px var(--blue-tint);
}
.input::placeholder,
.textarea::placeholder {
  color: var(--ink-3);
}
.field-error {
  color: var(--red-ink);
  font-size: 0.85rem;
  font-weight: 500;
}
.shake {
  animation: shake 360ms var(--ease-out);
}
@keyframes shake {
  20% { transform: translateX(-5px); }
  45% { transform: translateX(4px); }
  70% { transform: translateX(-2px); }
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}
@media (max-width: 560px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}
.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}
.form-status {
  font-size: 0.92rem;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  gap: 8px;
}
.form-status.ok {
  color: var(--green-ink);
}
.form-status.err {
  color: var(--red-ink);
}
.hp {
  position: absolute;
  left: -9999px;
}
.panel {
  padding: clamp(22px, 4vw, 40px);
  border-radius: var(--r-panel);
  background: var(--paper);
  box-shadow: var(--e3);
}
.report-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}
.report-aside {
  color: var(--ink-2);
  display: grid;
  gap: 14px;
  padding-top: 8px;
}
.report-aside h2 {
  font-size: 1.15rem;
  color: var(--ink);
}
@media (max-width: 860px) {
  .report-layout {
    grid-template-columns: 1fr;
  }
}

/* ---------- Segmented filter (all modules) ---------- */
.segmented {
  --seg-pad: 4px;
  position: relative;
  display: inline-flex;
  flex-wrap: wrap;
  padding: var(--seg-pad);
  border-radius: 12px;
  background: var(--canvas-2);
  box-shadow: inset 0 1px 2px rgba(15, 27, 51, 0.06);
}
.segmented-pill {
  position: absolute;
  top: var(--seg-pad);
  left: 0;
  height: calc(100% - 2 * var(--seg-pad));
  border-radius: max(0px, calc(12px - var(--seg-pad)));
  background: var(--paper);
  box-shadow: var(--e1), 0 2px 6px -2px rgba(15, 27, 51, 0.12);
  transition: transform 300ms var(--ease-drawer), width 300ms var(--ease-drawer);
  pointer-events: none;
}
.seg {
  position: relative;
  z-index: 1;
  height: 38px;
  padding: 0 16px;
  border: 0;
  background: transparent;
  border-radius: max(0px, calc(12px - var(--seg-pad)));
  color: var(--ink-2);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 180ms ease, transform 140ms var(--ease-out);
}
.seg:active {
  transform: scale(0.97);
}
.seg[aria-pressed="true"] {
  color: var(--ink);
}

/* ---------- Prose (about) ---------- */
.prose {
  max-width: 40em;
  display: grid;
  gap: 18px;
  color: var(--ink-2);
  font-size: 1.08rem;
  line-height: 1.65;
}
.prose h2 {
  color: var(--ink);
  font-size: 1.5rem;
  margin-top: 18px;
}
.prose strong {
  color: var(--ink);
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: clamp(24px, 4vw, 48px);
  background: var(--canvas);
  padding-block: 40px 48px;
  color: var(--ink-2);
  font-size: 0.92rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.footer-brand strong {
  color: var(--ink);
  display: block;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
}
.footer-links a {
  transition: color 160ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .footer-links a:hover {
    color: var(--blue);
  }
}
body.has-canvas-end .site-footer {
  margin-top: 0;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 14px;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 12px 32px -8px rgba(15, 27, 51, 0.45);
  font-size: 0.93rem;
  font-weight: 600;
  opacity: 0;
  translate: -50% 0;
  transform: translateY(16px) scale(0.98);
  pointer-events: none;
  transition: opacity 200ms var(--ease-out), transform 300ms var(--ease-out);
}
.toast.show {
  opacity: 1;
  transform: none;
}
.toast i {
  font-size: 1.15rem;
  color: #8fd8a8;
}

/* ---------- Reduced motion: keep fades, drop movement ---------- */
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none;
  }
  .intro,
  .fan-sheet,
  .mascot.pop-in img {
    animation: fade 240ms ease both;
  }
  .mascot.wiggle img,
  .topic.flash .sheet-face,
  .shake {
    animation: none;
  }
  .bubble,
  .search-results,
  .nav,
  .toast,
  .request {
    transform: none !important;
  }
  .btn:active,
  a.sheet:active,
  a.sheet:hover,
  .new-item:active,
  .seg:active,
  .mascot:active img {
    transform: none;
  }
  .sheet-back {
    transition: none;
  }
  .steps-list li {
    filter: none;
    transition: opacity 200ms ease;
  }
  .segmented-pill {
    transition: none;
  }
}
@keyframes fade {
  from {
    opacity: 0;
  }
}
@media (prefers-reduced-transparency: reduce) {
  .site-header {
    background: var(--paper);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* ---------- Pointing lion: leans toward the action it points at ----------
   The entrance animation runs on the <img>; the lean is a transition on the
   wrapper. Keeping them on separate elements means the two never fight over
   `transform`, so the lean always glides from wherever the lion currently is,
   even if you hover on and off quickly. */
.pointer {
  --lean-ease: cubic-bezier(0.22, 1, 0.36, 1);
  flex: none;
  display: block;
  width: var(--lion-w, 120px);
  pointer-events: none;
  user-select: none;
  translate: 0 0;
  rotate: 0deg;
  scale: 1;
  transition: translate 700ms var(--lean-ease), rotate 760ms var(--lean-ease), scale 700ms var(--lean-ease);
  will-change: translate, rotate;
}
.pointer.left {
  transform-origin: 60% 92%;
}
.pointer.right {
  transform-origin: 40% 92%;
}
.pointer.lean {
  transition-duration: 560ms, 620ms, 560ms;
  scale: 1.015;
}
.pointer.lean.left {
  translate: -4px -1px;
  rotate: -2deg;
}
.pointer.lean.right {
  translate: 4px -1px;
  rotate: 2deg;
}
.pointer img {
  width: 100%;
  height: auto;
}
.pointer.pop img {
  animation: pointer-in 700ms var(--lean-ease) both;
}
@keyframes pointer-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.95);
  }
}
.pointer.waiting img {
  opacity: 0;
}

/* ---------- Page header with an action and a pointing lion ---------- */
.page-head.has-lion {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 0 24px;
  padding-bottom: 8px;
}
.page-head.has-lion .pointer {
  --lion-w: clamp(110px, 13vw, 160px);
  margin-bottom: -2px;
}
.head-actions {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 640px) {
  .page-head.has-lion .pointer {
    display: none;
  }
}

/* ---------- Report aside & about CTA ---------- */
.aside-lion {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.aside-lion .pointer {
  --lion-w: 130px;
}
.aside-lion p {
  font-size: 0.93rem;
}
.cta-row {
  margin-top: 28px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 18px 24px 18px 8px;
  border-radius: var(--r-panel);
  background: var(--canvas);
}
.cta-row .pointer {
  --lion-w: 110px;
  margin: -24px 0 -18px;
}
.cta-row p {
  flex: 1;
  color: var(--ink-2);
}
.cta-row strong {
  display: block;
  color: var(--ink);
  font-size: 1.1rem;
}
@media (max-width: 560px) {
  .cta-row {
    flex-wrap: wrap;
    padding: 18px;
  }
  .cta-row .pointer {
    display: none;
  }
}

/* ---------- Loading: the thinking lion, shown only if things are slow ---------- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--ink-2);
  font-weight: 600;
  opacity: 0;
  visibility: hidden;
  animation: loader-show 240ms var(--ease-out) 450ms forwards, loader-hide 1ms 8s forwards;
}
@keyframes loader-hide {
  to {
    opacity: 0;
    visibility: hidden;
  }
}
.loader img {
  width: 120px;
  height: auto;
  animation: ponder 1.6s ease-in-out infinite alternate;
  transform-origin: 50% 100%;
}
@keyframes loader-show {
  to {
    opacity: 1;
    visibility: visible;
  }
}
@keyframes ponder {
  from {
    transform: rotate(-2deg);
  }
  to {
    transform: rotate(2deg) translateY(-3px);
  }
}
.ready .loader {
  display: none;
}

/* ---------- Toast with lion and progress ---------- */
.toast {
  max-width: calc(100vw - 32px);
}
.toast-lion {
  width: 36px;
  height: 44px;
  margin: -8px 0 -6px -4px;
  object-fit: contain;
}
.toast-lion.think {
  animation: ponder 1.2s ease-in-out infinite alternate;
}
.toast-body {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.toast-bar {
  width: 180px;
  max-width: 100%;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.18);
  overflow: hidden;
}
.toast-bar span {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: inherit;
  background: #8fb6ff;
  transform-origin: left;
  transform: scaleX(var(--p, 0.08));
  transition: transform 200ms linear;
}
.toast-bar.indeterminate span {
  width: 40%;
  animation: slide-bar 1.1s var(--ease-in-out) infinite;
}
@keyframes slide-bar {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(250%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pointer.pop img {
    animation: fade 240ms ease both;
  }
  .pointer,
  .pointer.lean {
    translate: none;
    rotate: none;
    scale: none;
    transition: none;
  }
  .loader img,
  .toast-lion.think {
    animation: none;
  }
  .toast-bar.indeterminate span {
    animation: none;
    width: 100%;
    opacity: 0.6;
  }
  .nav-indicator,
  .brand-mark {
    transition: none;
  }
}

/* Modules page: the lion stands between the subject filter and search */
.toolbar .pointer {
  --lion-w: 92px;
  margin: -34px auto -14px 2px;
}
@media (max-width: 760px) {
  .toolbar .pointer {
    display: none;
  }
}
@media (max-width: 520px) {
  .hero-actions .btn {
    flex: 1 1 100%;
  }
}

/* =========================================================
   UMT additions: brand, universities, subjects, sheet sets
   ========================================================= */

/* Brand: the lion's head badge + UMT */
.brand-head {
  --badge: 40px;
  width: var(--badge);
  height: var(--badge);
  flex: none;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(31, 91, 216, 0.16), 0 2px 6px -2px rgba(20, 62, 158, 0.28);
  overflow: hidden;
  transition: transform 220ms var(--ease-out);
}
.brand-head img {
  width: 100%;
  height: 100%;
}
.brand-word {
  font-size: 1.32rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--ink);
}
@media (hover: hover) and (pointer: fine) {
  .brand:hover .brand-head {
    transform: rotate(-8deg) scale(1.05);
  }
}
.brand:active .brand-head {
  transform: scale(0.95);
}
.footer-brand .brand-head {
  --badge: 36px;
}
.footer-domain {
  font-weight: 500;
  color: var(--ink-3);
  margin-left: 4px;
}

/* University picker */
.uni-grid {
  --card-r: var(--r-panel);
  --card-pad: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 18px;
}
.uni-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: var(--card-pad) 22px var(--card-pad) var(--card-pad);
  border-radius: var(--card-r);
  background: var(--paper);
  box-shadow: var(--e2);
  transition: transform 220ms var(--ease-out), box-shadow 220ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  a.uni-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--e3);
  }
  a.uni-card:hover .uni-go {
    transform: translateX(3px);
    color: var(--blue);
  }
}
a.uni-card:active {
  transform: scale(0.985);
}
.uni-logo {
  --logo: 76px;
  width: var(--logo);
  height: var(--logo);
  flex: none;
  border-radius: max(0px, calc(var(--card-r, var(--r-panel)) - var(--card-pad, 14px)));
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--canvas);
  box-shadow: inset 0 0 0 1px rgba(15, 27, 51, 0.06);
}
.uni-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.uni-logo-soon {
  color: var(--ink-3);
  font-size: 1.8rem;
  background: var(--canvas);
}
.uni-monogram {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--blue);
}
.uni-text {
  display: grid;
  gap: 4px;
  min-width: 0;
  flex: 1;
}
.uni-name {
  font-size: 1.16rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}
.uni-meta {
  color: var(--ink-3);
  font-size: 0.9rem;
}
.uni-go {
  color: var(--ink-3);
  font-size: 1.3rem;
  transition: transform 220ms var(--ease-out), color 160ms ease;
}
.uni-card-soon {
  background: transparent;
  box-shadow: none;
  outline: 1.5px dashed var(--rule-strong);
  outline-offset: -1.5px;
}

/* University page */
.uni-title {
  --card-r: 26px;
  --card-pad: 0px;
  display: flex;
  align-items: center;
  gap: 22px;
}
.uni-logo-lg {
  --logo: clamp(72px, 10vw, 96px);
  border-radius: 22px;
  box-shadow: var(--e2);
}
.uni-title .lede {
  margin-top: 8px;
}
.uni-search {
  max-width: 680px;
  margin-top: 30px;
}
.search-field-lg {
  height: 64px;
  font-size: 1.06rem;
}
.section-head.compact {
  margin-bottom: 20px;
}
.subject-grid {
  --card-r: var(--r-card);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
  gap: 14px;
}
.subject-card {
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 18px 18px 16px;
  border-radius: var(--card-r);
  background: var(--paper);
  box-shadow: var(--e1);
  transition: transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .subject-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--e2);
  }
}
.subject-card:active {
  transform: scale(0.98);
}
.subject-name {
  font-weight: 700;
  font-size: 1.06rem;
}
.subject-blurb {
  color: var(--ink-2);
  font-size: 0.93rem;
}
.subject-foot {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink-3);
  font-size: 0.86rem;
}
.kicker-uni {
  font-weight: 500;
  color: var(--ink-3);
  margin-left: 6px;
}

/* Several sheets per topic */
.sheet-stack {
  display: grid;
  gap: 14px;
}
.sheet-count {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-3);
}

/* Home sample sheet extras */
.paper-sheet .q-marks {
  color: var(--ink-3);
  font-family: var(--font-ui);
  font-size: 0.82em;
  margin-left: 4px;
}
.steps-list .mark {
  display: inline-block;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 5px;
  background: var(--blue-tint);
  color: var(--blue);
  font-family: var(--font-ui);
  font-size: 0.74em;
  font-weight: 700;
  vertical-align: 1px;
}

@media (max-width: 560px) {
  .uni-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .uni-card {
    gap: 14px;
  }
  .uni-logo {
    --logo: 60px;
  }
}

/* ---------- Homepage scroll reveals ----------
   Uses the individual `translate` property via an animation, so it never
   fights the cards' own hover `transform` transitions. */
.reveal {
  opacity: 0;
}
.reveal.in {
  animation: reveal-up 460ms var(--ease-out) both;
  animation-delay: calc(var(--r, 0) * 60ms);
}
@keyframes reveal-up {
  from {
    opacity: 0;
    translate: 0 14px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
  }
  .reveal.in {
    animation: none;
  }
}

/* The university picker sits straight under the hero, close enough to peek above the fold */
.hero + #universities {
  padding-top: clamp(8px, 1.5vw, 16px);
}

/* ---------- Hero entrance: the sheets fly in from far away ----------
   Each sheet starts deep in the distance (translateZ), tumbled and blurred,
   then rushes forward, overshoots slightly toward the viewer and settles into
   the fan. A light ring and a few sparks mark the landing, a shine sweeps the
   top sheet, then the lion bounds in and starts talking. Plays once on load. */
@media (prefers-reduced-motion: no-preference) {
  .sheet-fan {
    perspective: 1400px;
    perspective-origin: 50% 40%;
  }
  .fan-sheet {
    --fx: 0%; --fy: 0%; --frx: 0deg; --fry: 0deg; --frz: 0deg;
    transform: rotate(var(--rz)) translate(var(--tx), var(--ty));
    animation: fly-in 1250ms both;
    backface-visibility: hidden;
  }
  .fan-sheet:nth-child(1) {
    --rz: -9deg; --tx: -4%; --ty: 3%;
    --fx: -150%; --fy: -50%; --frx: 55deg; --fry: -65deg; --frz: -80deg;
    animation-delay: 140ms;
  }
  .fan-sheet:nth-child(2) {
    --rz: -3deg; --tx: 1%; --ty: 1%;
    --fx: 25%; --fy: -170%; --frx: 75deg; --fry: 15deg; --frz: 45deg;
    animation-delay: 320ms;
  }
  .fan-sheet:nth-child(3) {
    --rz: 3deg; --tx: 5%; --ty: -1%;
    --fx: 170%; --fy: 35%; --frx: 40deg; --fry: 75deg; --frz: 95deg;
    animation-delay: 500ms;
  }
  @keyframes fly-in {
    0% {
      opacity: 0;
      filter: blur(14px);
      transform: translate3d(var(--fx), var(--fy), -1900px) rotateX(var(--frx)) rotateY(var(--fry)) rotate(var(--frz)) rotate(var(--rz)) translate(var(--tx), var(--ty));
      animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
    }
    14% {
      opacity: 1;
    }
    76% {
      filter: blur(0);
      transform: translate3d(0, 0, 70px) rotateX(0deg) rotateY(0deg) rotate(0deg) rotate(var(--rz)) translate(var(--tx), var(--ty));
      animation-timing-function: cubic-bezier(0.45, 0, 0.2, 1);
    }
    100% {
      opacity: 1;
      filter: blur(0);
      transform: translate3d(0, 0, 0) rotateX(0deg) rotateY(0deg) rotate(0deg) rotate(var(--rz)) translate(var(--tx), var(--ty));
    }
  }

  /* Shine sweeping across the top sheet once it lands */
  .fan-sheet:nth-child(3) {
    overflow: hidden;
  }
  .fan-sheet:nth-child(3)::after {
    content: "";
    position: absolute;
    inset: -10% -60%;
    background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.9) 50%, transparent 62%);
    mix-blend-mode: soft-light;
    translate: -100% 0;
    animation: shine 900ms cubic-bezier(0.45, 0, 0.2, 1) 1500ms both;
    pointer-events: none;
  }
  @keyframes shine {
    from { translate: -100% 0; opacity: 1; }
    to { translate: 100% 0; opacity: 1; }
  }

  /* Landing ring behind the stack */
  .desk::before {
    content: "";
    position: absolute;
    left: 30%;
    top: 52%;
    width: 64%;
    aspect-ratio: 1;
    border-radius: 50%;
    border: 2px solid var(--blue-tint-2);
    background: radial-gradient(closest-side, rgba(46, 107, 234, 0.12), transparent);
    translate: -50% -50%;
    scale: 0.3;
    opacity: 0;
    animation: ring 1000ms cubic-bezier(0.16, 1, 0.3, 1) 1320ms both;
    pointer-events: none;
  }
  @keyframes ring {
    0% { scale: 0.3; opacity: 0; }
    20% { opacity: 1; }
    100% { scale: 1.5; opacity: 0; }
  }

  /* Sparks thrown out on landing */
  .burst {
    position: absolute;
    left: 30%;
    top: 52%;
    pointer-events: none;
  }
  .burst i {
    position: absolute;
    width: 9px;
    height: 9px;
    margin: -4.5px;
    border-radius: 2px;
    background: var(--blue-bright);
    rotate: 45deg;
    opacity: 0;
    animation: spark 900ms cubic-bezier(0.16, 1, 0.3, 1) 1340ms both;
  }
  .burst i:nth-child(odd) {
    background: #8fb4ff;
    width: 6px;
    height: 6px;
    margin: -3px;
  }
  .burst i:nth-child(3n) {
    animation-delay: 1400ms;
  }
  @keyframes spark {
    0% { translate: 0 0; scale: 0.2; opacity: 0; }
    15% { opacity: 1; }
    100% { translate: var(--x) var(--y); scale: 1; opacity: 0; }
  }

  /* The lion bounds in after the sheets land */
  .desk-mascot .mascot.pop-in img {
    animation: lion-in 900ms both;
    animation-delay: 1150ms;
  }
  @keyframes lion-in {
    0% {
      opacity: 0;
      transform: translateY(60px) scale(0.55) rotate(-8deg);
      animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
    }
    55% {
      opacity: 1;
      transform: translateY(-14px) scale(1.04) rotate(3deg);
      animation-timing-function: cubic-bezier(0.45, 0, 0.2, 1);
    }
    78% {
      transform: translateY(3px) scale(0.99) rotate(-1deg);
    }
    100% {
      transform: none;
    }
  }
}
@media (max-width: 860px) {
  @keyframes spark-sm {
    0% { translate: 0 0; scale: 0.2; opacity: 0; }
    15% { opacity: 1; }
    100% { translate: calc(var(--x) * 0.6) calc(var(--y) * 0.6); scale: 1; opacity: 0; }
  }
}
@media (max-width: 860px) and (prefers-reduced-motion: no-preference) {
  .burst i { animation-name: spark-sm; }
}
@media (prefers-reduced-motion: reduce) {
  .burst { display: none; }
}

/* ---------- Module page: each topic is its own panel ----------
   Concentric corners: the sheet cards inside sit --topic-pad in from the
   panel edge, so their radius is the panel radius minus that gap. */
.topics {
  gap: 18px;
}
.topic {
  --topic-r: var(--r-panel);
  --topic-pad: 10px;
  padding: 0 var(--topic-pad) var(--topic-pad);
  border: 0;
  border-radius: var(--topic-r);
  background: var(--canvas);
  box-shadow: inset 0 0 0 1px var(--rule);
  scroll-margin-top: calc(var(--header-h) + 20px);
}
.topic .sheet {
  --r-card: max(0px, calc(var(--topic-r) - var(--topic-pad)));
}
.topic-name {
  margin: 0;
  padding: 16px calc(14px - var(--topic-pad)) 14px;
  gap: 12px;
  align-items: center;
  flex-wrap: nowrap;
}
.topic-name .topic-title {
  flex: 1;
  min-width: 0;
}
.topic-name .n {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--paper);
  box-shadow: var(--e1);
  color: var(--blue);
  font-size: 0.85rem;
  font-weight: 700;
}
.topic-name .status,
.topic-name .sheet-count {
  flex: none;
}
.topic .sheet-stack {
  gap: 10px;
}
.col-heads {
  padding-inline: 10px;
}
.more-sheets {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 12px 14px;
  border-radius: max(0px, calc(var(--topic-r) - var(--topic-pad)));
  border: 1.5px dashed var(--rule-strong);
  color: var(--ink-2);
  font-size: 0.88rem;
  line-height: 1.4;
}
.more-sheets strong {
  color: var(--ink);
  font-weight: 650;
}
.more-sheets .ti {
  flex: none;
  font-size: 1.15rem;
  color: var(--blue);
}

/* University tag after a module code, e.g. MA138 (Warwick) */
.uni-tag {
  font-weight: 600;
  color: var(--ink-3);
}
.index-code {
  width: auto;
  min-width: 140px;
}
.page-kicker .uni-tag {
  color: inherit;
  opacity: 0.75;
}
@media (prefers-reduced-motion: no-preference) {
  .desk-mascot .mascot.pop-in::before {
    animation: lion-shadow 700ms cubic-bezier(0.16, 1, 0.3, 1) 1250ms both;
  }
  @keyframes lion-shadow {
    from { opacity: 0; scale: 0.4 1; }
  }
}

/* ---------- Anchor jumps land below the floating header ---------- */
html {
  scroll-padding-top: calc(var(--header-h) + 40px);
}
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* ---------- Buttons, refined ----------
   Primary: a soft top sheen over a deep blue gradient, a crisp darker edge and
   a blue-tinted, layered drop shadow. Secondary: paper white with a hairline
   edge. Both lift 1px on hover; press still scales down. */
.btn {
  transition: transform 160ms var(--ease-out), box-shadow 200ms var(--ease-out);
}
.btn-primary {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0) 52%),
    linear-gradient(180deg, #3a77f0 0%, #1f5bd8 62%, #1a50c4 100%);
  text-shadow: 0 1px 0 rgba(10, 30, 90, 0.25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 -1px 0 rgba(8, 28, 86, 0.25),
    0 0 0 1px #1848b8, 0 1px 1px rgba(20, 62, 158, 0.25), 0 2px 4px -1px rgba(20, 62, 158, 0.25),
    0 8px 16px -6px rgba(31, 91, 216, 0.45), 0 18px 32px -14px rgba(31, 91, 216, 0.4);
}
.btn-secondary {
  background: linear-gradient(180deg, #ffffff 0%, #fafbfd 100%);
  box-shadow: inset 0 -1px 0 rgba(16, 32, 72, 0.05), 0 0 0 1px rgba(16, 32, 72, 0.09),
    0 1px 1px rgba(16, 32, 72, 0.04), 0 2px 4px -1px rgba(16, 32, 72, 0.05),
    0 6px 12px -6px rgba(16, 32, 72, 0.1);
}
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 -1px 0 rgba(8, 28, 86, 0.25),
      0 0 0 1px #1848b8, 0 1px 1px rgba(20, 62, 158, 0.25), 0 3px 6px -1px rgba(20, 62, 158, 0.28),
      0 12px 22px -8px rgba(31, 91, 216, 0.5), 0 26px 40px -16px rgba(31, 91, 216, 0.45);
  }
  .btn-secondary:hover {
    transform: translateY(-1px);
    box-shadow: inset 0 -1px 0 rgba(16, 32, 72, 0.05), 0 0 0 1px rgba(16, 32, 72, 0.12),
      0 1px 1px rgba(16, 32, 72, 0.04), 0 4px 8px -2px rgba(16, 32, 72, 0.07),
      0 12px 20px -10px rgba(16, 32, 72, 0.14);
  }
}
.btn:active,
.btn-primary:active,
.btn-secondary:active {
  transform: scale(0.97);
}

/* ---------- University cards: blue ---------- */
a.uni-card {
  color: #fff;
  background: radial-gradient(120% 140% at 0% 0%, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0) 55%),
    linear-gradient(150deg, #3a77f0 0%, #1f5bd8 55%, #1a4cbd 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 0 0 1px #1848b8,
    0 1px 2px rgba(20, 62, 158, 0.2), 0 8px 16px -6px rgba(31, 91, 216, 0.35),
    0 24px 40px -18px rgba(31, 91, 216, 0.45);
}
a.uni-card .uni-meta {
  color: rgba(255, 255, 255, 0.78);
}
a.uni-card .uni-go {
  color: rgba(255, 255, 255, 0.8);
}
a.uni-card .uni-logo {
  background: #fff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35), 0 4px 10px -4px rgba(8, 28, 86, 0.45);
}
@media (hover: hover) and (pointer: fine) {
  a.uni-card:hover {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 0 0 1px #1848b8,
      0 2px 4px rgba(20, 62, 158, 0.22), 0 14px 24px -8px rgba(31, 91, 216, 0.42),
      0 36px 56px -22px rgba(31, 91, 216, 0.5);
  }
  a.uni-card:hover .uni-go {
    color: #fff;
  }
}

/* ---------- Energy flowing into the main hero button ----------
   Comets of blue light travel along curved paths from around the hero and
   converge on "Choose your university" together; a soft ring pulses as they
   arrive. One 5s loop, paused off screen, off for reduced motion. */
.hero-grid {
  position: relative;
  z-index: 1;
}
.energy {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
  opacity: 0;
  transition: opacity 600ms ease;
}
.energy.on {
  opacity: 1;
}
.energy path {
  fill: none;
  stroke-linecap: round;
  stroke-dasharray: 0.14 2;
  stroke-dashoffset: 0.14;
  animation: energy-flow 5s cubic-bezier(0.5, 0, 0.75, 0.45) infinite;
  animation-delay: var(--delay, 0s);
}
.energy .glow {
  stroke: rgba(46, 107, 234, 0.16);
  stroke-width: 9;
}
.energy .core {
  stroke: url(#energy-grad);
  stroke-width: 2.25;
}
@keyframes energy-flow {
  0% {
    stroke-dashoffset: 0.14;
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  58% {
    stroke-dashoffset: -1;
    opacity: 1;
  }
  59%,
  100% {
    stroke-dashoffset: -1;
    opacity: 0;
  }
}
.attract-ring {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 5px rgba(46, 107, 234, 0.3), 0 0 22px 4px rgba(46, 107, 234, 0.35);
  opacity: 0;
  pointer-events: none;
  animation: attract 5s var(--ease-out) infinite;
  animation-delay: var(--delay, 0s);
}
@keyframes attract {
  0%,
  56% {
    opacity: 0;
    transform: scale(0.98);
  }
  61% {
    opacity: 1;
    transform: scale(1);
  }
  90%,
  100% {
    opacity: 0;
    transform: scale(1.14, 1.3);
  }
}
.hero.energy-paused .energy path,
.hero.energy-paused .attract-ring {
  animation-play-state: paused;
}
@media (prefers-reduced-motion: reduce) {
  .energy,
  .attract-ring {
    display: none;
  }
}
/* Stronger streams, and a band of light that runs through the button as they arrive */
.energy path {
  stroke-dasharray: 0.18 2;
  stroke-dashoffset: 0.18;
}
.energy .glow {
  stroke: rgba(46, 107, 234, 0.2);
  stroke-width: 12;
}
.energy .core {
  stroke-width: 3;
}
.attract-sheen {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
}
.attract-sheen::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 60%;
  background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, 0.38) 50%, transparent 100%);
  transform: translateX(-120%) skewX(-18deg);
  animation: sheen 5s var(--ease-in-out) infinite;
  animation-delay: var(--delay, 0s);
}
@keyframes sheen {
  0%,
  56% {
    transform: translateX(-120%) skewX(-18deg);
  }
  76%,
  100% {
    transform: translateX(260%) skewX(-18deg);
  }
}
.hero.energy-paused .attract-sheen::before {
  animation-play-state: paused;
}
@media (prefers-reduced-motion: reduce) {
  .attract-sheen {
    display: none;
  }
}
