/*
 * Tokonomo Academy design system. Loaded after the generated theme stylesheet (site.css), which is never edited:
 * 1. tokens (override the theme's --cs-* variables)  2. components  3. header, menus, footer  4. pages  5. home  6. motion.
 * See docs/design-system.md.
 */

/* 1. Tokens ------------------------------------------------------------------------------------------------------- */
:root {
  --academy-brand: #c1d55d;
  /* Radii: small parts, cards and images, panels and menus, hero. Buttons, fields and chips are pills. */
  --academy-radius-sm: 0.75rem;
  --academy-radius: 1rem;
  --academy-radius-lg: 1.5rem;
  --academy-radius-xl: 1.75rem;
  --academy-ease: cubic-bezier(0.215, 0.61, 0.355, 1);
  --academy-ease-snap: cubic-bezier(0.23, 1, 0.32, 1);
  --academy-gap: 4rem;
  /* The header pill: its distance from the top and its width, which is the theme container without its 24px padding. */
  --academy-header-inset: 0.75rem;
  --academy-pill-width: calc(100% - 1.5rem);

  --cs-header-initial-height: 3.5rem;
  --cs-layout-elements-border-radius: var(--academy-radius);
  --cs-thumbnail-border-radius: var(--academy-radius);
  --cs-button-border-radius: 999px;
  --cs-input-border-radius: 999px;
  --cs-category-label-border-radius: 999px;
  --cs-badge-border-radius: 999px;
  --cs-tag-border-radius: 999px;

  --cs-font-primary-size: 0.875rem;
  --cs-font-primary-weight: 500;
  --cs-font-primary-letter-spacing: 0;
  --cs-font-primary-text-transform: none;
  --cs-font-input-size: 1rem;
  --cs-font-input-weight: 400;
  --cs-font-post-meta-size: 0.8125rem;
  --cs-font-category-size: 0.6875rem;
  --cs-font-category-letter-spacing: 0.04em;
  --cs-font-headings-excerpt-weight: 400;
  --cs-font-headings-excerpt-letter-spacing: normal;
  --cs-font-headings-excerpt-line-height: 1.5;
  --cs-font-fullscreen-menu-weight: 400;
  --cs-font-fullscreen-menu-letter-spacing: -0.03em;
  /* The first screen uses 400 and 600 (both preloaded in document.ts); the logo joins the titles at 600. */
  --cs-font-main-logo-weight: 600;
  --cs-font-footer-logo-weight: 600;
}
@media (min-width: 600px) {
  :root {
    --academy-pill-width: 552px;
  }
}
@media (min-width: 720px) {
  :root {
    --academy-pill-width: 672px;
  }
}
@media (min-width: 1020px) {
  :root {
    --academy-gap: 6rem;
    --academy-pill-width: 972px;
  }
}
@media (min-width: 1200px) {
  :root {
    --academy-header-inset: 1rem;
    --academy-pill-width: 1152px;
    --cs-header-initial-height: 4rem;
  }
}
@media (min-width: 1280px) {
  :root {
    --academy-pill-width: 1232px;
  }
}
@media (min-width: 1432px) {
  :root {
    --academy-pill-width: 1384px;
  }
}
@media (min-width: 1778px) {
  :root {
    --academy-pill-width: 1730px;
  }
}
/* Site surfaces. The theme script reads these to pick light or dark text, so they stay plain grey hex or rgba values. */
:root,
[data-site-scheme='default'] {
  --cs-color-site-background: #f5f5f5;
  --cs-color-footer-bottom-background: #f5f5f5;
  --cs-color-fullscreen-menu-background: rgba(245, 245, 245, 0.92);
  --academy-glass: rgba(255, 255, 255, 0.78);
  --academy-line: #e8e8e8;
  --academy-ring: rgba(0, 0, 0, 0.05);
  --academy-shadow-raised: 0 6px 10px -4px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.05);
  --academy-shadow-soft: 0 3px 5px rgba(200, 206, 215, 0.25), 0 2px 3px rgba(135, 175, 199, 0.12), 0 4px 10px rgba(222, 228, 235, 0.25);
}
:root,
[data-scheme='default'] {
  --cs-color-primary: #141614;
  --cs-color-button: #141614;
  --cs-color-button-hover: #323532;
  /* The theme prints its "secondary" colour as text; brand lime is unreadable on white, so in the light scheme it is grey. */
  --cs-color-secondary: #717275;
  --cs-color-link: #141614;
  --cs-color-link-hover: #717275;
  --cs-color-post-meta: #717275;
  --cs-color-post-meta-link: #4a4c4e;
  --cs-color-post-meta-link-hover: #141614;
  --cs-color-contrast-200: #e8e8e8;
  --cs-color-layout-elements: #e8e8e8;
  --cs-color-category: #ececec;
  --cs-color-category-contrast: #141614;
  --cs-color-category-hover: #141614;
  --cs-color-tags: #ececec;
  --cs-color-tags-contrast: #141614;
  --cs-color-tags-hover: #141614;
}
[data-site-scheme='dark'] {
  --cs-color-site-background: #1c1c1c;
  --cs-color-header-background: #292929;
  --cs-color-footer-background: #292929;
  --cs-color-footer-bottom-background: #1c1c1c;
  --cs-color-widgets-background: #292929;
  --cs-color-fullscreen-menu-background: rgba(28, 28, 28, 0.92);
  --academy-glass: rgba(41, 41, 41, 0.78);
  --academy-glow: 16%;
  --academy-beam: #fff;
  --academy-line: #383838;
  --academy-ring: rgba(255, 255, 255, 0.08);
  --academy-shadow-raised: 0 6px 10px -4px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08);
  --academy-shadow-soft: 0 4px 14px rgba(0, 0, 0, 0.3);
}
/*
 * Dark text and control colours. The middle selector covers the header, footer and menus before the theme script has
 * marked them dark: the scheme is set on <body> before the first paint, the script runs after the first user input.
 */
[data-site-scheme='dark'],
[data-site-scheme='dark'] [data-scheme='default'],
[data-scheme='dark'] {
  --cs-color-contrast-50: #000000;
  --cs-color-contrast-100: #333333;
  --cs-color-contrast-200: #383838;
  --cs-color-contrast-300: #606060;
  --cs-color-contrast-400: #777777;
  --cs-color-contrast-500: #8e8e8e;
  --cs-color-contrast-600: #a4a4a4;
  --cs-color-contrast-700: #bbbbbc;
  --cs-color-contrast-800: #d2d2d2;
  --cs-color-contrast-900: #e9e9e9;
  --cs-color-primary: #ffffff;
  --cs-color-primary-contrast: #1c1c1c;
  --cs-color-secondary: #c1d55d;
  --cs-color-secondary-contrast: #292929;
  --cs-color-button: #f5f5f5;
  --cs-color-button-contrast: #141614;
  --cs-color-button-hover: #ffffff;
  --cs-color-button-hover-contrast: #141614;
  --cs-color-excerpt: #a8a8a8;
  --cs-color-link: #ffffff;
  --cs-color-link-hover: rgba(255, 255, 255, 0.75);
  --cs-color-translucent: rgba(255, 255, 255, 0.5);
  --cs-color-post-meta: #a4a4a4;
  --cs-color-post-meta-link: #d2d2d2;
  --cs-color-post-meta-link-hover: #ffffff;
  --cs-color-layout-elements: #383838;
  --cs-color-category: rgba(255, 255, 255, 0.1);
  --cs-color-category-contrast: #ffffff;
  --cs-color-category-hover: #ffffff;
  --cs-color-category-hover-contrast: #141614;
  --cs-color-tags: rgba(255, 255, 255, 0.1);
  --cs-color-tags-contrast: #ffffff;
  --cs-color-tags-hover: #ffffff;
  --cs-color-tags-hover-contrast: #141614;
}

/* 2. Components --------------------------------------------------------------------------------------------------- */

