/* ==========================================================================
   ExamStudyAid, the chrome (v5): the type, the tokens, the buttons, the bar with its course panels and account
   sheet, the phone menu and the footer. The site's pages load it before site.css; the study area
   (pages/nb_base.html) loads it with its own sheets, so the bar and the footer are one everywhere. On a study page
   the bar follows the student's theme (site.js reads data-gn-theme), and the parts below the study note add the
   night look, the appearance menu and the compact footer. docs/redesign/SITE-DESIGN.md, STUDY-DESIGN.md.
   ========================================================================== */

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("../fonts/archivo-latin.2f7ea45bad3a.woff2") format("woff2");
  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: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("../fonts/archivo-latin-ext.cde95d2797df.woff2") format("woff2");
  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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Archivo Fallback";
  src: local("Arial");
  ascent-override: 88.96%;
  descent-override: 21.28%;
  line-gap-override: 0%;
  size-adjust: 98.7%;
}

:root {
  --ink: #0b0d12;
  --snow: #fbfbfd;
  --mist: #f5f5f7;
  --white: #ffffff;
  --line: #e3e4e8;
  --line-2: #d2d4da;
  --night: #000000;
  --on-night: #f5f5f7;
  --night-line: rgb(255 255 255 / 0.12);
  --blue: #175be8;
  --blue-hover: #0f4ed6;
  --blue-text: #0f47c4;
  --blue-on-night: #6b9bff;
  --blue-soft: #edf2fe;
  --green: #0c7a52;
  --green-soft: #e8f4ee;
  --red: #c0352a;
  --red-soft: #fcefed;

  --font: "Archivo", "Archivo Fallback", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --gn-h: 76px;
  --pad: clamp(20px, 4vw, 64px);
  --sec: clamp(96px, 11vw, 168px);
}

/* ---------- the chrome's own ground: the bar, the curtain, the menu and the footer bring their resets, so they
   look the same on a study page (whose body is not .site) as on a site page. Zero specificity (:where), as the
   site's own. ---------- */
