/*
  Colors: --color-brand is Twee's purple, used for the header, hero and accents. White text on it is 3.9:1,
  which passes WCAG AA only for large text, so small white text such as buttons and step numbers sits on
  --color-brand-strong (4.6:1), and text links use --color-link (6.4:1).
*/
:root {
  --color-brand: #746dff;
  --color-brand-strong: #6760f5;
  --color-brand-strong-hover: #5a52e6;
  --color-brand-soft: #eeedff;
  --color-link: #4f46e0;
  --color-text: #1d1b2e;
  --color-text-muted: #5d5f6e;
  --color-border: #e2e2ec;
  --color-surface: #f5f4ff;
  --color-background: #ffffff;
  --color-note: #2f6fc2;
  --color-note-soft: #e9f1fc;
  --color-footer: #5336d6;
  --color-footer-divider: #9590ff;
  --radius: 10px;
  --radius-large: 18px;
  --page-width: 1120px;
  --reading-width: 44rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Sora, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-background);
}

h1,
h2,
h3 {
  line-height: 1.3;
}

a {
  color: var(--color-link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

:focus-visible {
  outline: 3px solid var(--color-brand);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.icon {
  display: block;
  flex: 0 0 auto;
}

/* Header */

.site-header {
  color: #ffffff;
  background: var(--color-brand);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.site-header :focus-visible {
  outline-color: #ffffff;
}

.site-header__inner {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 64px;
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 12px 20px;
}

.site-header__brand {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.site-header__logo {
  display: flex;
  flex-direction: row;
  padding-right: 10px;
  border-right: 1px solid rgba(255, 255, 255, 0.3);
}

.site-header__logo img {
  display: block;
  filter: brightness(0) invert(1);
}

.site-header__label {
  font-size: 14px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.85);
}

.site-header__label:hover {
  color: #ffffff;
  text-decoration: none;
}

.site-header__toggle {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius);
  cursor: pointer;
}

.site-header__toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  background: #ffffff;
}

.site-nav {
  display: none;
  flex-basis: 100%;
}

.site-nav--open {
  display: block;
}

.site-nav__list {
  display: flex;
  flex-direction: column;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.site-nav__item a {
  position: relative;
  display: block;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
}

.site-nav__item a:hover {
  color: #ffffff;
  text-decoration: none;
}

.site-nav__item--active a {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

/* Search */

.search-band {
  padding: 20px;
  background: var(--color-brand);
}

.search-band__inner {
  max-width: var(--reading-width);
  margin: 0 auto;
}

.search-form {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  max-width: 620px;
  padding: 6px 6px 6px 16px;
  background: var(--color-background);
  border-radius: 999px;
}

.search-form:focus-within {
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.45);
}

.search-form .icon {
  width: 20px;
  height: 20px;
  color: var(--color-text-muted);
}

.search-form__input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 10px 0;
  font: inherit;
  color: var(--color-text);
  background: none;
  border: 0;
  outline: none;
}

.search-form__input::placeholder {
  color: var(--color-text-muted);
}

.search-form__button {
  flex: 0 0 auto;
  padding: 10px 20px;
  font: inherit;
  font-weight: 600;
  color: #ffffff;
  background: var(--color-brand-strong);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

.search-form__button:hover {
  background: var(--color-brand-strong-hover);
}

.search-band .search-form {
  max-width: none;
}

.search-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  z-index: 10;
  margin: 0;
  padding: 6px;
  list-style: none;
  text-align: left;
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-large);
  box-shadow: 0 14px 34px rgba(30, 20, 120, 0.25);
}

.search-suggestions__item--all {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--color-border);
}

.search-suggestions__link {
  display: block;
  padding: 10px 12px;
  color: var(--color-text);
  text-decoration: none;
  border-radius: var(--radius);
}

.search-suggestions__link:hover,
.search-suggestions__link--active {
  background: var(--color-surface);
}

.search-suggestions__item--all .search-suggestions__link {
  font-weight: 600;
  color: var(--color-link);
}

/* Home */

.hero {
  padding: 40px 20px 128px;
  text-align: center;
  color: #ffffff;
  background: var(--color-brand);
}

.hero :focus-visible {
  outline-color: #ffffff;
}

.hero__inner {
  max-width: 720px;
  margin: 0 auto;
}

