:root {
	--instruction-color: var(--color-palette-blue-line);
	--state-color: var(--color-palette-orange-line);
	--value-color: var(--color-palette-green-line);
	--head-color: var(--color-palette-red-line);
}


@media (prefers-reduced-motion: reduce) {
  * {
    transition: none;
    animation: none;
  }
}

figure.turing-hero {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  row-gap: var(--space-4);
  height: 100%;
  margin: 0;
  padding-block-start: var(--space-6);
  font-family: var(--font-family-heading);
  text-align: center;
}

figure.turing-hero .signature {
  display: block;
  width: 200px;
  max-width: 100%;
  aspect-ratio: 468 / 94;
  margin-inline: auto;
  color: var(--color-text-primary);
  background: currentColor;
  -webkit-mask: url("/images/turing-signature.svg") center / contain no-repeat;
  mask: url("/images/turing-signature.svg") center / contain no-repeat;
}

figure.turing-hero picture {
  min-height: 0;
}

/* The portrait fits its reserved row without stretching or moving the title on load. */
figure.turing-hero .post-hero-image {
  margin-inline: auto;
  width: 250px;
  max-width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom;
}

[data-theme="dark"] figure img {
  filter: brightness(0.8);
}

figure.turing-hero p {
  margin: var(--space-2) 0 0;
  padding: 0;
  font-size: var(--type-caption-size);
}

figure.turing-hero figcaption {
  font-family: var(--font-family-heading);
}

.border {
  display: inline-block;
  font-family: var(--font-family-code);
  font-size: var(--type-caption-size);
  border: var(--border-width-thick) solid var(--border-color);
  border-radius: 0.5em;
  min-width: 3ch;
  padding-left: 0.2em;
  padding-right: 0.2em;
  text-align: center;
}

article code.border {
  font-size: var(--type-caption-size);
  font-weight: inherit;
  font-size-adjust: none;
}

article :has(> code.border) {
  font-size-adjust: none;
}

.state {
  --border-color: var(--state-color);
}

.instruction {
  --border-color: var(--instruction-color);
}

.value {
  --border-color: var(--value-color);
}

li:has(.border) {
  margin-top: 0.35em;
  margin-bottom: 0.35em;
}

figure {
  margin: auto;
  margin-top: 2em;
  margin-bottom: 2em;
  min-width: 0;
  max-width: 100%;
}

figure img {
  width: 400px;
  min-width: 0;
}

figure img.biographical-sketch {
  max-width: 200px;
}

figure img.morcom {
  margin-bottom: 0.5em;
}

figure figcaption {
  max-width: 500px;
  color: var(--color-text-secondary);
  font-size: 0.8em;
  font-style: italic;
  text-align: center;
  font-family: var(--font-family-heading);
  text-wrap: pretty;
  margin: auto;
}

/* The compiler reads this source even before the element upgrades. */
s-turing-machine > pre {
  display: none !important;
}

s-turing-machine:not(:defined) {
  display: none;
}

s-turing-machine {
  margin-top: var(--space-4);
  margin-bottom: var(--space-6);
}