:where(.gn, .gn-curtain, .mm, .ftr) {
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
:where(.gn, .mm, .ftr) :where(h1, h2, h3, h4, p, ul, ol, figure, dl, dd) {
  margin: 0;
}
:where(.gn, .mm, .ftr) :where(ul, ol) {
  padding: 0;
  list-style: none;
}
:where(.gn, .mm, .ftr) :where(a) {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
:where(.gn, .mm, .ftr) :where(button) {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
:where(.gn, .mm, .ftr) :where(svg) {
  display: block;
}
:where(.gn, .mm, .ftr) :where(:focus-visible) {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
:where(.gn.is-dark, .mm.is-dark, html.theme-dark .ftr) :where(:focus-visible) {
  outline-color: var(--blue-on-night);
}
:where(.gn, .mm, .ftr)[hidden],
:where(.gn, .mm, .ftr) [hidden] {
  display: none !important;
}

html.menu-open {
  overflow: hidden;
}
.wrap {
  width: 100%;
  max-width: calc(1240px + 2 * var(--pad));
  margin-inline: auto;
  padding-inline: var(--pad);
}
.wrap-narrow {
  width: 100%;
  max-width: calc(760px + 2 * var(--pad));
  margin-inline: auto;
  padding-inline: var(--pad);
}
.skip {
  position: fixed;
  z-index: 100;
  left: 16px;
  top: 10px;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  opacity: 0;
  transform: translateY(-160%);
}
.skip:focus {
  opacity: 1;
  transform: none;
}
.brand-mark {
  width: 24px;
  height: 23px;
  flex: none;
  background-color: currentColor;
  -webkit-mask: url("../img/esa-mark.501c2c321a42.png") center / contain no-repeat;
  mask: url("../img/esa-mark.501c2c321a42.png") center / contain no-repeat;
}

/* ---------- buttons: rounded rectangles; one blue action, one outlined ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 0 22px;
  border-radius: 10px;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.1;
  white-space: nowrap;
  text-decoration: none;
  transition:
    background-color 0.2s,
    box-shadow 0.2s,
    color 0.2s,
    transform 0.2s var(--ease);
}
.btn:active {
  transform: scale(0.98);
}
.btn-sm {
  height: 36px;
  padding: 0 16px;
  border-radius: 9px;
  font-size: 14px;
}
.btn-lg {
  height: 56px;
  padding: 0 28px;
  border-radius: 12px;
  font-size: 17px;
}
.btn-block {
  display: flex;
  width: 100%;
}
.btn-blue {
  background: var(--blue);
  color: #fff;
}
.btn-blue:hover {
  background: var(--blue-hover);
}
.btn-line {
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--ink);
}
.btn-line:hover {
  background: rgb(11 13 18 / 0.05);
}
.btn-ghost {
  color: var(--on-night);
  box-shadow: inset 0 0 0 1.5px rgb(245 245 247 / 0.9);
}
.btn-ghost:hover {
  background: rgb(255 255 255 / 0.1);
}
.btn-danger {
  color: var(--red);
  box-shadow: inset 0 0 0 1.5px var(--red);
}
.btn-danger:hover {
  background: var(--red-soft);
}
.btn[disabled],
.btn.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}
.link {
  color: var(--blue-text);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
}
.link:hover {
  color: var(--blue);
}
[data-tone="dark"] .link {
  color: var(--blue-on-night);
}

/* ==========================================================================
   The bar, after the Marrin site and apple.com: nothing over the top of the page, then the colour of the section
   under it, frosted, with a hairline. Each programme opens a panel of its courses.
   ========================================================================== */
.gn {
  /* the bar's own words: the full ink by day and the headline's bright white by night (pointer 4 of the list of 28
     November 2026), never the site's quieter secondary colour */
  --gn-words: var(--ink);
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  color: var(--ink);
}
.gn-bar {
  position: relative;
  z-index: 2;
  height: var(--gn-h);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition:
    background-color 0.35s,
    border-color 0.35s,
    color 0.35s;
}
.gn.is-dark {
  --gn-words: var(--on-night);
  color: var(--on-night);
}
.gn.is-solid .gn-bar {
  background: rgb(251 251 253 / 0.8);
  border-bottom-color: rgb(11 13 18 / 0.07);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}
.gn.is-dark.is-solid .gn-bar {
  background: rgb(0 0 0 / 0.72);
  border-bottom-color: rgb(255 255 255 / 0.07);
}
.gn.is-flying .gn-bar,
.gn.is-menu .gn-bar {
  background: rgb(251 251 253 / 0.98);
  border-bottom-color: rgb(11 13 18 / 0.07);
}
.gn.is-dark.is-flying .gn-bar,
.gn.is-dark.is-menu .gn-bar {
  background: rgb(8 8 9 / 0.97);
  border-bottom-color: rgb(255 255 255 / 0.07);
}
/* a change of section swaps the bar's colours at once (site.js): faded, the ground and the words meet in the same
   grey halfway and the bar vanishes for a moment */
.gn.is-retone,
.gn.is-retone * {
  transition: none;
}
/* the bar is a fifth larger than it was (pointer 4): its height (--gn-h), the mark, the words, the account circle and
   the buttons together, so it keeps its proportions */
.gn-row {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 28px;
}
.gn-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-height: 44px;
  flex: none;
}
.gn-brand .brand-mark {
  width: 29px;
  height: 28px;
}
.gn-word {
  font-size: 20px;
  font-weight: 650;
  font-stretch: 106%;
  letter-spacing: -0.02em;
}
.gn-items {
  display: none;
}
.gn-end {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
}
.gn-login-form {
  display: contents;
}
.gn-login,
.gn-dash {
  display: none;
  font-size: 17px;
  font-weight: 500;
  white-space: nowrap;
  color: var(--gn-words);
}
.gn .gn-start {
  height: 43px;
  padding: 0 19px;
  border-radius: 11px;
  font-size: 17px;
}
.gn-menu {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  height: 52px;
  font-size: 18px;
  font-weight: 500;
}
.gn-menu-icon {
  position: relative;
  width: 22px;
  height: 12px;
}
.gn-menu-icon i {
  position: absolute;
  left: 0;
  width: 22px;
  height: 1.5px;
  border-radius: 1px;
  background: currentColor;
  transition: transform 0.35s var(--ease);
}
.gn-menu-icon i:first-child {
  top: 0;
}
.gn-menu-icon i:last-child {
  bottom: 0;
}
.gn.is-menu .gn-menu-icon i:first-child {
  transform: translateY(5.25px) rotate(45deg);
}
.gn.is-menu .gn-menu-icon i:last-child {
  transform: translateY(-5.25px) rotate(-45deg);
}
.gn:not(.is-menu) .when-open,
.gn.is-menu .when-closed {
  display: none;
}
@media (max-width: 419px) {
  .gn-start {
    display: none;
  }
}
@media (min-width: 1024px) {
  .gn-items {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 0 auto;
  }
  .gn-end {
    margin-left: 0;
  }
  .gn-login,
  .gn-dash {
    display: inline;
  }
  .gn-menu {
    display: none;
  }
  .gn-brand,
  .gn-end {
    width: 240px;
  }
  /* a study page adds the appearance button beside Log in and Start free: the end grows rather than wrap Log in */
  .gn-end {
    flex: none;
    width: auto;
    min-width: 240px;
    justify-content: flex-end;
  }
}
.gn-item {
  display: flex;
  align-items: center;
}
.gn-link {
  display: inline-flex;
  align-items: center;
  height: var(--gn-h);
  padding: 0 18px;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.005em;
  color: var(--gn-words);
}
.gn-chev {
  display: grid;
  place-items: center;
  width: 0;
  height: 28px;
  margin-left: -12px;
  overflow: hidden;
  border-radius: 7px;
  opacity: 0;
}
.gn-chev svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.3s var(--ease);
}
.gn-item:focus-within .gn-chev,
.gn-item.is-open .gn-chev {
  width: 26px;
  opacity: 1;
}
.gn-item.is-open .gn-chev svg {
  transform: rotate(180deg);
}
html:not(.js) .gn-chev {
  display: none;
}
.gn-fly {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  top: 100%;
  visibility: hidden;
  pointer-events: none;
  background: rgb(251 251 253 / 0.98);
  border-bottom: 1px solid rgb(11 13 18 / 0.07);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  clip-path: inset(0 0 100% 0);
  transition:
    clip-path 0.36s var(--ease),
    visibility 0s linear 0.36s;
}
.gn.is-dark .gn-fly {
  background: rgb(8 8 9 / 0.97);
  border-bottom-color: rgb(255 255 255 / 0.07);
}
.gn-item.is-open .gn-fly {
  visibility: visible;
  pointer-events: auto;
  clip-path: inset(0 0 0 0);
  transition: clip-path 0.42s var(--ease);
}
.gn-fly-in {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 72px;
  padding-top: 36px;
  padding-bottom: 52px;
  padding-left: calc(var(--pad) + 248px);
}
@media (max-width: 1279px) {
  .gn-fly-in {
    padding-left: var(--pad);
  }
}
/* one column per exam board (pointer 3): the board's name is the biggest, boldest line of its column, its five
   subjects under it smaller and lighter, then Show all subjects */
.gn-col {
  min-width: 0;
  width: 248px;
}
.gn-col-h {
  margin-bottom: 14px;
  font-size: 19px;
  font-weight: 680;
  font-stretch: 104%;
  line-height: 1.25;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.gn-col-small {
  width: auto;
}
.gn-col-small .gn-col-h {
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 600;
  font-stretch: 100%;
  line-height: 1.55;
  letter-spacing: 0.01em;
}
.gn-big li + li {
  margin-top: 2px;
}
.gn-big a,
.gn-big .gn-off {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  column-gap: 8px;
  padding: 4px 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.005em;
}
.gn-big a span,
.gn-big .gn-off span,
.gn-tag {
  font-size: 12px;
  font-weight: 500;
  font-style: normal;
  letter-spacing: 0.02em;
}
.gn-more {
  margin-top: 14px;
}
.gn-more a {
  display: inline-block;
  padding: 3px 0;
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
}
.gn-big a:hover,
.gn-small a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 5px;
}
.gn-small li + li {
  margin-top: 6px;
}
.gn-small a {
  display: inline-block;
  padding: 3px 0;
  font-size: 14px;
  font-weight: 600;
}
html.motion .gn-item.is-open .gn-col {
  animation: gn-col 0.5s var(--ease) both;
}
html.motion .gn-item.is-open .gn-col:nth-child(2) {
  animation-delay: 0.04s;
}
html.motion .gn-item.is-open .gn-col:nth-child(3) {
  animation-delay: 0.08s;
}
html.motion .gn-item.is-open .gn-col:nth-child(4) {
  animation-delay: 0.12s;
}
@keyframes gn-col {
  from {
    opacity: 0;
    transform: translate3d(0, -6px, 0);
  }
}
.gn-curtain {
  position: fixed;
  z-index: 45;
  inset: var(--gn-h) 0 0 0;
  visibility: hidden;
  opacity: 0;
  background: rgb(232 232 237 / 0.4);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  transition:
    opacity 0.32s,
    visibility 0s linear 0.32s;
}
.gn-curtain.is-dark {
  background: rgb(0 0 0 / 0.5);
}
.gn-curtain.on {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.32s;
}
@media (max-width: 1023px) {
  .gn-curtain {
    display: none;
  }
}

/* the signed-in student's account: a round initial in the bar, a small sheet under it */
.gn-me {
  position: relative;
}
.gn-avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 17px;
  font-weight: 650;
  transition: box-shadow 0.2s;
}
.gn-avatar:hover,
.gn-me.is-open .gn-avatar {
  box-shadow: 0 0 0 3px rgb(23 91 232 / 0.25);
}
.gn-sheet {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  width: 288px;
  padding: 8px;
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  box-shadow:
    0 0 0 1px rgb(11 13 18 / 0.06),
    0 24px 48px -16px rgb(11 13 18 / 0.28);
  visibility: hidden;
  opacity: 0;
  transform: translate3d(0, -6px, 0);
  transition:
    opacity 0.2s,
    transform 0.3s var(--ease),
    visibility 0s linear 0.3s;
}
.gn-me.is-open .gn-sheet {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition:
    opacity 0.2s,
    transform 0.3s var(--ease);
}
/* Study v5 (owner, 2026-11-15: "the hover profile menu is also not the best ... revamp that"): the sheet opens on
   who you are (your initial, name, address and plan), then the places your account keeps, each with a line glyph of
   what it opens, the upgrade a tinted row of its own for a free account, and Sign Out apart at the foot. The glyphs
   are masks read from each row's address, so the rows' markup is the same. */
.gn-me .gn-sheet {
  width: 300px;
}
.gn-sheet-who {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  column-gap: 12px;
  align-items: center;
  padding: 10px 10px 14px;
  border-bottom: 1px solid var(--line);
}
.gn-sheet-avatar {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 15px;
  font-weight: 650;
}
.gn-sheet-name {
  grid-column: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.3;
}
.gn-sheet-mail {
  grid-column: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  line-height: 1.4;
  color: #6e6e73;
}
.gn-sheet-plan {
  grid-column: 2;
  justify-self: start;
  display: inline-flex;
  margin-top: 8px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue-text);
  font-size: 12px;
  font-weight: 650;
}
.gn-sheet-plan.is-free {
  background: var(--mist);
  color: var(--ink);
}
.gn-sheet-rows {
  display: grid;
  gap: 2px;
  padding: 6px 0;
}
.gn-sheet-rows a,
.gn-sheet button {
  --gn-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3.5'/%3E%3C/svg%3E");
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 42px;
  padding: 0 10px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  text-align: left;
  transition: background-color 0.15s;
}
.gn-sheet-rows a::before,
.gn-sheet form button::before {
  content: "";
  flex: none;
  width: 18px;
  height: 18px;
  background: #6e6e73;
  -webkit-mask: var(--gn-glyph) center / contain no-repeat;
  mask: var(--gn-glyph) center / contain no-repeat;
}
.gn-sheet-rows a[href*="/dashboard/"] {
  --gn-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='3.5' width='7' height='7' rx='1.75'/%3E%3Crect x='13.5' y='3.5' width='7' height='7' rx='1.75'/%3E%3Crect x='3.5' y='13.5' width='7' height='7' rx='1.75'/%3E%3Crect x='13.5' y='13.5' width='7' height='7' rx='1.75'/%3E%3C/svg%3E");
}
.gn-sheet-rows a[href*="/profile/"] {
  --gn-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8.5' r='3.75'/%3E%3Cpath d='M4.75 20.25c.9-3.75 3.75-5.75 7.25-5.75s6.35 2 7.25 5.75'/%3E%3C/svg%3E");
}
.gn-sheet-rows a[href*="/billing/"] {
  --gn-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5.5' width='18' height='13' rx='2.5'/%3E%3Cpath d='M3 10h18M7 15h4'/%3E%3C/svg%3E");
}
.gn-sheet form button {
  --gn-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 4H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h3'/%3E%3Cpath d='M15 8l4 4-4 4M19 12H9.5'/%3E%3C/svg%3E");
}
.gn-sheet-rows a:hover,
.gn-sheet button:hover {
  background: var(--mist);
}
.gn-sheet-rows a.is-blue {
  --gn-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 3.5l1.85 4.65L17.5 10l-4.65 1.85L11 16.5l-1.85-4.65L4.5 10l4.65-1.85z'/%3E%3Cpath d='M18.25 14.5l.85 2.15 2.15.85-2.15.85-.85 2.15-.85-2.15-2.15-.85 2.15-.85z'/%3E%3C/svg%3E");
  margin-top: 4px;
  background: var(--blue-soft);
  color: var(--blue-text);
  font-weight: 650;
}
.gn-sheet-rows a.is-blue::before {
  background: currentColor;
}
.gn-sheet-rows a.is-blue:hover {
  background: color-mix(in srgb, var(--blue) 14%, #fff);
}
.gn-sheet form {
  margin: 0;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}

/* the phone menu: the programmes, and a page of courses for each */
.mm {
  position: fixed;
  z-index: 49;
  inset: var(--gn-h) 0 0 0;
  overflow: hidden;
  background: var(--snow);
  color: var(--ink);
}
.mm.is-dark {
  background: var(--night);
  color: var(--on-night);
}
.mm-pane {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  transition:
    transform 0.42s var(--ease),
    opacity 0.3s,
    visibility 0s linear 0.42s;
}
.mm-root {
  visibility: visible;
  transition:
    transform 0.42s var(--ease),
    opacity 0.3s;
}
.mm.is-sub .mm-root {
  visibility: hidden;
  opacity: 0;
  transform: translate3d(-12%, 0, 0);
  transition:
    transform 0.42s var(--ease),
    opacity 0.3s,
    visibility 0s linear 0.42s;
}
.mm-sub {
  visibility: hidden;
  opacity: 0;
  transform: translate3d(14%, 0, 0);
}
.mm-sub.is-on {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition:
    transform 0.42s var(--ease),
    opacity 0.3s;
}
.mm-in {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  padding-top: 18px;
  padding-bottom: max(28px, env(safe-area-inset-bottom));
}
.mm-form {
  display: contents;
}
.mm-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 56px;
  font-size: 28px;
  font-weight: 620;
  font-stretch: 106%;
  letter-spacing: -0.025em;
  text-align: left;
}
.mm-row svg,
.mm-back svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
html.motion .mm.is-in .mm-list li {
  animation: mm-row 0.5s var(--ease) both;
}
html.motion .mm.is-in .mm-list li:nth-child(2) {
  animation-delay: 0.03s;
}
html.motion .mm.is-in .mm-list li:nth-child(3) {
  animation-delay: 0.06s;
}
html.motion .mm.is-in .mm-list li:nth-child(4) {
  animation-delay: 0.09s;
}
html.motion .mm.is-in .mm-list li:nth-child(5) {
  animation-delay: 0.12s;
}
html.motion .mm.is-in .mm-list li:nth-child(n + 6) {
  animation-delay: 0.15s;
}
@keyframes mm-row {
  from {
    opacity: 0;
    transform: translate3d(0, -8px, 0);
  }
}
.mm-foot {
  display: grid;
  gap: 16px;
  margin-top: auto;
  padding-top: 40px;
  font-size: 15px;
}
.mm-foot p a,
.mm-foot button {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.mm-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  margin-left: -4px;
  font-size: 15px;
  font-weight: 500;
}
.mm-h {
  margin-top: 6px;
  font-size: 34px;
  font-weight: 650;
  font-stretch: 106%;
  letter-spacing: -0.03em;
}
/* each board's page as in the bar's panel (pointer 3): the board's name the biggest line, its subjects under it */
.mm-group {
  margin-top: 30px;
  font-size: 22px;
  font-weight: 680;
  font-stretch: 104%;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.mm-courses {
  margin-top: 6px;
}
.mm-courses a,
.mm-courses .gn-off {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 8px;
  padding: 8px 0;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.005em;
}
.mm-courses a span,
.mm-courses .gn-off span {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.mm-more {
  margin-top: 6px;
  font-size: 15px;
  font-weight: 600;
}
.mm-more a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
}
.mm-all {
  margin-top: 26px;
  font-size: 15px;
  font-weight: 600;
}
.mm-all a {
  text-decoration: underline;
  text-underline-offset: 4px;
}
@media (min-width: 1024px) {
  .mm {
    display: none !important;
  }
}

/* ---------- footer, on Apple's light grey ---------- */
.ftr {
  padding: 64px 0 max(40px, env(safe-area-inset-bottom));
  background: var(--mist);
  font-size: 15px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}
.brand-name {
  font-size: 19px;
  font-weight: 650;
  font-stretch: 106%;
  letter-spacing: -0.025em;
}
.ftr-top {
  display: grid;
  gap: 36px 24px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.ftr-brand {
  grid-column: 1 / -1;
}
/* on a 320 phone the first column takes its longest link (How the marker works), which broke onto two lines in a
   half-width column (the nitpick check, 2026-11-27) */
@media (max-width: 359px) {
  .ftr-top {
    grid-template-columns: max-content minmax(0, 1fr);
  }
}
.ftr-brand p {
  max-width: 26em;
  margin-top: 10px;
  line-height: 1.55;
}
.ftr-h {
  font-size: 14px;
  font-weight: 700;
}
.ftr-col ul {
  margin-top: 8px;
}
.ftr-col a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
}
.ftr-col a:hover {
  color: var(--blue-text);
}
.ftr-bottom {
  display: grid;
  gap: 18px 48px;
  margin-top: 48px;
  padding-top: 22px;
  border-top: 1px solid var(--line-2);
}
@media (min-width: 860px) {
  .ftr-bottom {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }
}
.ftr-end a {
  font-size: 12.5px;
  font-weight: 600;
}
.ftr-end a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.ftr-legal {
  display: grid;
  gap: 10px;
  font-size: 13px;
  line-height: 1.55;
}
.ftr-docs {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 22px;
}
.ftr-docs a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  font-weight: 600;
}
.ftr-docs a:hover {
  color: var(--blue-text);
}
.ftr-docs .sf-sep {
  display: none;
}
.ftr-notices {
  display: grid;
  gap: 6px;
}
@media (min-width: 860px) {
  .ftr-top {
    grid-template-columns: 2fr 1fr 1fr 1fr 1.2fr;
  }
  .ftr-brand {
    grid-column: auto;
  }
}