/* Buttons: pills, 48px; a press scales them down. */
button,
input[type='button'],
input[type='reset'],
input[type='submit'],
.cs-button,
.cs-search__submit,
.wp-block-button .wp-block-button__link,
.pk-subscribe-form-wrap .pk-subscribe-submit {
  padding: 1.0625rem 1.5rem;
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s, transform 0.12s var(--academy-ease-snap);
}
button:active,
input[type='submit']:active,
.cs-button:active,
.cs-header__cta-link:active,
.wp-block-button .wp-block-button__link:active,
.academy-button:active {
  transform: scale(0.97);
}
.wp-block-button:not(.is-style-outline) .wp-block-button__link:hover {
  opacity: 1;
}
/* Secondary (white, raised) and accent (brand) buttons. */
.academy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0 1.5rem;
  border: 0;
  border-radius: 999px;
  background: var(--cs-color-widgets-background);
  box-shadow: var(--academy-shadow-raised);
  color: var(--cs-color-primary);
  font-family: var(--cs-font-primary-family), sans-serif;
  font-size: var(--cs-font-primary-size);
  font-weight: var(--cs-font-primary-weight);
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s, transform 0.12s var(--academy-ease-snap);
}
.academy-button:hover {
  background: var(--cs-color-widgets-background);
  color: var(--cs-color-primary);
}
/* Under the pointer a button lifts, and an arrow in it moves on. */
.academy-button:hover:not(:active) {
  transform: translateY(-2px);
  box-shadow: 0 10px 18px -8px rgba(0, 0, 0, 0.25), 0 0 0 1px var(--academy-ring);
}
.academy-button span {
  display: inline-block;
  transition: transform 0.2s var(--academy-ease-snap);
}
.academy-button:hover span {
  transform: translateX(3px);
}
.academy-button--small {
  min-height: 2.25rem;
  padding: 0 1rem;
}
.academy-button--accent,
.academy-button--accent:hover {
  background: var(--academy-brand);
  box-shadow: none;
  color: #141614;
}
.academy-button--block {
  display: flex;
  width: 100%;
}

/* Fields: pills with a brand focus ring. */
input[type='text'],
input[type='email'],
input[type='url'],
input[type='password'],
input[type='search'],
input[type='number'],
input[type='tel'],
select,
textarea {
  padding: 0.625rem 1.25rem;
  border-color: var(--academy-line);
  transition: border-color 0.2s, box-shadow 0.2s;
}
textarea {
  border-radius: var(--academy-radius);
}
input:not([type='checkbox']):not([type='radio']):focus,
select:focus,
textarea:focus {
  border-color: color-mix(in srgb, var(--academy-brand) 70%, var(--cs-color-primary));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--academy-brand) 40%, transparent);
}
input[type='checkbox'],
input[type='radio'] {
  accent-color: var(--academy-brand);
}

/* Chips: category, level, tags and counters share one shape. */
.cs-entry__post-meta .cs-meta-category .post-categories a,
.cs-entry__post-meta .cs-meta-level > a,
.cs-entry__post-meta .cs-meta-level > span,
.cs-entry__post-meta .cs-meta-fresh > span,
.academy-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.3125rem 0.625rem;
  border-radius: 999px;
  line-height: 1;
}
.academy-chip {
  background: var(--cs-color-category);
  color: var(--cs-color-primary);
  font-family: var(--cs-font-category-family), sans-serif;
  font-size: var(--cs-font-category-size);
  font-weight: var(--cs-font-category-weight);
  letter-spacing: var(--cs-font-category-letter-spacing);
  text-transform: var(--cs-font-category-text-transform);
  text-decoration: none;
}
.cs-entry__post-meta .cs-meta-category .post-categories li {
  padding: 0;
}
.cs-entry__post-meta .cs-meta-category .post-categories li:not(:first-child) {
  margin-left: 0.375rem;
}
/* Meta rows: a dot between items, none around chips. */
.cs-entry__post-meta > *:not(:first-child)::before {
  width: 3px;
  height: 3px;
  margin: 0 0.5rem;
  border-radius: 50%;
  background-color: currentColor;
  opacity: 0.5;
}
.cs-entry__post-meta > .cs-meta-level:not(:first-child)::before {
  width: 0;
  margin: 0 0.1875rem;
}
.cs-entry__post-meta .cs-meta-author .cs-author {
  font-weight: 600;
}
/* Under a post title on a phone the row wraps: space instead of dots, so no line starts with one. */
@media (max-width: 719px) {
  .cs-entry__header .cs-entry__title-wrapper ~ .cs-entry__post-meta {
    gap: 0.25rem 1rem;
  }
  .cs-entry__header .cs-entry__title-wrapper ~ .cs-entry__post-meta > *::before {
    display: none;
  }
}
.cs-entry__tags ul a,
.cs-search__tags ul a {
  padding: 0.4375rem 0.75rem;
}

/* Card excerpts are body text on their own line; the theme set them inline at the size of the title. */
.cs-entry__excerpt {
  display: block;
  margin: 0.5rem 0 0;
  font-size: 1rem;
}

/* Section headings: large and light, like the hero title, in lines of even length; a lead leaves no word alone on its last line. */
.academy-section > .cs-section-heading,
.cs-entry__post-related .cs-section-heading,
.cs-entry__subscribe .cs-site-subscribe__title {
  display: block;
  margin: 0;
  font-family: var(--cs-font-headings-family), sans-serif;
  font-size: 1.75rem;
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.1;
  text-transform: none;
  text-wrap: balance;
}
.academy-section > .cs-section-heading .cnvs-section-title,
.cs-entry__post-related .cs-section-heading .cnvs-section-title {
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}
.academy-section__lead,
.cs-entry__subscribe .cs-site-subscribe__excerpt {
  display: block;
  max-width: 40rem;
  margin: 0.625rem 0 0;
  color: var(--cs-color-excerpt);
  font-family: var(--cs-font-base-family), sans-serif;
  font-size: 1.0625rem;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.5;
  text-wrap: pretty;
}
.academy-section > .cs-section-heading ~ :not(.academy-section__lead),
.academy-section > .academy-section__lead + *,
.cs-entry__post-related .cs-section-heading + * {
  margin-top: 1.75rem;
}
@media (min-width: 720px) {
  .academy-section > .cs-section-heading,
  .cs-entry__post-related .cs-section-heading,
  .cs-entry__subscribe .cs-site-subscribe__title {
    font-size: 2.25rem;
  }
}

/* Card: 16:9 picture, chips, title, two lines of excerpt, a meta line. Used by archives, the home, related posts and the search panel. */
.academy-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem 1.5rem;
}
.academy-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.academy-card .cs-entry__thumbnail {
  margin: 0;
}
.academy-card .cs-entry__thumbnail img {
  transition: transform 0.6s var(--academy-ease);
}
.academy-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 1rem;
}
.academy-card .academy-card__body > * {
  margin: 0;
}
.academy-card .cs-entry__title-wrapper {
  display: block;
}
.academy-card .cs-entry__title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  transition: color 0.2s;
}
.academy-card .cs-entry__title-wrapper:hover .cs-entry__title {
  color: var(--cs-color-excerpt);
}
.academy-card .cs-entry__excerpt {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: 0.9375rem;
}
.academy-card .cs-entry__post-meta:empty {
  display: none;
}
@media (hover: hover) {
  .academy-card:hover .cs-entry__thumbnail img {
    transform: scale(1.04);
  }
}
@media (min-width: 720px) {
  .academy-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1020px) {
  .academy-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .academy-grid.academy-archive {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3rem 2rem;
  }
  /* When one card would be left alone in the last row (10 posts in 3 columns), the first one takes a full row instead. */
  .academy-archive > .academy-card:first-child:nth-last-child(3n + 1) {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    gap: 2.5rem;
  }
  .academy-archive > .academy-card:first-child:nth-last-child(3n + 1) .academy-card__body {
    gap: 0.875rem;
    padding: 0;
  }
  .academy-archive > .academy-card:first-child:nth-last-child(3n + 1) .cs-entry__title {
    font-size: 2rem;
    font-weight: 400;
    letter-spacing: -0.03em;
    line-height: 1.15;
  }
  .academy-archive > .academy-card:first-child:nth-last-child(3n + 1) .cs-entry__excerpt {
    -webkit-line-clamp: 3;
    font-size: 1.0625rem;
  }
}

