@font-face {
  font-family: Inter;
  src: url("/fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Inter;
  src: url("/fonts/inter-latin-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: Nunito;
  src: url("/fonts/nunito-extra_bold.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: Nunito;
  src: url("/fonts/nunito-bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

/* The study tools live in the landing page's valley at dusk. The valley stays
   fixed behind the page, night falls over it as you scroll, and the content
   rides on a sheet that rises out of the meadow. Exam text is printed on
   squared notebook paper, the way students meet it on exam day. */
:root {
  color-scheme: dark;
  --dusk-900: #110f33;
  --dusk-800: #1a1848;
  --dusk-700: #23215c;
  --dusk-600: #2e2b73;
  --ink: #fffdf7;
  --ink-soft: rgb(255 253 247 / 0.78);
  --ink-faint: rgb(255 253 247 / 0.56);
  --line: rgb(255 253 247 / 0.12);
  --sky: #a9d8ff;
  --lime: #d4f29a;
  --sun: #ffb36b;
  --sun-deep: #f58a55;
  --rose: #ff8f9e;
  --paper: #fdfbf4;
  --paper-ink: #24224d;
  --paper-soft: #59577e;
  --paper-grid: rgb(72 112 196 / 0.11);
  --margin-red: rgb(226 82 92 / 0.55);
  --pen: #c8323f;
  --tint: #5b8cff;
  --spring: cubic-bezier(0.2, 1.3, 0.35, 1);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --display: Nunito, "Arial Rounded MT Bold", Inter, system-ui, sans-serif;
  --text: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Segoe UI Symbol", "Cambria Math", "Noto Sans Math", "STIX Two Math", sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "DejaVu Sans Mono", Menlo, Consolas, monospace;
  font-family: var(--text);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  color: var(--ink);
  background: var(--dusk-900);
}
* {
  box-sizing: border-box;
}
/* Components set their own display; hidden must still win. */
[hidden] {
  display: none !important;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100vh;
  font-size: 16.5px;
  line-height: 1.65;
  overflow-wrap: break-word;
  background: transparent;
}
img {
  max-width: 100%;
  height: auto;
}
a {
  color: var(--sky);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
a:hover {
  text-decoration-thickness: 2px;
}
:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 2px;
  border-radius: 8px;
}
::selection {
  background: var(--lime);
  color: var(--dusk-800);
}
h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 800;
  line-height: 1.15;
  margin: 0;
  text-wrap: balance;
}
h2 {
  font-size: clamp(1.45rem, 1.2rem + 0.8vw, 1.75rem);
  letter-spacing: -0.01em;
  margin: 52px 0 14px;
}
h3 {
  font-size: 1.15rem;
  margin: 30px 0 10px;
}
p {
  margin: 0 0 14px;
}
h2 a,
h3 a {
  color: inherit;
  text-decoration: none;
}
h2 a:hover,
h3 a:hover {
  text-decoration: underline;
  text-decoration-color: var(--sun);
}
.skip {
  position: absolute;
  left: -999px;
}
/* Under the glass bar, in line with its left end, whatever its height. */
.skip:focus {
  left: max(16px, 50% - 590px);
  top: calc(100% + 8px);
  z-index: 20;
  background: var(--dusk-800);
  padding: 8px 12px;
}

/* The valley */
/* As wide as the window, like the landing's scene: a classic scrollbar covers
   its right edge instead of shifting the picture. */
.valley {
  position: fixed;
  inset: 0 auto 0 0;
  width: 100vw;
  z-index: -1;
  overflow: hidden;
  /* valea.webp at 64 × 36, so a picture that arrives late only sharpens the scene. */
  background: url("data:image/webp;base64,UklGRvoBAABXRUJQVlA4IO4BAABwCwCdASpAACQAPt1apk0opSOiLVzLaRAbiWwAy2AAjCiMuBG1fU3tgOeO9D28170EwBEcQN5lGf3vbW5zymjAmPozRCfQbHbMPAeVN+fZ4/uuEIkSHMqXUre9GmQ6POpJ477AAP7QTD5/bJYyUo6xap8MzRSJGRXSp8S6loiuZcLJ7NUxR4NEa3xnodPR2oxLs09g3exx6MjVab3VENywHxcl2hAz+nv7MGAP9JlrQsWA++x3bux3Ojcu0L9V6ZH3HayWajSfguq8atLTp878i/pPDTrtvYVnZJS3WoLKKKjM1cZDxAvdEAfAjllXWnKXB+9wHpyN3lbInZatS3RGEyqQNxGTBGuwEOvF1fZWTBCe6TnNjtE0vHWqI1VelxRXvfl9Ja2D9eetNoceuhJqmJxbxnce4f0ou/i4w6/pTfyl7xsxb0L6/EVPwMawy5dvI7nYlVQ0aNBHgYl3c/W6NjWPlvFkk+fz7OdcwhLX/0Mwuh4ig5XTBrTIJ9c60LHeA8psTIikna43E2oPJYCG0xn7iZ4gpAeeU4tq+Chx/EJdLqBUpoYMtBH+h+chUDzGysiUZtlBj/p61cOzDEy6QHXxLdPtnSmOGNobK6hqTcGQh0CDXz4SzaP7bvsecbq0V8ZgFWTOMrXO/wAAAA==") 50% 70% / cover no-repeat #2c3060;
}
.valley-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 50% 70%;
  transform-origin: 50% 100%;
}
/* A soft evening haze at the top keeps the titles readable over the sunset. */
.valley::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgb(28 20 92 / 0.62) 0%, rgb(40 24 110 / 0.34) 30%, rgb(60 30 110 / 0.08) 52%, transparent 64%);
}
.dusk,
.stars,
.flies {
  position: absolute;
  inset: 0;
  z-index: 2;
}
.dusk {
  background: linear-gradient(180deg, #0e0c30 0%, #171447 50%, #10202a 100%);
  opacity: 0;
}
.stars {
  opacity: 0;
  background-image:
    radial-gradient(1.4px 1.4px at 12% 18%, #fff 50%, transparent 100%),
    radial-gradient(1px 1px at 27% 8%, #fff 50%, transparent 100%),
    radial-gradient(1.2px 1.2px at 43% 22%, #fff 50%, transparent 100%),
    radial-gradient(1px 1px at 58% 12%, #fff 50%, transparent 100%),
    radial-gradient(1.6px 1.6px at 71% 26%, #fff 50%, transparent 100%),
    radial-gradient(1px 1px at 86% 9%, #fff 50%, transparent 100%),
    radial-gradient(1.2px 1.2px at 94% 31%, #fff 50%, transparent 100%),
    radial-gradient(1px 1px at 6% 36%, #fff 50%, transparent 100%),
    radial-gradient(1.3px 1.3px at 35% 40%, #fff 50%, transparent 100%),
    radial-gradient(1px 1px at 64% 44%, #fff 50%, transparent 100%);
  background-size: 640px 420px;
}
/* Fireflies over the meadow. */
.flies i {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff6b8;
  box-shadow:
    0 0 6px 2px rgb(255 240 150 / 0.75),
    0 0 18px 6px rgb(255 220 120 / 0.25);
  opacity: 0;
  animation:
    fly var(--d, 11s) ease-in-out var(--w, 0s) infinite alternate,
    glow var(--g, 3.4s) ease-in-out var(--w, 0s) infinite;
}
.flies i:nth-child(1) { left: 6%; top: 62%; --d: 12s; --g: 3.1s; --w: -2s; }
.flies i:nth-child(2) { left: 14%; top: 78%; --d: 9s; --g: 4.2s; --w: -5s; }
.flies i:nth-child(3) { left: 24%; top: 56%; --d: 13s; --g: 2.8s; --w: -1s; }
.flies i:nth-child(4) { left: 38%; top: 70%; --d: 10s; --g: 3.7s; --w: -7s; }
.flies i:nth-child(5) { left: 55%; top: 60%; --d: 14s; --g: 3s; --w: -3s; }
.flies i:nth-child(6) { left: 66%; top: 82%; --d: 11s; --g: 4.6s; --w: -9s; }
.flies i:nth-child(7) { left: 78%; top: 58%; --d: 12.5s; --g: 3.3s; --w: -4s; }
.flies i:nth-child(8) { left: 88%; top: 74%; --d: 9.5s; --g: 2.9s; --w: -6s; }
.flies i:nth-child(9) { left: 95%; top: 64%; --d: 13.5s; --g: 4s; --w: -8s; }
@keyframes fly {
  0% { transform: translate(0, 0); }
  33% { transform: translate(26px, -34px); }
  66% { transform: translate(-18px, -58px); }
  100% { transform: translate(14px, -92px); }
}
@keyframes glow {
  0%, 100% { opacity: 0; }
  45%, 60% { opacity: 0.95; }
}
/* Night falls as you read: the valley drifts back, darkens and the stars come out. */
@supports (animation-timeline: scroll()) {
  .valley-art {
    animation: drift linear both;
    animation-timeline: scroll(root);
    animation-range: 0 110vh;
  }
  .dusk {
    animation: nightfall linear both;
    animation-timeline: scroll(root);
    animation-range: 8vh 150vh;
  }
  .stars {
    animation: starlight linear both;
    animation-timeline: scroll(root);
    animation-range: 30vh 170vh;
  }
}
@keyframes drift {
  to { transform: scale(1.08); }
}
@keyframes nightfall {
  to { opacity: 0.74; }
}
@keyframes starlight {
  to { opacity: 0.9; }
}

/* Header: a glass bar floating in the sky, as on the landing page */
.top {
  position: relative;
  z-index: 3;
  padding: 14px 16px 0;
  view-transition-name: top;
}
.bar {
  display: flex;
  align-items: center;
  gap: 6px 22px;
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: 7px 8px 7px 22px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgb(255 255 255 / 0.16), rgb(255 255 255 / 0.06));
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  backdrop-filter: blur(18px) saturate(1.6);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.3),
    inset 0 0 0 1px rgb(255 255 255 / 0.1),
    0 14px 34px -14px rgb(16 10 48 / 0.6);
}
.brand {
  flex: none;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.5rem;
  line-height: 1;
  letter-spacing: -0.01em;
  text-decoration: none;
  background: linear-gradient(180deg, #d4efff 0%, #7cc1ff 48%, #3f8cf5 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 0 #2348b8) drop-shadow(0 6px 10px rgb(20 30 120 / 0.35));
}
/* The tools strip scrolls sideways when it does not fit; its edges fade only
   where more tools hide (--fl and --fr are set by signup.js). */
.bar nav {
  min-width: 0;
  margin: -4px -4px -4px auto;
  padding: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--fl, 0px), #000 calc(100% - var(--fr, 0px)), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 var(--fl, 0px), #000 calc(100% - var(--fr, 0px)), transparent 100%);
}
.bar nav::-webkit-scrollbar {
  display: none;
}
/* Below about 820px the tools no longer fit beside the name: the bar stacks,
   the name above and the tools in a strip below. */
@media (max-width: 820px) {
  .bar {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px 6px 6px;
    border-radius: 26px;
  }
  .brand {
    align-self: flex-start;
    margin-left: 14px;
    font-size: 1.4rem;
  }
  .bar nav {
    margin: -4px;
  }
  .nav {
    width: max-content;
  }
}
.nav {
  display: flex;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav a {
  display: block;
  padding: 8px 13px;
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  white-space: nowrap;
  transition: background-color 0.2s;
}
.nav a:hover {
  background: rgb(255 255 255 / 0.14);
}
.nav a[aria-current="page"] {
  background: var(--ink);
  color: #2a2470;
}

/* Hero: the title written in the evening sky */
.hero {
  --hero-w: min(100% - 32px, 1160px);
  position: relative;
  z-index: 1;
  width: var(--hero-w);
  margin: 0 auto;
  padding: clamp(36px, 7vh, 72px) 0 clamp(64px, 9vh, 96px);
  /* The valley's characters stand along its left edge: the globe reaches 420 px
     into the 1920 px picture, which covers the window. A window wider than 16:9
     crops the picture's top, so the characters rise level with the text. The
     title starts at least 16 px clear of them (in line with the sheet's text on a
     full HD screen), and in line with the sheet where they are out of the way. */
  padding-left: max(0px, 50vw - 0.2888 * max(100vw, 177.78vh) + 26.5px - (100% - var(--hero-w)) / 2);
}
.hero.narrow {
  --hero-w: min(100% - 32px, 860px);
}
.tall .hero {
  min-height: min(46vh, 460px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: clamp(72px, 12vh, 132px);
}
.hero h1 {
  font-size: clamp(2.3rem, 1.3rem + 3.6vw, 4.1rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  max-width: 17ch;
  text-shadow:
    0 2px 0 rgb(40 24 120 / 0.35),
    0 6px 34px rgb(30 16 100 / 0.55);
}
.slim .hero h1 {
  font-size: clamp(2rem, 1.3rem + 2.6vw, 3.2rem);
  max-width: 22ch;
}
.hero .lede {
  margin: 16px 0 0;
  max-width: 54ch;
  font-size: 1.1rem;
  line-height: 1.55;
  color: rgb(255 253 247 / 0.94);
  text-shadow: 0 1px 18px rgb(30 16 100 / 0.7);
}
.crumbs {
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 2px 8px;
  font-size: 0.9rem;
  color: rgb(255 253 247 / 0.86);
  text-shadow: 0 1px 12px rgb(30 16 100 / 0.7);
}
.crumbs li:not(:last-child)::after {
  content: "/";
  margin-left: 8px;
  opacity: 0.55;
}
.crumbs a {
  color: inherit;
}

/* The sheet */
.sheet {
  position: relative;
  z-index: 2;
  width: min(100% - 32px, 860px);
  margin: 0 auto 72px;
  padding: 46px clamp(20px, 4.5vw, 52px) 44px;
  border-radius: 34px;
  background:
    radial-gradient(120% 60% at 50% 0%, color-mix(in srgb, var(--tint) 16%, transparent), transparent 70%),
    linear-gradient(180deg, #221f5a 0, var(--dusk-800) 260px);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.16),
    0 -10px 40px -20px rgb(255 190 140 / 0.35),
    0 40px 90px -30px rgb(6 4 26 / 0.85);
}
.sheet.wide {
  width: min(100% - 32px, 1160px);
}
/* The grabber, as on the app's sheets */
.sheet::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 50%;
  width: 46px;
  height: 5px;
  margin-left: -23px;
  border-radius: 99px;
  background: rgb(255 255 255 / 0.2);
}
.sheet > .mascot {
  position: absolute;
  top: 0;
  right: clamp(18px, 5vw, 60px);
  width: clamp(88px, 11vw, 136px);
  translate: 0 -78%;
  filter: drop-shadow(0 14px 14px rgb(10 6 40 / 0.45));
  animation: bob 3.6s ease-in-out 1.4s infinite;
  pointer-events: none;
}
.slim .sheet > .mascot {
  width: clamp(76px, 9vw, 108px);
}
.sheet > h2:first-child,
.sheet > .mascot:first-child + h2,
.sheet > .mascot:first-child + .actions + h2 {
  margin-top: 0;
}
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-7px) rotate(-2deg); }
}

/* The first page of a visit: the title appears, the sheet rises, the mascot lands on it. */
html:not(.seen) .hero > * {
  animation: lift 0.7s var(--ease) both;
}
html:not(.seen) .hero > :nth-child(2) {
  animation-delay: 0.06s;
}
html:not(.seen) .hero > :nth-child(3) {
  animation-delay: 0.12s;
}
html:not(.seen) .sheet {
  animation: rise 0.9s var(--spring) 0.12s both;
}
html:not(.seen) .sheet > .mascot {
  animation:
    land 0.8s var(--ease) 0.62s both,
    bob 3.6s ease-in-out 1.6s infinite;
}
@keyframes lift {
  from { opacity: 0; transform: translateY(14px); }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(90px); }
}
@keyframes land {
  0% { opacity: 0; transform: translateY(-70px) scale(0.92); }
  45% { opacity: 1; transform: translateY(0) scale(1.06, 0.9); }
  65% { transform: translateY(-10px) scale(0.98, 1.03); }
  85% { transform: translateY(0) scale(1.02, 0.98); }
  100% { transform: none; }
}
@keyframes hop {
  0%, 100% { transform: none; }
  40% { transform: translateY(-9px) rotate(-6deg); }
  70% { transform: translateY(1px) scale(1.04, 0.96); }
}

/* Moving between pages: the valley and the bar stay, the rest cross-fades. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }
}
::view-transition-group(*) {
  animation-duration: 0.32s;
  animation-timing-function: var(--ease);
}

/* Subjects: each mascot glows in its own colour */
.subjects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(236px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.subjects a {
  display: grid;
  grid-template-columns: 60px 1fr;
  align-items: center;
  gap: 14px;
  height: 100%;
  padding: 13px 16px 13px 12px;
  border-radius: 22px;
  background:
    radial-gradient(70px 70px at 42px 50%, color-mix(in srgb, var(--c) 34%, transparent), transparent 72%),
    var(--dusk-700);
  color: var(--ink);
  text-decoration: none;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.06);
  transition:
    transform 0.35s var(--spring),
    box-shadow 0.25s,
    background-color 0.25s;
}
.subjects a:hover {
  transform: translateY(-3px);
  background-color: var(--dusk-600);
  box-shadow:
    inset 0 0 0 1.5px color-mix(in srgb, var(--c) 75%, transparent),
    0 18px 30px -16px color-mix(in srgb, var(--c) 70%, transparent);
}
.subjects a:hover img {
  animation: hop 0.6s var(--ease);
}
.subjects img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  filter: drop-shadow(0 6px 8px rgb(8 6 30 / 0.35));
}
.subjects strong {
  display: block;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.04rem;
  line-height: 1.22;
}
.subjects strong + span {
  display: block;
  margin-top: 3px;
  font-size: 0.85rem;
  color: var(--ink-faint);
}

/* Bacalaureat: one column per profile, the subjects grouped by test */
.profiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}
.profile {
  padding: 4px 16px 16px;
  border-radius: 26px;
  background: rgb(255 255 255 / 0.035);
  box-shadow: inset 0 0 0 1px var(--line);
}
/* The shorter column rides along while the longer one scrolls. */
@media (min-width: 721px) and (min-height: 760px) {
  .profile {
    position: sticky;
    top: 20px;
  }
}
.profile-title {
  margin: 16px 4px 2px;
  font-size: 1.5rem;
}
.probe-title {
  margin: 16px 4px 8px;
  font-family: var(--text);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink-faint);
}
.subjects.compact {
  grid-template-columns: 1fr;
  gap: 6px;
}
.subjects.compact a {
  grid-template-columns: 44px 1fr;
  gap: 12px;
  padding: 8px 14px 8px 10px;
  border-radius: 18px;
  background:
    radial-gradient(50px 50px at 32px 50%, color-mix(in srgb, var(--c) 30%, transparent), transparent 72%),
    var(--dusk-700);
}
.subjects.compact a:hover {
  transform: translateX(3px);
}
.subjects.compact img {
  width: 44px;
  height: 44px;
}
.subjects.compact strong {
  font-size: 0.98rem;
}
.subjects.compact strong + span {
  margin-top: 1px;
  font-size: 0.8rem;
}

/* Papers by year: the year in large figures, the sessions beside it */
.years {
  width: 100%;
  border-collapse: collapse;
  margin: 4px 0 8px;
}
.years th,
.years td {
  text-align: left;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.years tr:last-child th,
.years tr:last-child td {
  border-bottom: 0;
}
.years th {
  width: 92px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.7rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: color-mix(in srgb, var(--tint) 45%, var(--ink));
}
.papers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.papers a {
  display: inline-block;
  padding: 7px 15px;
  border-radius: 999px;
  background: var(--dusk-700);
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.08);
  transition:
    background-color 0.2s,
    transform 0.3s var(--spring);
}
.papers a:hover {
  background: var(--dusk-600);
  transform: translateY(-2px);
}
.items {
  columns: 3 210px;
  column-gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.items li {
  break-inside: avoid;
  padding: 5px 0;
}
.items small {
  color: var(--ink-faint);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.chips a {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 7px 15px;
  border-radius: 999px;
  background: var(--dusk-700);
  color: var(--ink);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.08);
  transition:
    background-color 0.2s,
    transform 0.3s var(--spring);
}
.chips a:hover {
  background: var(--dusk-600);
  transform: translateY(-2px);
}
.chips small {
  font-family: var(--text);
  font-weight: 500;
  font-size: 0.8rem;
  color: var(--ink-faint);
}
.sheet .chips + .actions,
.sheet .items + .actions,
.sheet .papers + p {
  margin-top: 22px;
}

/* Lists of tools and sheets */
.tools {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tools a {
  display: grid;
  grid-template-columns: 56px 1fr;
  grid-template-rows: auto 1fr;
  align-content: start;
  gap: 4px 16px;
  height: 100%;
  padding: 18px 20px 18px 16px;
  border-radius: 22px;
  background:
    radial-gradient(70px 70px at 44px 44px, color-mix(in srgb, var(--c, var(--tint)) 30%, transparent), transparent 72%),
    var(--dusk-700);
  color: var(--ink);
  text-decoration: none;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.06);
  transition:
    transform 0.35s var(--spring),
    box-shadow 0.25s;
}
.tools a:hover {
  transform: translateY(-3px);
  box-shadow:
    inset 0 0 0 1.5px color-mix(in srgb, var(--c, var(--tint)) 75%, transparent),
    0 18px 30px -16px color-mix(in srgb, var(--c, var(--tint)) 70%, transparent);
}
.tools a:hover img {
  animation: hop 0.6s var(--ease);
}
.tools img {
  grid-row: span 2;
  width: 56px;
  height: 56px;
  object-fit: contain;
}
.tools strong {
  font-family: var(--display);
  font-size: 1.15rem;
  line-height: 1.25;
}
.tools span {
  color: var(--ink-soft);
  font-size: 0.93rem;
  line-height: 1.5;
}

/* Buttons */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 8px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 20px;
  border-radius: 999px;
  border: 0;
  background: var(--ink);
  color: #24225a;
  font: 700 0.98rem/1.2 var(--text);
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.3s var(--spring),
    background-color 0.2s,
    box-shadow 0.2s;
}
.btn:hover {
  background: #fff;
  text-decoration: none;
  transform: translateY(-2px);
}
.btn:active {
  transform: translateY(1px) scale(0.98);
}
.btn.ghost {
  background: rgb(255 255 255 / 0.08);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.16);
}
.btn.ghost:hover {
  background: rgb(255 255 255 / 0.15);
}
.btn.sun {
  background: linear-gradient(180deg, #ffc58c, var(--sun) 55%, #ffa45c);
  color: #3a1d08;
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.55),
    0 10px 22px -10px rgb(255 150 80 / 0.8);
}
.btn.sun:hover {
  background: linear-gradient(180deg, #ffd2a4, #ffbe82 55%, #ffad6c);
}
.btn[disabled] {
  opacity: 0.55;
  cursor: default;
  transform: none;
}

/* Exam text, on squared notebook paper with the red margin */
.task {
  margin: 0 0 16px;
  padding: 20px 22px 16px 54px;
  border-radius: 20px;
  color: var(--paper-ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(90deg, transparent 36px, var(--margin-red) 36px, var(--margin-red) 37.5px, transparent 37.5px),
    linear-gradient(var(--paper-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--paper-grid) 1px, transparent 1px);
  background-size:
    100% 100%,
    20px 20px,
    20px 20px;
  background-position:
    0 0,
    0 -1px,
    -1px 0;
  box-shadow:
    0 1px 0 rgb(255 255 255 / 0.6) inset,
    0 18px 36px -22px rgb(6 4 26 / 0.9);
}
.task a {
  color: #2f4fc4;
}
.task-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.task-head h2,
.task-head h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--paper-ink);
}
.task-head h2 a,
.task-head h3 a {
  color: var(--paper-ink);
  text-decoration: none;
}
.task-head h2 a:hover,
.task-head h3 a:hover {
  text-decoration: underline;
}
/* Points in the corrector's red pen */
.pts {
  flex: none;
  padding: 1px 10px;
  border-radius: 999px;
  border: 1.5px solid var(--pen);
  color: var(--pen);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  rotate: -2deg;
}
.prose {
  white-space: pre-line;
}
.math-block {
  white-space: pre;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.93rem;
  line-height: 1.35;
  margin: 0 0 14px;
}
.context {
  margin: 0 0 14px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgb(72 112 196 / 0.08);
  box-shadow: inset 3px 0 0 rgb(72 112 196 / 0.5);
  color: var(--paper-soft);
  max-height: 460px;
  overflow: auto;
}
.sheet > .context {
  background-color: var(--paper);
  color: var(--paper-ink);
  box-shadow:
    inset 3px 0 0 rgb(72 112 196 / 0.5),
    0 18px 36px -22px rgb(6 4 26 / 0.9);
}
.context.full {
  max-height: none;
  margin-bottom: 16px;
}
.figure {
  margin: 6px 0 14px;
}
.figure img {
  display: block;
  max-width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: contain;
  mix-blend-mode: multiply;
}
.figure.page img {
  max-height: none;
  width: 100%;
  border-radius: 6px;
  box-shadow: 0 0 0 1px rgb(36 34 77 / 0.12);
}
.figure figcaption {
  font-size: 0.84rem;
  color: var(--paper-soft);
  margin-top: 4px;
}
details.barem {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1.5px dashed rgb(36 34 77 / 0.18);
}
details.barem summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 700;
  color: #2b7a3d;
  list-style: none;
  width: fit-content;
  border-radius: 8px;
}
details.barem summary::-webkit-details-marker {
  display: none;
}
details.barem summary::before {
  content: "";
  width: 9px;
  height: 9px;
  border-right: 2.5px solid currentColor;
  border-bottom: 2.5px solid currentColor;
  rotate: -45deg;
  transition: rotate 0.3s var(--spring);
}
details.barem[open] summary::before {
  rotate: 45deg;
}
details.barem[open] summary {
  margin-bottom: 10px;
}
details.barem::details-content {
  opacity: 0;
  block-size: 0;
  overflow-y: clip;
  transition:
    content-visibility 0.35s allow-discrete,
    opacity 0.35s,
    block-size 0.35s var(--ease);
}
details.barem[open]::details-content {
  opacity: 1;
  block-size: auto;
}
@supports (interpolate-size: allow-keywords) {
  :root {
    interpolate-size: allow-keywords;
  }
}
.answer {
  margin: 0 0 8px;
}
.answer strong,
.barem-text {
  color: #23602f;
}
.barem-text {
  font-size: 0.96rem;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgb(60 150 80 / 0.09);
  box-shadow: inset 3px 0 0 rgb(60 150 80 / 0.55);
}
.barem-text p:last-child {
  margin-bottom: 0;
}
.task-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin-top: 10px;
  font-size: 0.92rem;
}
.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 24px 0 0;
}
.pager a {
  display: block;
  padding: 12px 18px;
  border-radius: 18px;
  background: var(--dusk-700);
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.93rem;
  line-height: 1.4;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.07);
  transition:
    background-color 0.2s,
    transform 0.3s var(--spring);
}
.pager a:hover {
  background: var(--dusk-600);
  transform: translateY(-2px);
}
.pager a:last-child:not(:first-child) {
  text-align: right;
}
.note {
  color: var(--ink-faint);
  font-size: 0.93rem;
}
.source {
  margin-top: 36px;
  font-size: 0.88rem;
  color: var(--ink-faint);
}

/* An archive paper: the two official PDFs, then self-scoring */
.docs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin: 0 0 8px;
}
.doc {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border-radius: 24px;
  background:
    radial-gradient(90px 90px at 54px 50%, rgb(255 179 107 / 0.18), transparent 72%),
    var(--dusk-700);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.07);
  transition:
    transform 0.35s var(--spring),
    box-shadow 0.25s,
    background-color 0.25s;
}
.doc.key {
  background:
    radial-gradient(90px 90px at 54px 50%, rgb(150 230 140 / 0.16), transparent 72%),
    var(--dusk-700);
}
.doc:has(.doc-open:hover) {
  transform: translateY(-3px);
  background-color: var(--dusk-600);
  box-shadow:
    inset 0 0 0 1.5px rgb(255 255 255 / 0.18),
    0 22px 34px -18px rgb(6 4 26 / 0.9);
}
.doc-open {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 18px 10px 18px 20px;
  border-radius: 24px 0 0 24px;
  color: var(--ink);
  text-decoration: none;
}
.doc-open:hover {
  text-decoration: none;
}
.doc strong {
  display: block;
  font-family: var(--display);
  font-size: 1.35rem;
  line-height: 1.15;
}
.doc strong + span {
  display: block;
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 0.93rem;
}
.doc-save {
  display: grid;
  justify-items: center;
  gap: 4px;
  margin-right: 14px;
  padding: 10px 12px 8px;
  min-width: 82px;
  border-radius: 16px;
  background: rgb(255 255 255 / 0.08);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.16);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition:
    background-color 0.2s,
    transform 0.3s var(--spring);
}
.doc-save:hover {
  background: rgb(255 255 255 / 0.16);
  text-decoration: none;
}
.doc-save:hover svg {
  translate: 0 2px;
}
.doc-save:active {
  transform: scale(0.96);
}
.doc-save svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: translate 0.3s var(--spring);
}
/* A little exam sheet: text lines, the red margin and a folded corner */
.page-icon {
  position: relative;
  width: 62px;
  height: 80px;
  border-radius: 5px;
  background-color: var(--paper);
  background-image:
    linear-gradient(90deg, transparent 12px, var(--margin-red) 12px, var(--margin-red) 13.5px, transparent 13.5px),
    repeating-linear-gradient(180deg, transparent 0 9px, rgb(36 34 77 / 0.28) 9px 11px);
  background-size:
    100% 100%,
    34px 60px;
  background-position:
    0 0,
    18px 16px;
  background-repeat: no-repeat;
  clip-path: polygon(0 0, 72% 0, 100% 22%, 100% 100%, 0 100%);
  rotate: -5deg;
  box-shadow: 0 10px 18px -8px rgb(6 4 26 / 0.7);
  transition: rotate 0.4s var(--spring), translate 0.4s var(--spring);
}
.page-icon::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 28%;
  height: 22%;
  background: linear-gradient(225deg, transparent 50%, #d9d4c4 50%);
}
.doc.key .page-icon::before {
  content: "";
  position: absolute;
  right: 9px;
  bottom: 9px;
  width: 9px;
  height: 17px;
  border-right: 3px solid var(--pen);
  border-bottom: 3px solid var(--pen);
  rotate: 40deg;
}
.doc-open:focus-visible {
  outline: none;
}
.doc:has(.doc-open:focus-visible) {
  outline: 3px solid var(--sun);
  outline-offset: 2px;
}
.doc-open:hover .page-icon {
  rotate: 0deg;
  translate: 0 -4px;
}
.grader {
  margin-top: 48px;
}
.grader > h2 {
  margin-top: 0;
}
.grader h3 {
  margin: 30px 0 4px;
  font-size: 1.05rem;
  color: var(--ink-soft);
}
.glist {
  margin: 0;
  padding: 0;
  list-style: none;
}
.gitem {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 18px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.gitem-q {
  margin: 0;
  min-width: 0;
  display: flex;
  gap: 10px;
  align-items: baseline;
}
.gitem-q a {
  flex: none;
  font-family: var(--display);
  font-weight: 800;
  color: var(--ink);
  text-decoration: none;
}
.gitem-q a:hover {
  text-decoration: underline;
}
.gitem-q span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink-faint);
  font-size: 0.93rem;
}
.gitem details.barem {
  grid-column: 1 / -1;
  margin-top: 0;
  padding-top: 0;
  border: 0;
}
.gitem details.barem summary {
  color: var(--lime);
  font-size: 0.92rem;
}
.gitem .barem-body {
  padding: 14px 16px 4px;
  border-radius: 16px;
  color: var(--paper-ink);
  background: var(--paper);
  box-shadow: inset 4px 0 0 rgb(60 150 80 / 0.6);
}
.gitem .barem-text {
  padding: 0;
  background: none;
  box-shadow: none;
  margin-bottom: 10px;
}
.stepper {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: var(--dusk-900);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.08);
  transition: box-shadow 0.25s;
}
.stepper button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.08);
  color: var(--ink);
  font: 700 1.2rem/1 var(--text);
  cursor: pointer;
  transition:
    background-color 0.2s,
    transform 0.25s var(--spring);
}
.stepper button:hover {
  background: rgb(255 255 255 / 0.16);
}
.stepper button:active {
  transform: scale(0.88);
}
.stepper input[type="number"] {
  width: 2.6ch;
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  text-align: center;
  font: 800 1.15rem/1 var(--display);
  box-shadow: none;
  -moz-appearance: textfield;
  appearance: textfield;
}
.stepper input[type="number"]:focus {
  box-shadow: none;
}
.stepper input::-webkit-inner-spin-button,
.stepper input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.stepper input:focus {
  box-shadow: none;
}
.stepper input::placeholder {
  color: var(--ink-faint);
}
.stepper:focus-within {
  box-shadow: inset 0 0 0 2px var(--sky);
}
.stepper .of {
  min-width: 4.2em;
  padding: 0 10px 0 4px;
  color: var(--ink-faint);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.gitem.done .stepper {
  box-shadow: inset 0 0 0 1.5px rgb(255 179 107 / 0.55);
}
.gitem.full .stepper {
  box-shadow: inset 0 0 0 1.5px var(--lime);
}
.gitem.full .stepper input {
  color: var(--lime);
}
.tally {
  position: sticky;
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 8px 20px;
  margin: 24px -8px 0;
  padding: 10px 10px 10px 22px;
  border-radius: 999px;
  background: rgb(17 15 51 / 0.82);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.14),
    inset 0 0 0 1px rgb(255 255 255 / 0.08),
    0 18px 40px -16px rgb(0 0 0 / 0.7);
}
.tally {
  transition:
    opacity 0.3s,
    translate 0.4s var(--spring);
}
.tally.waiting {
  opacity: 0;
  translate: 0 18px;
  pointer-events: none;
}
.tally p {
  margin: 0;
}
.tally-sum {
  flex: 1;
  color: var(--ink-faint);
  font-size: 0.9rem;
}
.tally-sum strong {
  display: inline-block;
  font-family: var(--display);
  font-size: 1.3rem;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.tally-grade {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--ink-soft);
  font-weight: 600;
}
.tally-grade strong {
  display: inline-block;
  min-width: 3.2ch;
  font-family: var(--display);
  font-size: 1.9rem;
  line-height: 1;
  color: var(--sun);
  font-variant-numeric: tabular-nums;
}
.tally-grade strong.empty {
  color: var(--ink-faint);
}
.tally .btn {
  min-height: 40px;
  padding: 8px 16px;
}
.bump {
  animation: bump 0.45s var(--spring);
}
@keyframes bump {
  40% { transform: scale(1.18); }
}