.hero__title {
  margin: 0 0 8px;
  font-size: 32px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.hero__lead {
  margin: 0 0 24px;
  font-size: 16px;
}

.hero .search-form {
  margin: 0 auto;
  box-shadow: 0 14px 34px rgba(30, 20, 120, 0.3);
}

.hero__topics {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.topic-pill {
  display: block;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  background: rgba(20, 12, 90, 0.24);
  border-radius: 999px;
}

.topic-pill:hover {
  color: #ffffff;
  text-decoration: none;
  background: rgba(20, 12, 90, 0.4);
}

.collection-cards {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: -104px;
}

.collection-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px;
  background: var(--color-background);
  border: 1px solid #ecebff;
  border-radius: var(--radius-large);
  box-shadow: 0 12px 30px -14px rgba(60, 50, 180, 0.35);
}

.collection-card__icon {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 4px;
  color: var(--color-link);
  background: var(--color-brand-soft);
  border-radius: 50%;
}

.collection-card__title {
  margin: 0;
  font-size: 18px;
}

.collection-card__title a {
  color: var(--color-text);
}

.collection-card__description {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--color-text-muted);
}

.collection-card__articles {
  margin: 8px 0 0;
  padding: 0;
  font-size: 14px;
  line-height: 1.45;
  list-style: none;
}

.collection-card__articles li + li {
  border-top: 1px solid #ececf3;
}

/* Purple is reserved for interaction, so the titles stay in the body text color until hovered. */
.collection-card__articles a {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  color: var(--color-text);
}

.collection-card__articles a:hover {
  color: var(--color-link);
}

/* The dot is centred on the first line, so it stays put when a title wraps. */
.collection-card__articles a::before {
  content: '';
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  margin-top: calc((1.45em - 6px) / 2);
  background: var(--color-brand);
  border-radius: 50%;
}

.collection-card__footer {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 10px;
  font-size: 13px;
}

.collection-card__count {
  color: var(--color-text-muted);
}

.collection-card__more {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.collection-card__more:hover {
  text-decoration: none;
}

.collection-card__more .icon {
  width: 14px;
  height: 14px;
  transition: transform 0.15s;
}

.collection-card__more:hover .icon {
  transform: translateX(3px);
}

@media (prefers-reduced-motion: reduce) {
  .collection-card__more .icon {
    transition: none;
  }
}

.popular {
  padding-top: 48px;
}

.popular__title {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 800;
}

.popular__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.popular__item {
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
  break-inside: avoid;
}

/* Pages */

.site-main {
  min-height: 60vh;
}

.page {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 24px 20px 64px;
}

.page--reading {
  max-width: calc(var(--reading-width) + 40px);
  padding-top: 28px;
}

.page__title {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.page__description {
  margin: 0 0 20px;
  color: var(--color-text-muted);
}

.page__meta {
  margin: 0 0 24px;
  font-size: 13px;
  color: var(--color-text-muted);
}

.page__section {
  margin-top: 36px;
}

.page__section-title {
  margin: 0 0 8px;
  font-size: 18px;
}

.breadcrumbs {
  margin-bottom: 14px;
  font-size: 13px;
}

.breadcrumbs__list {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumbs__item + .breadcrumbs__item::before {
  content: '/';
  margin-right: 6px;
  color: var(--color-text-muted);
}

.breadcrumbs__item a {
  color: var(--color-text-muted);
}

/* Lists */

.article-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.article-list__link {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 0;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
}

.article-list__link:hover {
  color: var(--color-link);
}

.article-list__link .icon {
  width: 20px;
  height: 20px;
  margin-top: 3px;
  color: var(--color-link);
}

.category-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.category-list__link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 100%;
  padding: 18px 20px;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-large);
}

.category-list__link:hover {
  text-decoration: none;
  border-color: var(--color-brand);
}

.category-list__name {
  font-weight: 700;
}

.category-list__description {
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-text-muted);
}

.category-list__count {
  margin-top: auto;
  padding-top: 4px;
  font-size: 13px;
  color: var(--color-text-muted);
}

.search-results {
  margin: 0;
  padding: 0;
  list-style: none;
}

.search-results__item {
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border);
}

.search-results__collection {
  margin: 0 0 2px;
  font-size: 12px;
  color: var(--color-text-muted);
}

.search-results__title {
  font-size: 17px;
  font-weight: 700;
}

.search-results__snippet {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--color-text-muted);
}

/* Article */

.article__meta {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin: 0 0 24px;
  font-size: 13px;
  color: var(--color-text-muted);
}

.article__updated {
  margin: 0;
}

.article__print {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  padding: 5px 12px 5px 10px;
  font: inherit;
  font-weight: 600;
  color: var(--color-text-muted);
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  cursor: pointer;
}

.article__print[hidden] {
  display: none;
}

.article__print .icon {
  width: 16px;
  height: 16px;
}

.article__print:hover {
  color: var(--color-link);
  border-color: var(--color-brand);
}