/* Newsletter: a centred panel. A form with one field is a single pill with the button inside. */
.cs-entry__subscribe {
  padding: 2.5rem 1.5rem;
  border-radius: var(--academy-radius-xl);
  background: var(--cs-color-widgets-background);
  text-align: center;
}
.cs-entry__subscribe:not(:first-child) {
  margin-top: var(--academy-gap);
}
.cs-entry__subscribe .cs-site-subscribe__excerpt {
  margin-inline: auto;
}
.cs-entry__subscribe .cs-site-subscribe__form {
  gap: 1.5rem;
  max-width: 36rem;
}
.cs-entry__subscribe .pk-subscribe-form-wrap {
  margin: 0;
}
/* What the email brings: a short checklist between the text and the form. */
.cs-site-subscribe__points {
  display: inline-grid;
  gap: 0.5rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
  line-height: 1.35;
  text-align: left;
  text-wrap: balance;
}
.cs-site-subscribe__points li {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}
.cs-site-subscribe__points li::before {
  content: '';
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background: var(--academy-brand)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23141614' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 10.5l2.75 2.75L14 7.5'/%3E%3C/svg%3E")
    center / 100% no-repeat;
}
.pk-subscribe-form-wrap .pk-input-group input[type='text'] {
  padding: 0.625rem 1.25rem;
}
.pk-subscribe-form-wrap .pk-privacy {
  color: var(--cs-color-excerpt);
  font-size: 0.75rem;
  line-height: 1.45;
}
.pk-subscribe-form-wrap:not(.pk-subscribe-with-name) .pk-input-group {
  position: relative;
  flex-direction: row;
  align-items: center;
  padding: 0.25rem;
  border: 1px solid var(--academy-line);
  border-radius: 999px;
  background: var(--cs-color-primary-contrast);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.pk-subscribe-form-wrap:not(.pk-subscribe-with-name) .pk-input-group:focus-within {
  border-color: color-mix(in srgb, var(--academy-brand) 70%, var(--cs-color-primary));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--academy-brand) 40%, transparent);
}
.pk-subscribe-form-wrap:not(.pk-subscribe-with-name) .pk-input-group input[type='text'] {
  flex: 1 1 auto;
  width: 1%;
  min-width: 0;
  padding: 0.5rem 1rem;
  border: 0;
  background: none;
  box-shadow: none;
}
.pk-subscribe-form-wrap:not(.pk-subscribe-with-name) .pk-input-group .pk-subscribe-submit {
  flex: none;
  width: auto;
  margin: 0;
  padding: 0.8125rem 1.25rem;
}
@media (min-width: 1020px) {
  .cs-entry__subscribe {
    padding: 4rem;
  }
}

/* Page links under an archive. */
.academy-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0.75rem;
  margin-top: 3rem;
}
.academy-pagination ul {
  display: flex;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.academy-pagination li > * {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.5rem;
  border-radius: 999px;
  color: var(--cs-color-primary);
  font-family: var(--cs-font-primary-family), sans-serif;
  font-size: var(--cs-font-primary-size);
  font-weight: var(--cs-font-primary-weight);
  text-decoration: none;
  transition: background-color 0.2s;
}
.academy-pagination li a:hover {
  background: var(--cs-color-category);
}
.academy-pagination li [aria-current] {
  background: var(--cs-color-primary);
  color: var(--cs-color-primary-contrast);
}

/* A level is told by its ring (levelMark() in parts.ts), not by a colour: an ink disc, lime arcs. */
.academy-level-mark {
  flex: none;
}
.cs-entry__post-meta .cs-meta-level > a,
.cs-entry__post-meta .cs-meta-level > span,
.cs-entry__post-meta .cs-meta-fresh > span {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.1875rem 0.5rem;
  line-height: 1;
  border-radius: 999px;
  background: var(--cs-color-category);
  color: var(--cs-color-primary);
  font-family: var(--cs-font-category-family), sans-serif;
  font-size: var(--cs-font-category-size);
  font-weight: var(--cs-font-category-weight);
  letter-spacing: var(--cs-font-category-letter-spacing);
  text-transform: var(--cs-font-category-text-transform);
}
/* "We keep this article up to date" (metaFresh() in parts.ts): a level chip on light lime. */
.cs-entry__post-meta .cs-meta-fresh > span {
  background: color-mix(in srgb, var(--academy-brand) 18%, transparent);
}
/* The chips above a post title are spaced by their row: a chip that wraps starts its line, with air above it. */
.cs-entry__header-info > .cs-entry__post-meta:first-child {
  gap: 0.375rem;
}
.cs-entry__header-info > .cs-entry__post-meta:first-child > *::before {
  display: none;
}

/* App-style icon: the theme's category letter tile, rounded instead of clipped so it scales. */
.academy-icon.cs-entry__title-category-letter,
.academy-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 4rem;
  height: 4rem;
  margin: 0;
  border-radius: 28%;
  clip-path: none;
  -webkit-clip-path: none;
  background-size: 100% 200%;
  font-size: 2.5rem;
  box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.35);
}
.academy-icon--small.cs-entry__title-category-letter {
  width: 2.75rem;
  height: 2.75rem;
  font-size: 1.625rem;
}

/* 3. Header, menus, footer ---------------------------------------------------------------------------------------- */

/* Header: a floating glass pill, sticky. The bar around it is transparent and lets clicks through. */
.cs-site .cs-header.cs-header-three {
  padding-top: var(--academy-header-inset);
  background: none;
  pointer-events: none;
}
.cs-site .cs-header.cs-header-three::before {
  content: none;
}
.cs-header > .cs-container {
  width: var(--academy-pill-width);
  max-width: none;
  padding: 0;
}
.cs-header__inner {
  padding: 0 0.5rem 0 1.25rem;
  border-radius: 999px;
  background: var(--academy-glass);
  -webkit-backdrop-filter: blur(16px) saturate(1.6);
  backdrop-filter: blur(16px) saturate(1.6);
  box-shadow: var(--academy-shadow-soft), 0 0 0 1px var(--academy-ring);
  pointer-events: auto;
}
.cs-header__inner-mobile .cs-header__col.cs-col-left {
  flex: 0 1 auto;
}
.cs-header__inner-mobile .cs-header__logo {
  font-size: 1.25rem;
}
.cs-header__cta-link {
  padding: 0.8125rem 1.25rem;
  transition: background-color 0.2s, color 0.2s, transform 0.12s var(--academy-ease-snap);
}
@media (min-width: 1200px) {
  .cs-header__inner {
    padding: 0 0.75rem 0 1.5rem;
  }
  .cs-header__cta {
    display: flex;
  }
}

/* "Menu" / "Close": two bars that cross when the menu is open. */
.academy-menu-toggle {
  gap: 0.5rem;
  min-height: 2.5rem;
  padding: 0 1rem 0 0.875rem;
}
.academy-menu-toggle__icon {
  position: relative;
  width: 0.875rem;
  height: 0.5rem;
}
.academy-menu-toggle__icon::before,
.academy-menu-toggle__icon::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.4s var(--academy-ease-snap);
}
.academy-menu-toggle__icon::before {
  top: 0;
}
.academy-menu-toggle__icon::after {
  bottom: 0;
}
.academy-menu-toggle--close .academy-menu-toggle__icon::before {
  transform: translateY(3.25px) rotate(45deg);
}
.academy-menu-toggle--close .academy-menu-toggle__icon::after {
  transform: translateY(-3.25px) rotate(-45deg);
}
@media (max-width: 359px) {
  .academy-menu-toggle__label {
    display: none;
  }
  .academy-menu-toggle {
    padding: 0 0.8125rem;
  }
}

/*
 * Mobile menu: a popover card that covers the header pill and grows down from it. `display` is set only for the open
 * states, so the card stays hidden where the Popover API is missing (the script then toggles .is-open).
 */