/* The app: a band of the sunset sky, the mascot cheering, the two stores */
.cta {
  position: relative;
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 0 26px;
  align-items: start;
  margin: 64px 0 0;
  padding: 30px 32px 24px 22px;
  border-radius: 30px;
  background:
    radial-gradient(80% 120% at 0% 100%, rgb(255 179 107 / 0.55), transparent 60%),
    linear-gradient(160deg, #4c3fd0 0%, #7b48cf 45%, #c4589a 80%, #f0876a 100%);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.3),
    0 26px 50px -24px rgb(200 90 140 / 0.6);
  overflow: hidden;
}
.cta img {
  grid-row: span 2;
  align-self: end;
  width: 170px;
  margin-bottom: -24px;
  filter: drop-shadow(0 10px 12px rgb(40 10 60 / 0.4));
}
.cta h2 {
  margin: 0 0 4px;
  font-size: clamp(1.55rem, 1.2rem + 1.2vw, 2rem);
  line-height: 1.1;
}
.cta-text > p {
  margin: 0;
  color: rgb(255 253 247 / 0.88);
}
.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 22px;
  padding: 0;
  list-style: none;
}
.stores li {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 54px;
  padding: 0 24px 0 18px;
  border-radius: 999px;
  background: rgb(24 14 70 / 0.34);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow:
    inset 0 0 0 1px rgb(255 255 255 / 0.3),
    inset 0 1px 0 rgb(255 255 255 / 0.25);
  font: 700 1.12rem/1 var(--display);
  letter-spacing: -0.01em;
  color: #fff;
  white-space: nowrap;
}
.stores svg {
  flex: none;
  width: 24px;
  height: 24px;
}
.stores svg[viewBox="0 0 24 24"] {
  margin-top: -3px;
}
.cta .signup {
  grid-column: 2;
}
/* Without the signup form the store marks end the band, and the text sits
   level with the mascot. */