.article__body > h2 {
  margin: 32px 0 10px;
  font-size: 20px;
}

.article__body h3 {
  margin: 22px 0 8px;
  font-size: 17px;
}

.article__body li {
  margin-bottom: 6px;
}

.article__body img {
  display: block;
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.steps {
  margin: 24px 0;
  padding: 0;
  list-style: none;
}

.steps__item {
  position: relative;
  margin: 0;
  padding: 0 0 32px 48px;
}

.steps__item::after {
  content: '';
  position: absolute;
  top: 42px;
  bottom: 8px;
  left: 16px;
  width: 2px;
  background: var(--color-border);
}

.steps__item:last-child {
  padding-bottom: 8px;
}

.steps__item:last-child::after {
  display: none;
}

.steps__title {
  margin: 0 0 8px;
  padding-top: 4px;
  font-size: 18px;
  line-height: 1.4;
}

.steps__number {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  background: var(--color-brand-strong);
  border-radius: 50%;
}

.steps__body > :first-child {
  margin-top: 0;
}

.article-figure {
  margin: 16px 0;
  padding: 8px;
  background: var(--color-brand-soft);
  border-radius: 14px;
}

.article-figure img {
  border: 0;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(40, 30, 120, 0.12), 0 8px 24px -12px rgba(40, 30, 120, 0.35);
}

.article-figure img + img,
.article-figure__zoom + .article-figure__zoom {
  margin-top: 12px;
}

/* help.js wraps each screenshot in this button, which opens the image preview. */
.article-figure__zoom {
  display: block;
  padding: 0;
  font: inherit;
  background: none;
  border: 0;
  border-radius: 8px;
  cursor: zoom-in;
}

/* The dialog covers the viewport, so the spinner and the image can be centered and a click beside them closes it. */
.image-preview {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 16px;
  overflow: hidden;
  background: none;
  border: 0;
}

/* Author display rules override the browser's display: none on a closed dialog, so only the open one is a flexbox. */
.image-preview[open] {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
}

.image-preview::backdrop {
  background: rgba(29, 27, 46, 0.8);
}

.image-preview__image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  background: var(--color-background);
  border-radius: 8px;
}

.image-preview__spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: image-preview-spin 0.8s linear infinite;
  pointer-events: none;
}

@keyframes image-preview-spin {
  to {
    transform: rotate(360deg);
  }
}

/* A still spinner would look frozen, so reduced motion only slows it down. */
@media (prefers-reduced-motion: reduce) {
  .image-preview__spinner {
    animation-duration: 2.4s;
  }
}

.image-preview__close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  color: var(--color-text);
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(29, 27, 46, 0.25);
  cursor: pointer;
}

.image-preview__close .icon {
  width: 20px;
  height: 20px;
}

.image-preview__close:hover {
  color: var(--color-link);
  border-color: var(--color-brand);
}

/*
  A modal dialog does not stop the page behind it from scrolling. help.js keeps the lock through the closing
  morph, so the thumbnail stays where the morph lands. The stable gutter keeps the page from shifting sideways
  when the scrollbar hides.
*/
html:has(.image-preview[open]),
html.image-preview-closing {
  overflow: hidden;
  scrollbar-gutter: stable;
}

/* The page cross-fade, which fades the backdrop in and out, runs as long as the thumbnail morph. */
::view-transition-group(image-preview),
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 300ms;
  animation-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.callout {
  display: flex;
  flex-direction: row;
  gap: 12px;
  margin: 20px 0;
  padding: 14px 18px;
  background: var(--color-brand-soft);
  border-left: 4px solid var(--color-brand);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.callout__icon {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-top: 3px;
  color: var(--color-link);
}

.callout__body > :first-child {
  margin-top: 0;
}

.callout__body > :last-child {
  margin-bottom: 0;
}

.callout--note {
  background: var(--color-note-soft);
  border-left-color: var(--color-note);
}

.callout--note .callout__icon {
  color: var(--color-note);
}

.article-video {
  aspect-ratio: 16 / 9;
  margin: 16px 0;
}

.article-video iframe {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: var(--radius);
}

.article-rating {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin: 48px 0 24px;
  padding: 24px 20px;
  text-align: center;
  background: var(--color-surface);
  border-radius: var(--radius-large);
}

.article-rating__question {
  margin: 0;
  font-size: 17px;
}

.article-rating__actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.article-rating__button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 96px;
  padding: 12px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  cursor: pointer;
}

.article-rating__button .icon {
  width: 30px;
  height: 30px;
  color: var(--color-text-muted);
}

.article-rating__button:hover {
  border-color: var(--color-brand);
}

.article-rating__button:hover .icon {
  color: var(--color-link);
}