.academy-menu {
  display: none;
  position: fixed;
  inset: var(--academy-header-inset) 0 auto;
  width: var(--academy-pill-width);
  max-height: calc(100dvh - 2 * var(--academy-header-inset));
  margin: 0 auto;
  padding: 0;
  border: 0;
  border-radius: var(--academy-radius-xl);
  background: var(--cs-color-widgets-background);
  box-shadow: inset 0 0 0 1px var(--academy-ring);
  color: var(--cs-color-primary);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.academy-menu:popover-open {
  display: block;
}
.academy-menu.is-open {
  display: block;
  z-index: 100;
}
.academy-menu::backdrop {
  background: rgba(20, 22, 20, 0.2);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
body:has(.academy-menu:popover-open) {
  overflow: hidden;
}
@media (min-width: 1200px) {
  .academy-menu:popover-open,
  .academy-menu.is-open {
    display: none;
  }
}
.academy-menu__head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--cs-header-initial-height);
  padding: 0 0.5rem 0 1.25rem;
  background: var(--cs-color-widgets-background);
}
.academy-menu__head .cs-header__logo {
  font-size: 1.25rem;
}
.academy-menu > :not(.academy-menu__head) {
  margin: 0 1.25rem;
  padding: 1rem 0;
}
.academy-menu > :not(.academy-menu__head) + * {
  border-top: 1px solid var(--academy-line);
}
.academy-menu ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.academy-menu__nav {
  font-family: var(--cs-font-headings-family), sans-serif;
}
.academy-menu__nav > ul > li > a,
.academy-menu__group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.625rem 0;
  border-radius: 0;
  background: none;
  color: var(--cs-color-primary);
  font-family: inherit;
  font-size: 1.625rem;
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.15;
  text-align: start;
}
.academy-menu__group:hover {
  background: none;
  color: var(--cs-color-primary);
}
.academy-menu__group:active {
  transform: none;
}
.academy-menu__group::after {
  content: '\e90c';
  font-family: cs-icons;
  font-size: 1rem;
  letter-spacing: 0;
  color: var(--cs-color-excerpt);
  transition: transform 0.3s var(--academy-ease-snap);
}
.academy-menu__group[aria-expanded='true']::after {
  transform: rotate(180deg);
}
/* Sub-items open by animating the grid row from 0fr to 1fr. Without the script they stay open. */
.academy-menu__sub {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 0.3s var(--academy-ease), visibility 0.3s;
}
.academy-menu__sub > ul {
  min-height: 0;
  overflow: hidden;
}
.academy-js .academy-menu__group[aria-expanded='false'] + .academy-menu__sub {
  grid-template-rows: 0fr;
  visibility: hidden;
}
.academy-menu__sub a {
  display: block;
  padding: 0.5rem 0 0.5rem 1rem;
  color: var(--cs-color-excerpt);
  font-family: var(--cs-font-base-family), sans-serif;
  font-size: 1.0625rem;
}
.academy-menu__sub li:last-child a {
  padding-bottom: 0.875rem;
}
.academy-menu__levels,
.academy-menu ul.academy-menu__langs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.academy-menu .academy-chip,
.academy-menu__langs a {
  padding: 0.625rem 0.875rem;
  font-size: 0.75rem;
}
.academy-menu__langs a {
  display: block;
  border-radius: 999px;
  background: var(--cs-color-category);
  color: var(--cs-color-primary);
  font-family: var(--cs-font-category-family), sans-serif;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
}
.academy-menu__langs a[aria-current='true'] {
  background: var(--cs-color-primary);
  color: var(--cs-color-primary-contrast);
}
.academy-menu__tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.academy-menu__tools .cs-header__scheme-toggle {
  margin-left: -0.75rem;
}
.academy-menu > .academy-button {
  width: auto;
  margin-bottom: 1rem;
  padding: 0 1.5rem;
}
.academy-menu > .academy-button + * {
  border-top: 0;
  padding-top: 0;
}
.academy-menu__subscribe .cs-section-heading {
  display: block;
  margin: 0;
  text-wrap: balance;
}
.academy-menu__subscribe .cs-section-heading .cnvs-section-title {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.academy-menu__subscribe .pk-subscribe-message {
  display: block;
  margin: 0.25rem 0 0;
  color: var(--cs-color-excerpt);
  font-family: var(--cs-font-base-family), sans-serif;
  font-size: 0.9375rem;
  font-weight: 400;
  letter-spacing: 0;
}

/* Desktop fullscreen menu: the same content, opening out of the header pill. */
.cs-fullscreen-menu {
  padding-top: calc(var(--cs-header-initial-height) + var(--academy-header-inset) + 1rem);
}
.cs-fullscreen-menu-active .cs-header__inner {
  background: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: none;
}
.cs-fullscreen-menu__nav-inner > li > a {
  padding: 0.5rem 0;
  color: color-mix(in srgb, var(--cs-color-primary) 50%, transparent);
}
.cs-fullscreen-menu__widgets {
  padding-left: 0;
}
.cs-fullscreen-menu__widgets .widget {
  padding: 2rem;
  border-radius: var(--academy-radius-lg);
  background: var(--cs-color-widgets-background);
  box-shadow: var(--academy-shadow-soft), 0 0 0 1px var(--academy-ring);
}
.cs-fullscreen-menu__widgets .textwidget .h1 {
  margin-bottom: 0.75rem;
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: -0.03em;
}
.cs-fullscreen-menu__widgets .textwidget p:not(.h1) {
  color: var(--cs-color-excerpt);
}
.cs-fullscreen-menu .cs-header__multi-column-posts-wrapper .cs-section-heading,
.cs-search__posts-wrapper .cs-section-heading {
  margin-bottom: 1.25rem;
  padding-top: 1.25rem;
  border-top-color: var(--academy-line);
}
.cs-fullscreen-menu .cs-header__multi-column-posts {
  margin: 0;
  gap: 1rem;
  flex-wrap: nowrap;
  align-items: stretch;
}
.cs-fullscreen-menu .cs-header__multi-column-posts .cs-entry {
  flex: 1 1 0;
  max-width: none;
  margin: 0;
  padding: 1.25rem;
  border-radius: var(--academy-radius);
  background: var(--cs-color-widgets-background);
  transition: transform 0.2s var(--academy-ease-snap), box-shadow 0.2s;
}
.cs-fullscreen-menu .cs-header__multi-column-posts .cs-entry:hover {
  transform: translateY(-2px);
  box-shadow: var(--academy-shadow-raised);
}
.cs-fullscreen-menu .cs-entry__excerpt,
.cs-search .cs-entry__excerpt {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: 0.9375rem;
}
.cs-section-link {
  font-family: var(--cs-font-primary-family), sans-serif;
  font-size: var(--cs-font-primary-size);
  font-weight: var(--cs-font-primary-weight);
  letter-spacing: 0;
}

/* Header search: a glass card that drops from the pill. Opened by a class the script sets, not by the theme's slide. */
.cs-header .cs-search {
  display: block !important;
  top: calc(100% + 0.5rem);
  right: 0;
  width: var(--academy-pill-width);
  max-height: calc(100dvh - var(--cs-header-initial-height) - var(--academy-header-inset) - 1.5rem);
  margin: 0 auto;
  padding: 1.25rem 0 1.5rem;
  border-radius: var(--academy-radius-lg);
  background: var(--cs-color-widgets-background);
  box-shadow: 0 24px 48px -16px rgba(0, 0, 0, 0.18), 0 0 0 1px var(--academy-ring);
  overflow-y: auto;
  overscroll-behavior: contain;
  pointer-events: auto;
  visibility: hidden;
  opacity: 0;
}
.cs-header.academy-search-open .cs-search {
  visibility: visible;
  opacity: 1;
}
.cs-search > .cs-container {
  max-width: none;
  padding: 0 1.25rem;
}
.cs-search .cs-search__input {
  height: 3rem;
}
.cs-search__group::before {
  left: 1.25rem;
}
.cs-search__tags-wrapper:not(:first-child),
.cs-search__posts-wrapper {
  margin-top: 1.5rem;
}
.cs-search .cs-search__posts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin: 0;
}
.cs-search .cs-search__posts .cs-entry {
  max-width: none;
  margin: 0;
  padding: 0;
}
@media (min-width: 1020px) {
  .cs-search .cs-search__posts {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.cs-search .cs-section-heading,
.cs-search__tags-wrapper .cs-section-heading {
  margin-bottom: 0.75rem;
}
.cs-fullscreen-menu .cs-section-heading,
.cs-search .cs-section-heading {
  color: var(--cs-color-excerpt);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0;
}
@media (min-width: 1020px) {
  .cs-search > .cs-container {
    padding: 0 2rem;
  }
  .cs-header .cs-search {
    padding: 2rem 0;
  }
}

/* Footer: a rounded panel, then a quiet bottom line with pill links. */
.cs-footer {
  margin-top: var(--academy-gap);
}
.cs-footer__top {
  padding: 0;
  background: none;
}
.cs-footer__top .cs-footer__item {
  padding: 2rem 1.5rem;
  border-radius: var(--academy-radius-xl);
  background: var(--cs-color-footer-background);
}
.cs-footer__info {
  color: var(--cs-color-excerpt);
  font-size: 0.9375rem;
}
.cs-footer__bottom {
  padding: 1.25rem 0 2rem;
}
.cs-footer__nav.cs-footer__nav-horizontal .cs-footer__nav-inner {
  gap: 0.25rem;
}
/* :nth-child(n) to outweigh the theme's li margin. */
.cs-footer__nav.cs-footer__nav-horizontal .cs-footer__nav-inner li:nth-child(n) {
  margin: 0;
  padding: 0;
}
.cs-footer__nav.cs-footer__nav-horizontal .cs-footer__nav-inner li a {
  padding: 0.625rem 0.875rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  white-space: nowrap;
  transition: background-color 0.2s;
}
.cs-footer__nav.cs-footer__nav-horizontal .cs-footer__nav-inner li a:hover {
  background: var(--cs-color-category);
  color: var(--cs-color-primary);
}
/* Links keep one row, the copyright wraps; link text in line with it. */
.cs-footer__bottom .cs-footer__item {
  gap: 1rem 2rem;
}
.cs-footer__bottom .cs-col-left {
  flex: 1 1 0;
  min-width: 15rem;
}
.cs-footer__bottom .cs-col-right {
  flex: 0 1 auto;
  margin: 0;
  padding: 0;
}
.cs-footer__bottom .cs-col-right .cs-footer__inner {
  align-items: stretch;
}
.cs-footer__bottom .cs-footer__nav-inner {
  flex-wrap: wrap;
  margin: -0.625rem -0.875rem;
}
.cs-footer__copyright p {
  margin: 0;
}
/* No Cyrillic in the font: fallback letters scaled to its x-height. */
:lang(ru) .cs-footer__copyright {
  font-size-adjust: 0.539;
}
@media (min-width: 1020px) {
  .cs-footer__top .cs-footer__item {
    padding: 3rem;
  }
  .cs-footer__bottom .cs-footer__item {
    align-items: flex-start;
  }
}
@media (min-width: 1020px) and (max-width: 1199px) {
  .cs-footer__bottom .cs-footer__item {
    flex-direction: column;
  }
  .cs-footer__bottom .cs-footer__nav-horizontal .cs-footer__nav-inner {
    justify-content: flex-start;
  }
}

/* 4. Pages -------------------------------------------------------------------------------------------------------- */
.cs-site-content {
  margin: 1.5rem 0 0;
}
.cs-site-content > .cs-breadcrumbs:first-child {
  margin: 0.5rem auto 1.5rem;
  color: var(--cs-color-post-meta);
  font-size: 0.8125rem;
}
.cs-breadcrumbs a {
  color: var(--cs-color-post-meta);
}
.cs-breadcrumbs a:hover,
.cs-breadcrumbs .breadcrumb_last {
  color: var(--cs-color-primary);
}

/* Page and archive headers: a large light title with body-size text under it. */
.cs-page__header,
.cs-entry__header-standard {
  padding-top: 1.5rem;
}
.cs-page__header:not(:last-child),
.cs-entry__header:not(:last-child) {
  margin-bottom: 2.5rem;
}
.cs-entry__header-info .cs-entry__title,
.cs-page__title {
  max-width: 22ch;
  font-size: 2.25rem;
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.08;
}
.cs-entry__header-info .cs-entry__subtitle,
.cs-page__archive-description {
  display: block;
  max-width: 40rem;
  margin: 1rem 0 0;
  color: var(--cs-color-excerpt);
  font-family: var(--cs-font-base-family), sans-serif;
  font-size: 1.125rem;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.5;
}
.cs-page__archive-count {
  display: inline-flex;
  padding: 0.375rem 0.75rem;
  border-radius: 999px;
  background: var(--cs-color-category);
  color: var(--cs-color-primary);
  line-height: 1;
}
.cs-page__author {
  padding: 2rem 1.5rem;
  border-radius: var(--academy-radius-xl);
  background: var(--cs-color-widgets-background);
}
.cs-page__author-thumbnail {
  border: 0;
  border-radius: 50%;
}
.cs-page__author .cs-page__archive-description {
  font-size: 1rem;
}
@media (min-width: 720px) {
  .cs-entry__header-info .cs-entry__title,
  .cs-page__title {
    font-size: 3rem;
  }
}
@media (min-width: 1020px) {
  .cs-page__header,
  .cs-entry__header-standard {
    padding-top: 2.5rem;
  }
  .cs-page__header:not(:last-child),
  .cs-entry__header:not(:last-child) {
    margin-bottom: 3.5rem;
  }
  .cs-entry__header-info .cs-entry__title,
  .cs-page__title {
    font-size: 3.5rem;
  }
  .cs-page__author {
    padding: 2.5rem;
  }
}

/* Pages built from blocks (About, Contact): their panels take the card radius, a leading title the page-title type. */
.canvas-content .cnvs-block-section-content,
.canvas-content .wp-block-media-text {
  border-radius: var(--academy-radius-xl);
  overflow: hidden;
}
.canvas-content > h1.wp-block-heading:first-child {
  margin: 1.5rem 0 2.5rem;
  font-size: 2.25rem;
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.08;
}
@media (min-width: 1020px) {
  .canvas-content > h1.wp-block-heading:first-child {
    margin: 2.5rem 0 3.5rem;
    font-size: 3.5rem;
  }
}

/* 404 and an empty result: the message and the search, centred. */
.academy-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 3rem 1.5rem;
  border-radius: var(--academy-radius-xl);
  background: var(--cs-color-widgets-background);
  text-align: center;
}
.academy-empty > * {
  margin: 0;
}
.academy-empty .cs-page__header {
  padding: 0;
}
.academy-empty .cs-entry__title,
.academy-empty .cs-entry__subtitle {
  max-width: 34rem;
  margin-inline: auto;
}
.academy-empty .cs-search__form {
  width: 100%;
  max-width: 34rem;
}
.cs-search__form .cs-search__container {
  padding-right: 0.375rem;
  border-color: var(--academy-line);
  border-radius: 999px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.cs-search__form .cs-search__container:focus-within {
  border-color: color-mix(in srgb, var(--academy-brand) 70%, var(--cs-color-primary));
}
.cs-search__form .cs-search__container input:focus {
  box-shadow: none;
}
.cs-search__form .cs-search__submit {
  padding: 0.875rem 1.5rem;
}
@media (min-width: 1020px) {
  .academy-empty {
    padding: 6rem 4rem;
  }
}

/* Post and plain page: one reading column under a header of the same axis. */
.cs-entry__header-standard .cs-entry__header-inner {
  max-width: 64rem;
  margin: 0 auto;
}
.cs-entry__header-standard .cs-entry__post-media img {
  border-radius: var(--academy-radius-lg);
}
@media (min-width: 1020px) {
  .cs-entry__header-standard .cs-entry__header-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}
/* On a post the trail is the first line of the header: same axis and alignment, right above the chips. */
.single-post .cs-site-content > .cs-breadcrumbs:first-child {
  margin-bottom: 0;
}
.single-post .cs-entry__header-standard {
  padding-top: 1rem;
}
@media (min-width: 1020px) {
  .single-post .cs-site-content > .cs-breadcrumbs:first-child {
    margin-top: 1.5rem;
    text-align: center;
  }
  .single-post .cs-entry__header-standard {
    padding-top: 1.25rem;
  }
}
/* The trail is printed above the header; the copy at the top of the text is not shown twice. */
.entry-content > .entry-breadcrumbs:first-child {
  display: none;
}
.entry-content > .entry-breadcrumbs:first-child + * {
  margin-top: 0;
}
.cs-entry__wrap .pk-toc {
  --pk-toc-box-background: var(--cs-color-category);
  --pk-toc-box-color: var(--cs-color-primary);
  --pk-toc-box-small-background: var(--cs-color-contrast-300);
  padding: 1.5rem;
  border-radius: var(--academy-radius-lg);
  background: var(--cs-color-widgets-background);
}
.cs-entry__wrap .pk-toc > ol {
  padding-left: 0;
}
.pk-toc .pk-toc-title {
  margin-bottom: 1rem;
  font-size: 1.125rem;
  font-weight: 600;
}
.pk-toc a {
  transition: color 0.2s;
}
/* Share: round buttons; the side column sticks under the header. */
.cs-entry__metabar .pk-share-buttons-wrap .pk-share-buttons-link,
.cs-entry__after-share-buttons .pk-share-buttons-link {
  border-radius: 999px;
  transition: background-color 0.2s, color 0.2s, transform 0.12s var(--academy-ease-snap);
}
.cs-entry__metabar .pk-share-buttons-wrap .pk-share-buttons-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  background: var(--cs-color-widgets-background);
  box-shadow: 0 0 0 1px var(--academy-ring);
}
.cs-entry__metabar .pk-share-buttons-wrap .pk-share-buttons-item {
  margin: 0 0 0.5rem;
  padding: 0;
}
.pk-share-buttons-link:active {
  transform: scale(0.96);
}
@media (min-width: 1020px) {
  .cs-metabar-enabled .cs-entry__metabar-inner {
    top: calc(var(--cs-header-initial-height) + var(--academy-header-inset) + 1.5rem);
  }
}
.cs-entry__author {
  padding: 1.5rem;
  border: 0;
  border-radius: var(--academy-radius-xl);
  background: var(--cs-color-widgets-background);
}
.cs-entry__author-photo img {
  border-radius: 50%;
}
.cs-entry__author-position {
  color: var(--cs-color-post-meta);
  font-size: 0.8125rem;
}
.cs-entry__author-name {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.cs-entry__author-description {
  color: var(--cs-color-excerpt);
  font-size: 1rem;
  line-height: 1.5;
}
/* Share under the text: a row of pills instead of underlined cells. */
.cs-entry__after-share-buttons .pk-share-buttons-items {
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}
.cs-entry__after-share-buttons .pk-share-buttons-wrap .pk-share-buttons-item {
  flex-grow: 0;
}
.cs-entry__after-share-buttons .pk-share-buttons-wrap .pk-share-buttons-link {
  height: 2.75rem;
  padding: 0 1.125rem;
  background: var(--cs-color-widgets-background);
  box-shadow: 0 0 0 1px var(--academy-ring);
}
.cs-entry__after-share-buttons .pk-share-buttons-wrap .pk-share-buttons-link::after {
  content: none;
}
.cs-entry__after-share-buttons .pk-share-buttons-icon {
  font-size: 1.125rem;
}
/* Previous and next post: two cards under the text (the theme floated them at the screen edges on wide screens only). */
.cs-entry__prev-next {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}
.cs-entry__prev-next .cs-entry__prev-next-item {
  position: static;
  display: block;
  transform: none;
  visibility: visible;
  box-shadow: none;
}
.cs-entry__prev-next .cs-entry__prev-next-item .cs-entry {
  display: none;
}
.cs-entry__prev-next .cs-entry__prev-next-item .cs-entry__prev-next-link {
  position: static;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  width: auto;
  height: 100%;
  padding: 1.25rem 1.5rem;
  border-radius: var(--academy-radius-lg);
  background: var(--cs-color-widgets-background);
  transform: none;
  visibility: visible;
  opacity: 1;
  transition: transform 0.2s var(--academy-ease-snap), box-shadow 0.2s;
}
.cs-entry__prev-next .cs-entry__prev-next-item.cs-entry__next .cs-entry__prev-next-link {
  align-items: flex-end;
  text-align: end;
}
.cs-entry__prev-next .cs-entry__prev-next-item .cs-entry__prev-next-label {
  margin: 0;
  color: var(--cs-color-post-meta);
  font-family: var(--cs-font-post-meta-family), sans-serif;
  font-size: var(--cs-font-post-meta-size);
  font-weight: 500;
  letter-spacing: 0;
  opacity: 1;
  transform: none;
}
/* The :hover selector outweighs the theme's hover rule, which slid the title 25px out of the floating tab. */
.cs-entry__prev-next .cs-entry__prev-next-item .cs-entry__prev-next-title-wrapper,
.cs-entry__prev-next .cs-entry__prev-next-item:hover .cs-entry__prev-next-title-wrapper {
  line-height: 1.3;
  opacity: 1;
  transform: none;
}
.cs-entry__prev-next .cs-entry__prev-next-title {
  color: var(--cs-color-primary);
  font-size: 1rem;
  font-weight: 600;
  word-break: normal;
}
@media (hover: hover) {
  .cs-entry__prev-next .cs-entry__prev-next-item .cs-entry__prev-next-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--academy-shadow-raised);
  }
}
/* Related posts sit in the card grid; the theme's own column rules for this block are switched off. */
.cs-entry__post-related:not(:first-child) {
  margin-top: var(--academy-gap);
}
.cs-entry__post-related .academy-grid > .cs-entry.academy-card {
  flex: none;
  max-width: none;
  margin: 0;
  padding: 0;
}
.cs-entry__post-related .cs-section-heading .cnvs-section-title > span {
  font-size: 1em;
}
@media (min-width: 720px) {
  .cs-entry__prev-next {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cs-entry__prev-next .cs-entry__next:first-child {
    grid-column: 2;
  }
  .cs-entry__author {
    padding: 2rem;
  }
}
/* Reading progress: a brand line at the top edge, driven by the scroll position. No script. */
@supports (animation-timeline: scroll()) {
  .single-post .cs-header-before {
    position: fixed;
    inset: 0 0 auto;
    z-index: 11;
    height: 3px;
    background: var(--academy-brand);
    transform: scaleX(0);
    transform-origin: 0 50%;
    animation: academy-progress linear both;
    animation-timeline: scroll(root);
  }
  .rtl.single-post .cs-header-before {
    transform-origin: 100% 50%;
  }
}
@keyframes academy-progress {
  to {
    transform: scaleX(1);
  }
}

/* 5. Home --------------------------------------------------------------------------------------------------------- */
.academy-home {
  display: flex;
  flex-direction: column;
  gap: var(--academy-gap);
}
.academy-home > .cs-entry__subscribe {
  margin-top: 0;
}

.academy-hero {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
/* Centred, text-only first screen on a soft brand glow; the H1 is the largest paint, so nothing waits for an image. */
.academy-hero__panel {
  --academy-hero-glow: color-mix(in srgb, var(--academy-brand) 24%, var(--cs-color-widgets-background));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  padding: 3rem 1.25rem;
  border-radius: calc(var(--academy-radius) * 1.75);
  background: radial-gradient(circle, var(--cs-color-widgets-background) 0, var(--cs-color-widgets-background) 10%, var(--academy-hero-glow) 115%);
  text-align: center;
}
.academy-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.25rem;
  border-radius: 0.875rem;
  background: color-mix(in srgb, var(--academy-brand) 14%, transparent);
  color: var(--cs-color-primary);
  font-size: 0.8125rem;
  line-height: 1.3;
  text-align: left;
  text-decoration: none;
}
.academy-hero__badge:hover {
  color: var(--cs-color-primary);
}
.academy-icon.academy-hero__badge-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 0.625rem;
}
.academy-hero__badge-icon svg {
  width: 1.125rem;
  height: 1.125rem;
}
.academy-hero__badge-cta {
  flex: none;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: var(--cs-color-primary-contrast);
  box-shadow: 0 6px 10px -4px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.05);
  transition: transform 0.25s;
}
.academy-hero__badge:hover .academy-hero__badge-cta {
  transform: translateX(2px);
}
/* Lines of even length; on the home page each sentence of the title starts a line of its own. */
.academy-hero__title {
  margin: 0.5rem 0 0;
  font-size: clamp(2.125rem, 10.5vw, 2.5rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.academy-hero__title > span {
  display: block;
}
.academy-hero__lead {
  max-width: 34rem;
  margin: 0;
  font-size: 1.125rem;
  color: var(--cs-color-excerpt);
  text-wrap: balance;
}
.academy-hero .cs-search__form {
  width: 100%;
  max-width: 34rem;
  margin-top: 0.75rem;
}
.academy-hero .cs-search__form .cs-search__container {
  padding-right: 0.375rem;
  border-radius: 999px;
  box-shadow: 0 6px 10px -4px rgba(0, 0, 0, 0.12);
}
.academy-hero .cs-search__submit {
  padding: 0.875rem 1.5rem;
  border-radius: 999px;
}

.academy-levels {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.academy-level {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  border-radius: var(--academy-radius);
  background: var(--cs-color-widgets-background);
  color: var(--cs-color-primary);
  text-decoration: none;
  transition: transform 0.25s, box-shadow 0.25s;
}
.academy-level:hover {
  color: var(--cs-color-primary);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -16px rgba(0, 0, 0, 0.4);
}
.academy-level__text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.academy-level__name,
.academy-topic__name,
.academy-column__title {
  margin: 0;
  font-family: var(--cs-font-headings-family), sans-serif;
  font-weight: var(--cs-font-headings-weight);
  font-size: 1.25rem;
  line-height: 1.2;
}
.academy-level__hint,
.academy-topic__blurb,
.academy-column__hint {
  margin: 0;
  color: var(--cs-color-excerpt);
}
.academy-level__count,
.academy-topic__count {
  font-family: var(--cs-font-post-meta-family), sans-serif;
  font-size: var(--cs-font-post-meta-size);
  color: var(--cs-color-post-meta);
}

.academy-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: academy-step;
}
.academy-step {
  position: relative;
  min-height: 5rem;
  padding: 1.25rem;
  padding-inline-start: 5rem;
  border-radius: var(--academy-radius);
  background: var(--cs-color-widgets-background);
  counter-increment: academy-step;
}
.academy-step::before {
  content: counter(academy-step);
  position: absolute;
  top: 1.25rem;
  inset-inline-start: 1.25rem;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 28%;
  background: var(--academy-brand);
  color: #141614;
  font-family: var(--cs-font-category-letter-family), sans-serif;
  font-size: 1.5rem;
  line-height: 2.75rem;
  text-align: center;
}
.academy-step__title {
  font-family: var(--cs-font-headings-family), sans-serif;
  font-weight: var(--cs-font-headings-weight);
  color: var(--cs-color-primary);
}
.academy-step .cs-entry__post-meta:not(:first-child) {
  margin-top: 0.5rem;
}

.academy-columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
.academy-column {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 1.5rem 1.5rem;
  border-radius: var(--academy-radius-lg);
  background: var(--cs-color-widgets-background);
}
/* The level is named by a light lime head with its ring, not by a border. */
.academy-column__head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0 -1rem 0.25rem;
  padding: 1rem;
  border-radius: var(--academy-radius);
  background: color-mix(in srgb, var(--academy-brand) 18%, transparent);
}
.academy-column .academy-item:last-of-type {
  border-bottom: 0;
}
.academy-column .academy-more {
  margin-top: auto;
  padding-top: 0.75rem;
}
.academy-list .academy-item {
  padding: 1.25rem;
  border: 0;
  border-radius: var(--academy-radius);
  background: var(--cs-color-widgets-background);
}
.academy-column__hint {
  margin-top: 0.25rem;
}
.academy-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--cs-color-contrast-200);
}
.academy-item__body {
  min-width: 0;
}
.academy-item .cs-entry__title {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.academy-item .cs-entry__post-meta:not(:first-child),
.academy-item .cs-entry__title-wrapper:not(:first-child) {
  margin-top: 0.5rem;
}
.academy-item .cs-entry__title-wrapper {
  display: block;
}
.academy-more {
  display: inline-block;
  margin-top: 1.25rem;
  font-family: var(--cs-font-primary-family), sans-serif;
  font-size: var(--cs-font-primary-size);
  font-weight: var(--cs-font-primary-weight);
  text-transform: var(--cs-font-primary-text-transform);
  color: var(--cs-color-primary);
}

.academy-topic-grid,
.academy-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.academy-topic {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 1.5rem;
  border-radius: var(--academy-radius);
  background: var(--cs-color-widgets-background);
  color: var(--cs-color-primary);
  text-decoration: none;
  transition: transform 0.25s, box-shadow 0.25s;
}
.academy-topic .academy-icon {
  margin-bottom: 0.5rem;
}
.academy-topic:hover {
  color: var(--cs-color-primary);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -16px rgba(0, 0, 0, 0.4);
}
.academy-topic:hover .academy-icon {
  background-position: center 50%;
}
.cs-footer-badges {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}
.cs-footer-badges img {
  display: block;
  width: auto;
  height: 4rem;
}

@media (max-width: 719px) {
  .academy-hero .cs-search__submit {
    padding: 0.75rem;
    font-size: 0;
  }
  .academy-hero .cs-search__submit::before {
    content: '\e92c';
    font-family: cs-icons !important;
    font-size: 1rem;
  }
}
@media (min-width: 720px) {
  .academy-hero__panel {
    padding: 5rem 3rem;
  }
  .academy-hero__title {
    font-size: 3.5rem;
  }
  .academy-levels,
  .academy-steps {
    grid-template-columns: repeat(3, 1fr);
  }
  .academy-topic-grid,
  .academy-list {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1020px) {
  .academy-hero__panel {
    padding: 6rem 4rem;
  }
  .academy-hero__title {
    font-size: 4rem;
  }
  .academy-columns {
    grid-template-columns: repeat(3, 1fr);
  }
  .academy-topic-grid {
    grid-template-columns: repeat(5, 1fr);
  }
  .academy-list {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Tool tiles reuse the topic grid. The icon is a lime app tile in both schemes. */
.academy-icon--tool {
  background: linear-gradient(180deg, color-mix(in srgb, var(--academy-brand) 70%, #fff), var(--academy-brand));
  color: #141614;
}
.academy-icon--tool svg {
  width: 1.75rem;
  height: 1.75rem;
}
/* Tools on the home: a section like the others, with the link to all tools on the heading line, at the right edge. */
.academy-home-tools,
.academy-magazine {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  column-gap: 1rem;
}
.academy-home-tools > :not(.cs-section-heading, .academy-button),
.academy-magazine > :not(.cs-section-heading, .academy-button) {
  grid-column: 1 / -1;
}
.academy-section.academy-home-tools > .academy-button,
.academy-section.academy-magazine > .academy-button {
  margin-top: 0;
}
/* Phones: a tool is a row, icon beside its name, so five tools fit one screen. */
@media (max-width: 719px) {
  .academy-home-tools .academy-topic {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 0.125rem 1rem;
    padding: 1rem;
  }
  .academy-home-tools .academy-icon {
    grid-row: span 2;
    width: 3rem;
    height: 3rem;
    margin: 0;
  }
  .academy-home-tools .academy-topic__name {
    align-self: end;
    font-size: 1.125rem;
  }
  .academy-home-tools .academy-topic__blurb {
    align-self: start;
    font-size: 0.875rem;
    line-height: 1.35;
  }
}

/* 6. Motion ------------------------------------------------------------------------------------------------------- */

/*
 * Decoration only: with reduced motion (or without academy.js) every block is in place and still.
 * Moving parts animate transform, opacity and clip-path; the two exceptions repaint one small box while it is
 * focused (border beam) or hovered (cursor light).
 */
@property --academy-angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}
@keyframes academy-beam {
  to {
    --academy-angle: 360deg;
  }
}
@keyframes academy-rise {
  from {
    opacity: 0;
    transform: translateY(0.75rem);
  }
}
@keyframes academy-drift {
  from {
    transform: translate(-12%, 6%) scale(1);
  }
  to {
    transform: translate(12%, -6%) scale(1.15);
  }
}
@keyframes academy-scheme {
  from {
    clip-path: circle(0 at var(--academy-vt-x, 50%) var(--academy-vt-y, 0));
  }
  to {
    clip-path: circle(150vmax at var(--academy-vt-x, 50%) var(--academy-vt-y, 0));
  }
}

@media (prefers-reduced-motion: no-preference) {
  /* Pages cross-fade into each other and the header stays put. */
  @view-transition {
    navigation: auto;
  }
  .cs-header {
    view-transition-name: academy-header;
  }
  /* Colour scheme: the new scheme opens as a circle from the switch. */
  .academy-scheme-vt .cs-header {
    view-transition-name: none;
  }
  .academy-scheme-vt::view-transition-old(root) {
    animation: none;
  }
  .academy-scheme-vt::view-transition-new(root) {
    animation: academy-scheme 0.7s var(--academy-ease) both;
  }

  /* Blocks the script marked as off screen fade up as they scroll in. */
  .academy-reveal {
    opacity: 0;
    transform: translateY(1rem);
  }
  .academy-reveal.is-in {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s var(--academy-ease), transform 0.6s var(--academy-ease);
  }

  /* Hero: the brand glow drifts slowly behind the text. */
  .academy-hero__panel {
    position: relative;
    isolation: isolate;
    overflow: hidden;
  }
  .academy-hero__panel::before {
    content: '';
    position: absolute;
    z-index: -1;
    inset: 35% -10% -45%;
    border-radius: 50%;
    background: radial-gradient(closest-side, color-mix(in srgb, var(--academy-brand) var(--academy-glow, 45%), transparent), transparent);
    animation: academy-drift 16s ease-in-out infinite alternate;
    pointer-events: none;
  }

  /* Border beam: a brand light runs around a field while it has the focus. */
  .cs-search__form .cs-search__container,
  .pk-subscribe-form-wrap:not(.pk-subscribe-with-name) .pk-input-group {
    position: relative;
  }
  .cs-search__form .cs-search__container::after,
  .pk-subscribe-form-wrap:not(.pk-subscribe-with-name) .pk-input-group::after {
    content: '';
    position: absolute;
    inset: 0;
    padding: 2px;
    border-radius: inherit;
    background: conic-gradient(from var(--academy-angle), transparent 0 60%, var(--academy-brand) 80%, var(--academy-beam, #141614) 93%, transparent);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
  }
  .cs-search__form .cs-search__container:focus-within::after,
  .pk-subscribe-form-wrap:not(.pk-subscribe-with-name) .pk-input-group:focus-within::after {
    opacity: 1;
    animation: academy-beam 2.4s linear infinite;
  }

  /* Mobile menu: the card unrolls from the header pill, then its rows rise in turn. */
  .academy-menu {
    clip-path: inset(0 0 calc(100% - var(--cs-header-initial-height)) round var(--academy-radius-xl));
    opacity: 0;
    transition: clip-path 0.5s var(--academy-ease-snap), opacity 0.2s, display 0.5s allow-discrete, overlay 0.5s allow-discrete;
  }
  .academy-menu:popover-open,
  .academy-menu.is-open {
    clip-path: inset(0 round var(--academy-radius-xl));
    opacity: 1;
  }
  @starting-style {
    .academy-menu:popover-open,
    .academy-menu.is-open {
      clip-path: inset(0 0 calc(100% - var(--cs-header-initial-height)) round var(--academy-radius-xl));
      opacity: 0;
    }
  }
  .academy-menu::backdrop {
    opacity: 0;
    transition: opacity 0.3s, display 0.3s allow-discrete, overlay 0.3s allow-discrete;
  }
  .academy-menu:popover-open::backdrop {
    opacity: 1;
  }
  @starting-style {
    .academy-menu:popover-open::backdrop {
      opacity: 0;
    }
  }
  .academy-menu:popover-open > :not(.academy-menu__head),
  .academy-menu.is-open > :not(.academy-menu__head) {
    animation: academy-rise 0.5s var(--academy-ease) backwards;
  }
  .academy-menu > :nth-child(3) {
    animation-delay: 0.05s;
  }
  .academy-menu > :nth-child(4) {
    animation-delay: 0.1s;
  }
  .academy-menu > :nth-child(5) {
    animation-delay: 0.15s;
  }
  .academy-menu > :nth-child(n + 6) {
    animation-delay: 0.2s;
  }

  /* Fullscreen menu: grows out of the header pill. */
  .cs-fullscreen-menu {
    clip-path: inset(
      var(--academy-header-inset) calc((100% - var(--academy-pill-width)) / 2) calc(100% - var(--academy-header-inset) - var(--cs-header-initial-height)) round
        2rem
    );
    transition: clip-path 0.6s var(--academy-ease-snap), opacity 0.25s, visibility 0.6s;
  }
  .cs-fullscreen-menu-active .cs-fullscreen-menu {
    clip-path: inset(0 round 0);
  }

  /* Header search: the card drops from the pill. */
  .cs-header .cs-search {
    transform: translateY(-0.5rem) scale(0.98);
    transform-origin: 50% 0;
    transition: opacity 0.2s, transform 0.35s var(--academy-ease-snap), visibility 0.35s;
  }
  .cs-header.academy-search-open .cs-search {
    transform: none;
  }
}

@media (prefers-reduced-motion: no-preference) and (hover: hover) {
  /* One highlight slides between the links of a group; the script moves it. */
  .cs-footer__nav-inner,
  .academy-pagination ul {
    position: relative;
  }
  .cs-footer__nav-inner::before,
  .academy-pagination ul::before,
  .cs-lang > ul::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: var(--academy-hl-w, 0);
    height: var(--academy-hl-h, 0);
    border-radius: 999px;
    background: var(--cs-color-category);
    transform: translate(var(--academy-hl-x, 0), var(--academy-hl-y, 0));
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
  }
  .cs-lang > ul::before {
    border-radius: 0.625rem;
  }
  .cs-footer__nav-inner.is-hl::before,
  .academy-pagination ul.is-hl::before,
  .cs-lang > ul.is-hl::before {
    opacity: 1;
    transition: transform 0.3s var(--academy-ease-snap), width 0.3s var(--academy-ease-snap), height 0.3s var(--academy-ease-snap), opacity 0.2s;
  }
  .cs-footer__nav-inner li,
  .academy-pagination li,
  .cs-lang > ul li {
    position: relative;
  }
  .academy-js .cs-footer__nav.cs-footer__nav-horizontal .cs-footer__nav-inner li a:hover,
  .academy-js .academy-pagination li a:hover,
  .academy-js .cs-lang > ul a:not([aria-current]):hover {
    background: none;
  }

  /* A light follows the cursor over a tile; the script passes its position. */
  .academy-level,
  .academy-topic,
  .academy-step,
  .cs-fullscreen-menu .cs-header__multi-column-posts .cs-entry {
    position: relative;
    isolation: isolate;
  }
  .academy-level::after,
  .academy-topic::after,
  .academy-step::after,
  .cs-fullscreen-menu .cs-header__multi-column-posts .cs-entry::after {
    content: '';
    position: absolute;
    z-index: -1;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(
      16rem circle at var(--academy-x, 50%) var(--academy-y, 50%),
      color-mix(in srgb, var(--academy-brand) 26%, transparent),
      transparent 70%
    );
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
  }
  .academy-level:hover::after,
  .academy-topic:hover::after,
  .academy-step:hover::after,
  .cs-fullscreen-menu .cs-header__multi-column-posts .cs-entry:hover::after {
    opacity: 1;
  }
}