.cta:not(:has(.signup)) .stores {
  margin-bottom: 6px;
}
.cta:not(:has(.signup)) img {
  grid-row: auto;
}
.cta:not(:has(.signup)) .cta-text {
  align-self: center;
}
.signup {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.signup input[type="email"] {
  flex: 1 1 220px;
  min-height: 48px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 0;
  background: rgb(20 10 60 / 0.32);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.3);
  color: var(--ink);
  font: inherit;
}
.signup input::placeholder {
  color: rgb(255 253 247 / 0.65);
}
.signup input[type="email"]:focus {
  outline: none;
  box-shadow:
    inset 0 0 0 2px var(--ink),
    0 0 0 4px rgb(255 255 255 / 0.18);
}
.signup .consent {
  flex-basis: 100%;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.85rem;
  color: rgb(255 253 247 / 0.85);
  line-height: 1.45;
}
.signup .consent a {
  color: var(--ink);
}
/* Checkboxes drawn to match the evening palette, ticked in the sun's colour */
.signup .consent input,
.modules input {
  -webkit-appearance: none;
  appearance: none;
  flex: none;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  border-radius: 6px;
  background: rgb(255 255 255 / 0.16) center / 14px no-repeat;
  box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / 0.7);
  cursor: pointer;
  transition:
    background-color 0.2s,
    box-shadow 0.2s;
}
.signup .consent input:checked,
.modules input:checked {
  background-color: var(--sun);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M2.5 7.4 5.6 10.4 11.5 3.8' fill='none' stroke='%233a1d08' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  box-shadow: none;
}
.signup .consent input:focus-visible,
.modules input:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.signup .trap {
  position: absolute;
  left: -9999px;
}
.signup-status {
  flex-basis: 100%;
  margin: 0;
  min-height: 1.4em;
  font-size: 0.92rem;
}
.signup-status:empty {
  min-height: 0;
}
.signup-status.ok {
  color: var(--lime);
}
.signup-status.err {
  color: #fff;
  font-weight: 600;
}