/* ==========================================================================
   Study v5: the chrome on a study page (pages/nb_base.html, body.study). The same bar, account sheet, menu and
   footer as the site, in the student's theme. docs/redesign/STUDY-DESIGN.md.
   ========================================================================== */

/* The bar sits in the page's flow and stays at the top: a study page has no opening for it to float over. It
   takes the old study bar's place in the stack (the tutor sheet below it; the sheets, the thumb bar and the login
   window above). */
body.study .gn {
  position: sticky;
  top: 0;
  z-index: 1000;
}
/* the study pages' own copy of the bar's height (notebook-tokens.css, 64px for the old bar of pages/base.html), which
   their sticky parts and full-height sheets subtract, is the site bar's height here (pointer 4 made the bar larger).
   A later rule that sets it to 0 (a short landscape screen, the MCQ video mode) still wins. */
:root {
  --nb-chrome-h: var(--gn-h);
}
body.study .gn-curtain,
body.study .mm {
  z-index: 999;
}
/* The floating theme button is gone from the study pages (the bar's appearance menu took its place), so the lane kept
   clear for it from 1024 to 1279px (interaction-feedback.css, --ft-theme-lane) is the page's own gutter now: a column
   centres in its track again, and the topic questions bar ends on the question's edge (owner, 2026-11-15). */
