/* fernstack: a programme sheet after Karl Gerstner's Designing Programmes.
   Paper, ink, one cadmium orange column, ultramarine only for actions.
   Every first viewport measure derives from one square module, --m. */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/Archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #fafaf7;
  --ink: #111111;
  --ink-soft: #4a4a46;
  --orange: #ff5a1f;
  --blue: #1e3cff;
  --line: 1px solid var(--ink);
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
  accent-color: var(--blue);
  caret-color: var(--blue);
  scrollbar-color: var(--ink) var(--paper);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  color: var(--ink);
  font-family: "Archivo", system-ui, sans-serif;
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  font-variant-numeric: tabular-nums;
}

body {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.55;
}

h1,
h2,
h3,
p,
figure,
table,
ol,
ul,
pre {
  margin: 0;
}

ol,
ul {
  padding: 0;
  list-style: none;
}

a {
  color: var(--blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

::selection {
  background: var(--orange);
  color: var(--ink);
}

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: -3px;
}

button {
  font: inherit;
  color: inherit;
}

svg.icon {
  width: 1em;
  height: 1em;
  flex: none;
  fill: currentColor;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 10;
  padding: 0.75rem 1rem;
  background: var(--blue);
  color: var(--paper);
  font-weight: 700;
  transform: translateY(-100%);
}

.skip:focus-visible {
  transform: none;
  outline-color: var(--ink);
}

/* ------------------------------------------------------------------
   The programme grid
   ------------------------------------------------------------------ */

.sheet {
  container-type: inline-size;
}

.programme {
  --cols: 8;
  --m: min(calc(100cqw / var(--cols)), calc(100svh / 5));
  display: grid;
  grid-template-columns: repeat(var(--cols), var(--m));
  grid-template-rows: repeat(5, var(--m));
  width: calc(var(--m) * var(--cols));
  margin-inline: auto;
  position: relative;
}

.cell {
  min-width: 0;
  border-right: var(--line);
  border-bottom: var(--line);
  padding: calc(var(--m) * 0.07);
}

.edge {
  border-right: 0;
}

/* Right strip: nav, statement, action, colophon */

.nav {
  grid-column: 7 / 9;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: calc(var(--m) * 0.1);
}

.nav ul {
  display: flex;
  gap: calc(var(--m) * 0.14);
  font-size: max(15px, calc(var(--m) * 0.115));
  font-weight: 600;
  line-height: 1;
}

.nav a {
  color: var(--ink);
  text-decoration: none;
}

.nav a:hover,
.nav a[aria-current] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.howto {
  font-size: max(13px, calc(var(--m) * 0.078));
  line-height: 1.3;
  text-wrap: pretty;
}

.for-touch {
  display: none;
}

@media (hover: none) {
  .for-pointer {
    display: none;
  }

  .for-touch {
    display: inline;
  }
}

.statement {
  grid-column: 7 / 9;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.statement p:first-child {
  font-size: max(19px, calc(var(--m) * 0.15));
  font-weight: 650;
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.statement p + p {
  font-size: max(13px, calc(var(--m) * 0.078));
  line-height: 1.3;
  text-wrap: pretty;
}

.action {
  grid-column: 7 / 9;
  grid-row: 3;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--blue);
  color: var(--paper);
  text-decoration: none;
  transition: background-color 240ms var(--ease);
}

.action:hover {
  background: #1630d6;
}

.action:active {
  background: #1228b8;
}

.action:focus-visible {
  outline-color: var(--ink);
}

.action strong {
  display: flex;
  align-items: center;
  gap: 0.3em;
  font-size: max(20px, calc(var(--m) * 0.165));
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}

.action strong .icon {
  transition: transform 300ms var(--ease);
}

.action:hover strong .icon {
  transform: translateX(0.15em);
}

.action span {
  font-size: max(13px, calc(var(--m) * 0.078));
  line-height: 1.35;
}

.colophon {
  grid-column: 7 / 9;
  grid-row: 4;
  font-size: max(13px, calc(var(--m) * 0.072));
  line-height: 1.4;
}

.colophon a {
  color: var(--ink);
}

/* Live original: the orange column */

.live {
  grid-column: 3 / 5;
  grid-row: 1 / 4;
  position: relative;
  background: var(--orange);
  padding: 0;
  display: grid;
}

.live canvas,
.variant canvas,
.lab-canvas canvas,
.missing-canvas canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.live-label {
  grid-area: 1 / 1;
  align-self: start;
  padding: calc(var(--m) * 0.07);
  font-size: max(13px, calc(var(--m) * 0.078));
  font-weight: 650;
  line-height: 1.3;
  position: relative;
}

.live-fallback {
  grid-area: 1 / 1;
  align-self: center;
  padding: calc(var(--m) * 0.14);
  font-size: max(15px, calc(var(--m) * 0.1));
  line-height: 1.3;
}

.formula {
  grid-column: 3 / 5;
  grid-row: 4;
  padding: max(16px, calc(var(--m) * 0.09));
  background: var(--orange);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.formula p:first-child {
  font-size: max(13px, calc(var(--m) * 0.078));
  font-weight: 650;
}

.formula p + p {
  font-size: max(17px, calc(var(--m) * 0.135));
  line-height: 1.25;
  white-space: nowrap;
}

.coef {
  display: inline-block;
  min-width: 1.1em;
  padding: 0 0.12em;
  font-weight: 750;
  text-align: center;
  transition: background-color 200ms var(--ease), color 200ms var(--ease);
}

.coef.is-moved {
  background: var(--ink);
  color: var(--orange);
}

/* Growth controls under the right variants */

.controls {
  grid-column: 5 / 7;
  grid-row: 4;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: calc(var(--m) * 0.05);
  align-items: flex-start;
  font-size: max(13px, calc(var(--m) * 0.078));
  line-height: 1.35;
}

.state {
  min-height: 2.7em;
}

.regrow,
.copy {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  min-height: 44px;
  padding: 0 1em;
  border: var(--line);
  border-radius: 0;
  background: var(--paper);
  cursor: pointer;
  font-weight: 650;
  transition: background-color 200ms var(--ease), color 200ms var(--ease);
}

@media (hover: hover) {
  .regrow:hover,
  .copy:hover {
    background: var(--ink);
    color: var(--paper);
  }

  .variant:hover {
    background: var(--orange);
  }
}

.regrow:active,
.copy:active {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--paper);
}

.regrow[disabled],
.regrow[aria-disabled="true"],
.copy[disabled] {
  cursor: default;
  background: var(--paper);
  color: var(--ink-soft);
  border-style: dashed;
}

/* Variant cells: one row per coefficient */

.variant {
  position: relative;
  display: grid;
  margin: 0;
  border-top: 0;
  border-left: 0;
  border-radius: 0;
  background: var(--paper);
  cursor: pointer;
  text-align: left;
  transition: background-color 240ms var(--ease);
}

.vlabel {
  position: absolute;
  left: calc(var(--m) * 0.07);
  bottom: calc(var(--m) * 0.07);
  font-size: max(14px, calc(var(--m) * 0.118));
  line-height: 1;
}

.variant[aria-pressed="true"] {
  background: var(--orange);
}

.variant:focus-visible {
  outline-color: var(--ink);
}

.variant[disabled] {
  cursor: default;
}

html:not(.fern-ready) .howto .for-pointer,
html:not(.fern-ready) .howto .for-touch {
  display: none;
}

.variant[data-i="1"] { grid-column: 1; }
.variant[data-i="2"] { grid-column: 2; }
.variant[data-i="3"] { grid-column: 5; }
.variant[data-i="4"] { grid-column: 6; }
.variant[data-coef="b"] { grid-row: 1; }
.variant[data-coef="c"] { grid-row: 2; }
.variant[data-coef="d"] { grid-row: 3; }

/* The four rules */

.rules {
  width: 100%;
  border-collapse: collapse;
  font-size: max(12px, calc(var(--m) * 0.068));
  line-height: 1.35;
}

.rules-wrap {
  grid-column: 1 / 3;
  grid-row: 4;
}

.rules caption {
  text-align: left;
  font-weight: 650;
  padding-bottom: 0.3em;
}

.rules th,
.rules td {
  padding: 0 0.9em 0 0;
  text-align: left;
  font-weight: 400;
}

.rules thead th {
  font-weight: 650;
}

.rules tr.is-moving td {
  font-weight: 700;
}

.rules .coef {
  min-width: 0;
  padding: 0 0.15em;
  margin: 0 -0.15em;
}

/* Wordmark: x height on the last grid line, running edge to edge */

.orange-foot {
  grid-column: 3 / 5;
  grid-row: 5;
  background: var(--orange);
}

.wordmark {
  grid-column: 1 / -1;
  grid-row: 5;
  align-self: end;
  position: relative;
  z-index: 1;
  pointer-events: none;
  margin: 0 0 0 calc(var(--m) * var(--cols) / 4.205 * -0.012);
  /* Baseline on the last grid line puts the x height exactly on the line above. */
  transform: translateY(calc(var(--m) * 0.066));
  font-size: calc(var(--m) * var(--cols) / 4.205);
  font-weight: 800;
  font-stretch: 85%;
  line-height: 0.74;
  letter-spacing: 0;
  white-space: nowrap;
}

/* ------------------------------------------------------------------
   Below the first viewport: the stack, the feed, the footer
   ------------------------------------------------------------------ */

.band {
  --cols: 8;
  --m: min(calc(100cqw / var(--cols)), calc(100svh / 5));
  display: grid;
  grid-template-columns: repeat(var(--cols), var(--m));
  width: calc(var(--m) * var(--cols));
  margin-inline: auto;
  border-top: var(--line);
}

.band > * {
  border-right: var(--line);
  border-bottom: var(--line);
  padding: 1.5rem;
  min-width: 0;
}

.band > .edge {
  border-right: 0;
}

.stack-head {
  grid-column: 1 / 3;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.stack-head p {
  color: var(--ink-soft);
  max-width: 18ch;
  text-wrap: pretty;
}

.band h2 {
  font-size: clamp(2rem, 3.4cqw, 3.25rem);
  font-weight: 800;
  font-stretch: 85%;
  line-height: 0.95;
  letter-spacing: -0.02em;
}

.entry {
  grid-column: 3 / 7;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.5rem 2rem;
  color: var(--ink);
  text-decoration: none;
  transition: background-color 240ms var(--ease);
}

.entry:hover {
  background: #f1efe7;
}

.entry .num {
  margin: 0;
  display: grid;
  gap: 0.6rem;
  align-content: start;
  font-size: 0.9375rem;
}

.entry .num dt {
  font-weight: 650;
}

.entry .num dd {
  margin: 0;
  color: var(--ink-soft);
}

.entry h3 {
  grid-column: 1 / -1;
  font-size: clamp(1.75rem, 2.6cqw, 2.5rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.entry p {
  max-width: 34ch;
  text-wrap: pretty;
}

.entry pre {
  grid-column: 1 / -1;
  overflow-x: auto;
  padding: 1rem 0 0;
  border-top: var(--line);
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 1.6;
  font-variant-numeric: normal;
}

.entry .go {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  color: var(--blue);
  font-weight: 700;
  font-size: 1.0625rem;
}

.spore {
  grid-column: 7 / 9;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.spore h3 {
  font-size: 1.625rem;
  font-weight: 700;
  line-height: 1.1;
}

.spore p {
  color: var(--ink-soft);
  text-wrap: pretty;
}

.feed-url {
  font-family: var(--mono);
  font-size: 0.8125rem;
  overflow-wrap: anywhere;
  user-select: all;
}

.status {
  min-height: 1.5em;
  font-size: 0.9375rem;
}

.status.is-ok {
  color: var(--ink);
}

.status.is-error {
  color: #b3261e;
}

.foot {
  border-top: 0;
}

.foot > * {
  font-size: 0.9375rem;
}

.foot .left {
  grid-column: 1 / 5;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.foot .right {
  grid-column: 5 / 9;
  display: flex;
  justify-content: flex-end;
  gap: 1.5rem;
}

.foot a {
  color: var(--ink);
}

.foot a[aria-current] {
  text-decoration-thickness: 2px;
}

/* ------------------------------------------------------------------
   Article pages: note, privacy, terms, 404
   ------------------------------------------------------------------ */

.bar {
  --cols: 8;
  --m: min(calc(100cqw / var(--cols)), calc(100svh / 5));
  display: grid;
  grid-template-columns: repeat(var(--cols), var(--m));
  width: calc(var(--m) * var(--cols));
  margin-inline: auto;
  border-bottom: var(--line);
}

.bar > * {
  padding: 1.25rem 1.5rem;
  border-right: var(--line);
}

.bar .brand {
  grid-column: 1 / 3;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.75rem;
  font-weight: 800;
  font-stretch: 85%;
  line-height: 1;
  letter-spacing: -0.01em;
}

.bar .brand:hover {
  background: var(--orange);
}

.bar nav {
  grid-column: 3 / 9;
  border-right: 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.bar ul {
  display: flex;
  gap: 1.75rem;
  font-weight: 600;
}

.bar nav a {
  color: var(--ink);
  text-decoration: none;
}

.bar nav a:hover,
.bar nav a[aria-current] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.page {
  --cols: 8;
  --m: min(calc(100cqw / var(--cols)), calc(100svh / 5));
  display: grid;
  grid-template-columns: repeat(var(--cols), var(--m));
  width: calc(var(--m) * var(--cols));
  margin-inline: auto;
}

.page-aside {
  grid-column: 1 / 3;
  padding: 2rem 1.5rem;
  border-right: var(--line);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.page-aside dl {
  margin: 0;
  display: grid;
  gap: 1rem;
}

.page-aside dt {
  font-weight: 650;
}

.page-aside dd {
  margin: 0;
}

.page-aside a {
  color: var(--ink);
}

.page-body {
  grid-column: 3 / 9;
  padding: 2rem 0 5rem 2.5rem;
}

.page-title {
  max-width: 14ch;
  font-size: clamp(2.5rem, 5cqw, 4.5rem);
  font-weight: 800;
  font-stretch: 85%;
  line-height: 0.95;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.prose {
  max-width: 68ch;
  margin-top: 2.5rem;
}

.prose > * + * {
  margin-top: 1.1rem;
}

.prose h2 {
  margin-top: 3rem;
  font-size: 1.625rem;
  font-weight: 750;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.prose p,
.prose li {
  text-wrap: pretty;
}

.prose ul li {
  padding-left: 1.25em;
  position: relative;
}

.prose ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.68em;
  width: 0.5em;
  height: 1px;
  background: var(--ink);
}

.prose ul li + li {
  margin-top: 0.5rem;
}

.prose code {
  font-family: var(--mono);
  font-size: 0.875em;
  font-variant-numeric: normal;
}

.prose pre {
  padding: 1.25rem 1.5rem;
  border: var(--line);
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 1.65;
  font-variant-numeric: normal;
}

.prose pre code {
  font-size: inherit;
}

.prose table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.9375rem;
}

.prose th,
.prose td {
  padding: 0.45rem 0.75rem 0.45rem 0;
  border-bottom: var(--line);
  text-align: right;
}

.prose th:first-child,
.prose td:first-child,
.prose th:last-child,
.prose td:last-child {
  text-align: left;
}

.prose thead th {
  font-weight: 650;
}

.draw-note {
  display: none;
}

@media (max-width: 600px) {
  .prose .col-draws {
    display: none;
  }

  .draw-note {
    display: block;
    font-size: 0.8125rem;
    color: var(--ink-soft);
    white-space: normal;
  }

  .prose th,
  .prose td {
    padding-right: 0.5rem;
    font-size: 0.8125rem;
  }
}

.table-wrap {
  overflow-x: auto;
}

/* The fern you can change, inside the note */

.lab {
  max-width: 60rem;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  border: var(--line);
  margin-top: 2rem;
}

.lab-canvas {
  position: relative;
  background: var(--orange);
  aspect-ratio: 2 / 3;
  border-right: var(--line);
}

.lab-controls {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.lab-controls p {
  font-weight: 650;
}

.slider {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) 4rem;
  align-items: center;
  gap: 0.75rem;
}

.slider label {
  font-weight: 700;
  font-size: 1.0625rem;
}

.slider output {
  text-align: right;
  font-weight: 650;
}

.slider input[type="range"] {
  width: 100%;
  height: 44px;
  margin: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.slider input[type="range"]::-webkit-slider-runnable-track {
  height: 1px;
  background: var(--ink);
}

.slider input[type="range"]::-moz-range-track {
  height: 1px;
  background: var(--ink);
}

.slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -9px;
  border: 0;
  border-radius: 0;
  background: var(--ink);
}

.slider input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 0;
  background: var(--ink);
}

.slider input[type="range"]:hover::-webkit-slider-thumb {
  background: var(--blue);
}

.slider input[type="range"]:focus-visible {
  outline-offset: 2px;
}

.lab-note {
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

.lab .regrow {
  align-self: flex-start;
}

.changelog li {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
}

.prose ul.changelog li {
  padding-left: 0;
}

.prose ul.changelog li::before {
  content: none;
}

/* 404: a fern missing its main rule */

.missing {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(8, var(--m));
  min-height: calc(var(--m) * 4);
}

.missing-canvas {
  position: relative;
  grid-column: 1 / 3;
  margin: 0;
  background: var(--orange);
  border-right: var(--line);
}

.missing-text {
  grid-column: 3 / 9;
  padding: 2rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-items: flex-start;
}

.missing-text .go {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  min-height: 44px;
  padding: 0 1.1em;
  background: var(--blue);
  color: var(--paper);
  font-weight: 700;
  text-decoration: none;
}

.missing-text .go:hover {
  background: #1630d6;
}

/* ------------------------------------------------------------------
   Narrow screens: four columns, the live fern first
   ------------------------------------------------------------------ */

@media (max-width: 1099px) {
  .programme {
    --cols: 4;
    --m: min(calc(100cqw / 4), 180px);
    grid-template-rows: calc(var(--m) * 0.78) auto;
    grid-auto-rows: var(--m);
  }

  .wordmark {
    grid-row: 1;
    border-bottom: var(--line);
    transform: none;
    padding-bottom: calc(var(--m) * 0.04);
  }

  .nav {
    grid-column: 1 / 5;
    grid-row: 2;
    border-right: 0;
  }

  .live {
    grid-column: 1 / 5;
    grid-row: 3 / 6;
    border-right: 0;
  }

  .statement {
    grid-column: 1 / 5;
    grid-row: 10;
    border-right: 0;
  }

  .statement p + p {
    display: none;
  }

  .action {
    grid-column: 1 / 5;
    grid-row: 11;
  }

  .formula {
    grid-column: 1 / 5;
    grid-row: 6;
    border-right: 0;
  }

  .variant[data-i="1"] { grid-column: 1; }
  .variant[data-i="2"] { grid-column: 2; }
  .variant[data-i="3"] { grid-column: 3; }
  .variant[data-i="4"] { grid-column: 4; border-right: 0; }
  .variant[data-coef="b"] { grid-row: 7; }
  .variant[data-coef="c"] { grid-row: 8; }
  .variant[data-coef="d"] { grid-row: 9; }

  .rules-wrap {
    grid-column: 1 / 5;
    grid-row: 12;
    border-right: 0;
  }

  .controls {
    grid-column: 1 / 5;
    grid-row: 13;
    border-right: 0;
  }

  .colophon {
    grid-column: 1 / 5;
    grid-row: 14;
    border-right: 0;
  }

  .orange-foot {
    display: none;
  }

  .band,
  .bar,
  .page {
    --cols: 4;
    --m: min(calc(100cqw / 4), 180px);
  }

  .stack-head {
    grid-column: 1 / 5;
    border-right: 0;
  }

  .entry {
    grid-column: 1 / 5;
    grid-template-columns: minmax(0, 1fr);
    border-right: 0;
  }

  .spore {
    grid-column: 1 / 5;
    border-right: 0;
  }

  .foot .left,
  .foot .right {
    grid-column: 1 / 5;
    justify-content: flex-start;
    border-right: 0;
  }

  .bar .brand {
    grid-column: 1 / 3;
  }

  .bar nav {
    grid-column: 3 / 5;
  }

  .bar ul {
    gap: 1rem;
    font-size: 0.9375rem;
  }

  .page-aside {
    grid-column: 1 / 5;
    grid-row: 2;
    border-right: 0;
    border-top: var(--line);
  }

  .page-body {
    grid-column: 1 / 5;
    grid-row: 1;
    padding: 1.75rem 1.25rem 3rem;
  }

  .lab {
    grid-template-columns: minmax(0, 1fr);
  }

  .lab-canvas {
    aspect-ratio: 4 / 5;
    border-right: 0;
    border-bottom: var(--line);
  }

  .missing {
    grid-template-columns: repeat(4, var(--m));
  }

  .missing-canvas {
    grid-column: 1 / 5;
    min-height: calc(var(--m) * 3);
    border-right: 0;
    border-bottom: var(--line);
  }

  .missing-text {
    grid-column: 1 / 5;
    padding: 1.75rem 1.25rem;
  }
}

@media (max-width: 520px) {
  .bar nav {
    grid-column: 1 / 5;
    grid-row: 2;
    justify-content: flex-start;
    border-top: var(--line);
  }

  .bar .brand {
    grid-column: 1 / 5;
    border-right: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 1ms !important;
  }
}