/* Forms in the tools */
.field {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
  align-content: start;
}
.field label,
.field .label {
  font-weight: 600;
}
.field .hint {
  font-size: 0.85rem;
  color: var(--ink-faint);
}
input[type="number"],
input[type="search"],
input[type="text"],
select {
  min-height: 48px;
  padding: 10px 16px;
  border-radius: 14px;
  border: 0;
  background: var(--dusk-900);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.14);
  color: var(--ink);
  font: inherit;
  width: 100%;
  transition: box-shadow 0.2s;
}
input::placeholder {
  color: var(--ink-faint);
}
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23fffdf7' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}
input:not([type="checkbox"]):focus,
select:focus {
  outline: none;
  box-shadow:
    inset 0 0 0 2px var(--sky),
    0 0 0 4px rgb(169 216 255 / 0.18);
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0 18px;
}
.panel > h2:first-child,
.result > h2:first-child {
  margin-top: 0;
}
.grades {
  padding: 6px 24px;
}
.grade-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.grade-row:last-child {
  border-bottom: 0;
}
.grade-row label {
  display: grid;
  grid-template-columns: 54px 1fr;
  align-items: baseline;
  column-gap: 12px;
}
.grade-row strong {
  grid-row: span 2;
  font-family: var(--display);
  font-size: 1.3rem;
  color: color-mix(in srgb, var(--tint) 50%, var(--ink));
}
.grade-row span {
  font-weight: 600;
}
.grade-row small {
  grid-column: 2;
  color: var(--ink-faint);
  font-size: 0.85rem;
}
.grade-row input {
  text-align: center;
  font: 800 1.25rem/1 var(--display);
  -moz-appearance: textfield;
  appearance: textfield;
}
.grade-row input::-webkit-inner-spin-button,
.grade-row input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.grade-row input::placeholder {
  font: 500 0.95rem/1 var(--text);
}
.panel {
  padding: 22px 24px 8px;
  border-radius: 24px;
  background: var(--dusk-700);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.06);
  margin-bottom: 18px;
}
.result {
  position: relative;
  padding: 22px 24px;
  border-radius: 24px;
  background:
    radial-gradient(70% 120% at 100% 0%, rgb(255 179 107 / 0.2), transparent 60%),
    var(--dusk-700);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.08);
  margin: 18px 0;
}
.result {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 14px;
}
.result > * {
  flex-basis: 100%;
}
.result > .big,
.result > .verdict {
  flex-basis: auto;
}
.result > .note:first-child {
  margin-bottom: 6px;
}
.big.empty {
  color: rgb(255 253 247 / 0.28);
}
.big {
  display: inline-block;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(3rem, 2.2rem + 3.4vw, 4.4rem);
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  font-variant-numeric: tabular-nums;
  transform-origin: left center;
}
.verdict {
  display: inline-block;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.1rem;
  margin: 4px 0 8px;
}
.verdict:empty {
  display: none;
}
.verdict.pass,
.verdict.fail {
  padding: 4px 14px;
  border-radius: 999px;
}
.verdict.pass {
  color: #1d3a0c;
  background: var(--lime);
}
.verdict.fail {
  color: #4a0b14;
  background: var(--rose);
}
.grader > .verdict {
  margin-top: 14px;
}
.grader > .verdict:not(.pass):not(.fail) {
  font-family: var(--text);
  font-weight: 500;
  font-size: 0.93rem;
  color: var(--ink-faint);
}