body.study {
  --ft-theme-lane: clamp(20px, 2.5vw, 48px);
}
/* A short screen scrolls the bar away with the page (audit N-031a, as the old bar did; chrome-navbar.css zeroes
   --nb-chrome-h there): not while the menu is open, and not on the flashcards, whose card is sized under a bar it
   measures as always there. */
@media (max-width: 1080px) and (max-height: 500px) {
  html:not(.menu-open):not(:has(.nb-fc-scene)) body.study .gn {
    position: relative;
  }
}

/* by night: the account sheet and the appearance menu are raised dark sheets (html.theme-dark is the study
   area's own class; a site page never carries it) */
html.theme-dark .gn-sheet {
  background: #1d1d1f;
  color: var(--on-night);
  box-shadow:
    0 0 0 1px rgb(255 255 255 / 0.1),
    0 24px 48px -16px rgb(0 0 0 / 0.75);
}
html.theme-dark .gn-sheet-who,
html.theme-dark .gn-sheet form {
  border-color: rgb(255 255 255 / 0.1);
}
html.theme-dark .gn-sheet-mail {
  color: #aeaeb2;
}
html.theme-dark .gn-sheet-rows a::before,
html.theme-dark .gn-sheet form button::before {
  background: #aeaeb2;
}
html.theme-dark .gn-sheet-plan {
  background: rgb(107 155 255 / 0.16);
  color: var(--blue-on-night);
}
html.theme-dark .gn-sheet-plan.is-free {
  background: rgb(255 255 255 / 0.08);
  color: var(--on-night);
}
html.theme-dark .gn-sheet-rows a:hover,
html.theme-dark .gn-sheet button:hover {
  background: rgb(255 255 255 / 0.08);
}
html.theme-dark .gn-sheet-rows a.is-blue {
  background: rgb(107 155 255 / 0.14);
  color: var(--blue-on-night);
}
html.theme-dark .gn-sheet-rows a.is-blue::before {
  background: currentColor;
}
html.theme-dark .gn-sheet-rows a.is-blue:hover {
  background: rgb(107 155 255 / 0.22);
}