.article-rating__thanks {
  margin: 0;
  font-weight: 600;
}

.article-rating--rated .article-rating__question,
.article-rating--rated .article-rating__actions {
  display: none;
}

.next-article {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0 0 32px;
  padding: 20px 22px;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-large);
}

.next-article:hover {
  text-decoration: none;
  border-color: var(--color-brand);
}

.next-article__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-link);
}

.next-article__title {
  font-size: 17px;
  font-weight: 700;
}

.article__related-title {
  margin: 0 0 4px;
  font-size: 17px;
}

/* Footer */

.site-footer {
  color: #ffffff;
  background: var(--color-footer);
}

.site-footer :focus-visible {
  outline-color: #ffffff;
}

.site-footer a {
  color: #ffffff;
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 32px;
}

.site-footer__logo {
  display: flex;
  flex-direction: row;
  margin-bottom: 32px;
}

.site-footer__logo img {
  display: block;
  filter: brightness(0) invert(1);
}

.site-footer__links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  margin: 0 0 32px;
  padding: 0;
  list-style: none;
}

.site-footer__link {
  font-weight: 700;
  line-height: 1.25;
}

.site-footer__social {
  display: flex;
  flex-direction: row;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer__social-link {
  display: flex;
  flex-direction: row;
}

.site-footer__social-link:hover {
  opacity: 0.8;
}

.site-footer__bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  margin-top: 40px;
  padding-top: 40px;
  font-size: 12px;
  border-top: 1px solid var(--color-footer-divider);
}

.site-footer__copyright {
  margin: 0;
}

.site-footer__legal {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer__legal-item + .site-footer__legal-item::before {
  content: '|';
  margin: 0 12px;
}

@media (min-width: 768px) {
  .site-header__toggle {
    display: none;
  }

  .site-nav {
    display: block;
    flex-basis: auto;
  }

  .site-nav__list {
    flex-direction: row;
    gap: 22px;
    margin: 0;
  }

  .site-nav__item a {
    padding: 6px 0;
    border-bottom: 3px solid transparent;
  }

  .site-nav__item--active a {
    text-decoration: none;
    border-bottom-color: #ffffff;
  }

  .hero {
    padding: 64px 20px 136px;
  }

  .hero__title {
    font-size: 46px;
  }

  .collection-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .popular__list {
    columns: 2;
    column-gap: 40px;
  }

  .page__title {
    font-size: 34px;
  }

  .category-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .article-figure {
    padding: 14px;
    border-radius: var(--radius-large);
  }

  .site-footer__links {
    flex-direction: row;
    gap: 40px;
  }

  .site-footer__bottom {
    flex-direction: row;
    justify-content: space-between;
  }

  .site-footer__legal-item + .site-footer__legal-item::before {
    margin: 0 16px;
  }
}

@media (min-width: 1024px) {
  .collection-cards {
    grid-template-columns: repeat(4, 1fr);
  }

  .site-footer__inner {
    display: grid;
    grid-template-columns: 200px 1fr 200px;
    align-items: center;
  }

  .site-footer__logo,
  .site-footer__links {
    margin-bottom: 0;
  }

  .site-footer__links {
    justify-content: center;
  }

  .site-footer__social {
    justify-content: flex-end;
  }

  .site-footer__bottom {
    grid-column: 1 / -1;
  }
}

/*
  The wordmark goes in the bottom page margin, so it repeats on every printed page and never overlaps the
  text. The margin is three logo heights, which keeps at least one logo height of clear space above and
  below it. Browsers without page margin boxes print without the logo. The layout sets --print-logo
  because the CDN differs per environment.
*/
@page {
  margin: 15mm 15mm calc(3 * 24px);

  @bottom-center {
    content: var(--print-logo);
  }
}

/* Print: the article alone, without site chrome or controls that do nothing on paper. */
@media print {
  .site-header,
  .search-band,
  .site-footer,
  .breadcrumbs,
  .article__print,
  .article-rating,
  .next-article,
  .article__related,
  .article-video,
  .image-preview {
    display: none;
  }

  body {
    font-size: 11pt;
  }

  .site-main {
    min-height: 0;
  }

  .page,
  .page--reading {
    max-width: none;
    padding: 0;
  }

  .article-figure {
    padding: 0;
    background: none;
    break-inside: avoid;
  }

  .article-figure img {
    box-shadow: none;
  }

  .callout {
    break-inside: avoid;
  }

  .steps__title {
    break-after: avoid;
  }

  /* Browsers drop backgrounds when printing, which would leave white step numbers on white. */
  .steps__number,
  .callout {
    print-color-adjust: exact;
  }
}