/* Footer: back on the meadow, under the night sky */
.foot {
  position: relative;
  z-index: 1;
  padding: 8px 16px 44px;
  font-size: 0.87rem;
  color: rgb(255 253 247 / 0.72);
  text-shadow: 0 1px 10px rgb(8 6 30 / 0.9);
}
.foot-in {
  width: min(100%, 860px);
  margin: 0 auto;
  padding: 18px 24px;
  border-radius: 22px;
  background: rgb(14 12 44 / 0.62);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.foot p {
  margin: 0 0 6px;
}
.foot a {
  color: var(--ink);
}
.foot .foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin: 0;
}

/* Physics: the two modules the student solved */
.modules {
  margin: 0 0 18px;
  padding: 14px 18px;
  border: 0;
  border-radius: 18px;
  background: var(--dusk-700);
  box-shadow: inset 0 0 0 1px var(--line);
  display: grid;
  gap: 8px;
}
.modules legend {
  float: left;
  width: 100%;
  margin-bottom: 4px;
  font-weight: 700;
  padding: 0;
}
.modules.invalid {
  box-shadow: inset 0 0 0 1.5px var(--rose);
}
.modules label {
  display: flex;
  gap: 10px;
  align-items: center;
}
.modules input {
  background-color: rgb(255 255 255 / 0.08);
  box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / 0.45);
}