/* the appearance menu (study pages): Light, Dark or Auto, the same choice as the More sheet's three (theme-toggle.js
   binds every input[data-theme-set] and writes the one key, esa-theme) */
.gn-pop {
  position: relative;
}
.gn-pop.is-open .gn-sheet {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition:
    opacity 0.2s,
    transform 0.3s var(--ease);
}
.gn-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  transition: background-color 0.2s;
}
.gn-icon:hover,
.gn-pop.is-open .gn-icon {
  background: rgb(11 13 18 / 0.06);
}
.gn.is-dark .gn-icon:hover,
.gn.is-dark .gn-pop.is-open .gn-icon {
  background: rgb(255 255 255 / 0.12);
}
.gn-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.gn-look-moon,
html.theme-dark .gn-look-sun {
  display: none;
}
html.theme-dark .gn-look-moon {
  display: block;
}
/* on a phone the More sheet carries Light and Dark (pages/includes/site_navbar.html) */
@media (max-width: 860px) {
  body.study .gn-look {
    display: none;
  }
}

/* by night, under a study page */
html.theme-dark .ftr {
  background: #161617;
  color: var(--on-night);
}
html.theme-dark .ftr-bottom {
  border-color: rgb(255 255 255 / 0.1);
}
html.theme-dark .ftr-col a:hover,
html.theme-dark .ftr-docs a:hover {
  color: var(--blue-on-night);
}
html.theme-dark .ftr-notices,
html.theme-dark .ftr-copy {
  color: #aeaeb2;
}
/* focus mode (note-reading.js) takes the bar away with the footer, as it took the old bar (notebook-page.css owns the
   fade and its reduced-motion zero) */
html.note-focus-mode .gn {
  animation: nb-chrome-out var(--nb-dur-2, 240ms) var(--nb-ease, ease) forwards;
}
@media (prefers-reduced-motion: reduce) {
  html.note-focus-mode .gn {
    animation-duration: 0s;
    animation-delay: 0s;
  }
}