/* Search */
.search {
  padding-bottom: 6px;
}
.results {
  list-style: none;
  margin: 0;
  padding: 0;
}
.results li {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.results img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}
.results a {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 10px;
  text-decoration: none;
}
.results a strong {
  font-family: var(--display);
  color: var(--ink);
}
.results a span {
  color: var(--sky);
}
.results a:hover span {
  text-decoration: underline;
}
.results p {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}
mark {
  background: rgb(255 179 107 / 0.32);
  color: inherit;
  border-radius: 3px;
  padding: 0 1px;
}

/* Formula and revision sheets, printed on paper */
.sheet-paper {
  margin: 0;
  padding: 26px 28px 18px 56px;
  border-radius: 22px;
  color: var(--paper-ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(90deg, transparent 36px, var(--margin-red) 36px, var(--margin-red) 37.5px, transparent 37.5px),
    linear-gradient(rgb(72 112 196 / 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgb(72 112 196 / 0.07) 1px, transparent 1px);
  background-size:
    100% 100%,
    20px 20px,
    20px 20px;
  box-shadow: 0 24px 50px -28px rgb(6 4 26 / 0.95);
}
.sheet-paper a {
  color: #2f4fc4;
}
.sheet-paper h1 {
  font-size: 1.6rem;
  margin: 0 0 12px;
}
.sheet-paper h2 {
  margin: 40px 0 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid rgb(36 34 77 / 0.14);
  color: var(--paper-ink);
}
.sheet-paper h2:first-child,
.sheet-paper .print-title + h2 {
  margin-top: 4px;
}
.sheet-paper h3 {
  color: #3a3880;
}
.sheet-paper table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 18px;
  font-size: 0.95rem;
  display: block;
  overflow-x: auto;
  background: rgb(253 251 244 / 0.9);
}
.sheet-paper th,
.sheet-paper td {
  text-align: left;
  vertical-align: top;
  padding: 7px 10px;
  border-bottom: 1px solid rgb(36 34 77 / 0.14);
}
.sheet-paper th {
  font-weight: 700;
  color: #2b7a3d;
}
.sheet-paper ul,
.sheet-paper ol {
  padding-left: 22px;
}
.sheet-paper li {
  margin: 3px 0;
}
.sheet-paper code {
  font-family: var(--mono);
  font-size: 0.9em;
}
.math-display {
  overflow-x: auto;
  overflow-y: hidden;
  margin: 6px 0 12px;
  padding: 2px 0;
}
.katex {
  font-size: 1.08em;
}
.print-only {
  display: none;
}

/* High schools */
.table-wrap {
  overflow-x: auto;
  margin: 8px 0 18px;
}
.licee {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.licee th,
.licee td {
  text-align: left;
  padding: 11px 12px 11px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.licee tbody tr {
  transition: background-color 0.15s;
}
.licee tbody tr:hover {
  background: rgb(255 255 255 / 0.04);
}
.licee th {
  font-size: 0.82rem;
  color: var(--ink-faint);
  font-weight: 600;
}
.licee td:first-child {
  font-weight: 600;
}
.licee td small {
  display: block;
  font-weight: 400;
  color: var(--ink-faint);
}
.licee .num {
  text-align: right;
  padding-right: 0;
  font-family: var(--display);
  font-size: 1.08rem;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  white-space: nowrap;
}
.licee th.num {
  font-family: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
}
.licee .num small {
  font-family: var(--text);
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--lime);
}
.licee tr.edge .num {
  color: var(--sun);
}

@media (max-width: 720px) {
  body {
    font-size: 16px;
  }
  .top {
    padding: 10px 10px 0;
  }
  .skip:focus {
    left: 10px;
  }
  .hero,
  .hero.narrow {
    --hero-w: calc(100% - 36px);
    padding-top: 30px;
  }
  .tall .hero {
    min-height: 34vh;
  }
  .hero .lede {
    font-size: 1.02rem;
    padding-right: 72px;
  }
  .sheet,
  .sheet.wide {
    width: 100%;
    margin-bottom: 0;
    padding: 40px 18px 36px;
    border-radius: 30px 30px 0 0;
  }
  .sheet > .mascot,
  .slim .sheet > .mascot {
    right: 14px;
    width: 82px;
  }
  .foot {
    padding: 0;
    background: var(--dusk-900);
    text-shadow: none;
  }
  .foot-in {
    padding: 26px 22px 40px;
    border-radius: 0;
    background: none;
    backdrop-filter: none;
  }
  .task {
    margin-inline: -6px;
    padding: 18px 16px 14px 44px;
    background-image:
      linear-gradient(90deg, transparent 28px, var(--margin-red) 28px, var(--margin-red) 29.5px, transparent 29.5px),
      linear-gradient(var(--paper-grid) 1px, transparent 1px),
      linear-gradient(90deg, var(--paper-grid) 1px, transparent 1px);
  }
  .sheet-paper {
    margin-inline: -6px;
    padding: 20px 16px 12px 40px;
    background-image:
      linear-gradient(90deg, transparent 26px, var(--margin-red) 26px, var(--margin-red) 27.5px, transparent 27.5px),
      linear-gradient(rgb(72 112 196 / 0.07) 1px, transparent 1px),
      linear-gradient(90deg, rgb(72 112 196 / 0.07) 1px, transparent 1px);
  }
  .profiles {
    grid-template-columns: 1fr;
  }
  .profile {
    margin-inline: -6px;
    padding: 2px 10px 12px;
  }
  .cta {
    grid-template-columns: 1fr;
    padding: 24px 20px 22px;
  }
  .cta img {
    position: absolute;
    right: 6px;
    top: 8px;
    width: 88px;
    margin: 0;
  }
  .cta h2,
  .cta-text > p {
    padding-right: 84px;
  }
  .cta .signup {
    grid-column: 1;
  }
  .stores {
    margin: 16px 0 20px;
  }
  .signup input[type="email"] {
    flex: 1 1 0;
    min-width: 0;
  }
  .stores li {
    flex: 1 1 0;
    justify-content: center;
    height: 50px;
    padding: 0 14px;
    font-size: 1.02rem;
  }
  .years th {
    width: 70px;
    font-size: 1.4rem;
  }
  .grades {
    padding: 4px 16px;
  }
  .grade-row {
    grid-template-columns: minmax(0, 1fr) 104px;
    gap: 12px;
  }
  .grade-row label {
    grid-template-columns: 42px 1fr;
  }
  .grade-row strong {
    font-size: 1.1rem;
  }
  .pager {
    grid-template-columns: 1fr;
  }
  .pager a:last-child:not(:first-child) {
    text-align: left;
  }
  .gitem {
    grid-template-columns: minmax(0, 1fr);
  }
  .gitem-q span {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .stepper {
    justify-self: start;
  }
  .tally {
    gap: 4px 14px;
    padding: 8px 8px 8px 18px;
    margin-inline: -6px;
  }
  .tally-sum span {
    display: none;
  }
  .tally-sum::after {
    content: " din 90";
  }
  /* On a phone each class is a small card: school and average on top, the
     specialisation under it. */
  .licee thead {
    display: none;
  }
  .licee tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
  }
  .licee td {
    padding: 0;
    border: 0;
  }
  .licee td:nth-child(2) {
    grid-row: 2;
    margin-top: 4px;
    color: var(--ink-soft);
    font-size: 0.92rem;
  }
  .licee td.num {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
  .flies {
    display: none;
  }
}

@media print {
  @page {
    size: A4;
    margin: 14mm 13mm;
  }
  :root {
    color-scheme: light;
    background: #fff;
  }
  body {
    background: #fff;
    color: #000;
    font-size: 10.5pt;
    line-height: 1.4;
  }
  .valley,
  .top,
  .hero,
  .cta,
  .foot,
  .no-print,
  .sheet > .mascot,
  .sheet::before {
    display: none !important;
  }
  .sheet,
  .sheet.wide {
    width: 100%;
    margin: 0;
    padding: 0;
    background: none;
    box-shadow: none;
    border-radius: 0;
    animation: none !important;
    color: #000;
  }
  .task,
  .context,
  .sheet-paper {
    background: none !important;
    box-shadow: none !important;
    padding: 0;
    margin: 0;
    color: #000;
  }
  .sheet-paper h2 {
    margin-top: 14pt;
    border-color: #999;
    break-after: avoid;
  }
  .sheet-paper table,
  .math-display {
    break-inside: avoid;
  }
  .sheet-paper th {
    color: #000;
  }
  .sheet-paper th,
  .sheet-paper td {
    border-color: #bbb;
  }
  a {
    color: #000;
  }
  .source {
    color: #444;
  }
  .print-only {
    display: block;
  }
  .print-title {
    font-family: var(--display);
    font-weight: 800;
    font-size: 15pt;
    margin: 0 0 6pt;
  }
}
