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

html { overflow-x: clip; background: var(--paper-0); color: var(--ink-1); }

/* The paper is plain; the only wash at the top of a page is the masthead's, in chrome.css. The
   page isolates so the washes behind it sit over the paper and under the content. */
body {
  isolation: isolate;
  overflow-x: clip;
  margin: 0;
  min-height: 100vh;
  /* The live site's body face; article prose sets --text-body itself. Inheriting the larger face
     made every inline label's line box taller, so a card's headline sat 4px low. */
  font: var(--text-ui);
  background: var(--paper-0);
}

a { color: inherit; }

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

.skip {
  position: absolute;
  left: var(--gutter);
  top: 0;
  transform: translateY(-120%);
  background: var(--ink-1);
  color: var(--paper-0);
  padding: var(--space-2) var(--space-3);
  z-index: 5;
}

.skip:focus { transform: none; }

/* Every page's box, as the live site's .page, .site-header-inner and footer rows: 1320px at most
   including the gutter on each side, so content is 1272px wide at most and starts a gutter in. */
.wrap {
  max-width: var(--col-wide);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

main { padding-block: var(--space-7) var(--space-9); }
@media (max-width: 736px) {
  main { padding-top: var(--space-5); }
}

/* As the live site's column body: main takes the free height, so a short page's footer sits at the
   bottom of the window rather than above an empty band of paper. */
body:has(> .footer) { display: flex; flex-direction: column; }
body:has(> .footer) > main { flex: 1 0 auto; }

/* The newsletter page's copy reads at the article measure from the page's left edge. */
.prose > * { max-width: var(--col-text); }
.prose h1 {
  font: var(--text-display);
  letter-spacing: -0.035em;
  margin: 0 0 var(--space-4);
}
.prose h2 { font: 600 1.25rem/1.3 var(--font-sans); margin: var(--space-6) 0 var(--space-2); }
.prose p { margin: 0 0 var(--space-4); }
.kicker {
  font: var(--text-kicker);
  letter-spacing: var(--ls-kicker);
  text-transform: uppercase;
  color: var(--ink-2);
}

/* Not-found and error pages centre their card in the article measure, as the live site's. */
.message-page { max-width: var(--col-text); }

.message-card {
  max-width: 36rem;
  padding: var(--space-6);
  background: var(--paper-1);
  border-top: 4px solid var(--ink-1);
}
.message-card h1 { font: var(--text-display); letter-spacing: -0.035em; margin: 0 0 var(--space-3); }

/* A picture in its frame, drawn as the old site's publish-time 16:9 crops were drawn: the picture
   covers a 16:9 plate centred on the frame and just large enough to cover it, and the frame clips
   the plate. A letterboxed picture, one taller than wide, sits whole in the plate over its
   backdrop, a copy of itself covering the plate, blurred by 3% of the plate's width and dimmed to
   55% (the crops' 48px of 1600 and brightness .55). The backdrop overhangs the plate by twice the
   blur so its blurred edges fall outside the frame. */
.picture-frame {
  position: relative;
  overflow: hidden;
  container-type: size;
}
.picture-frame > img {
  --plate-width: max(100cqw, 100cqh * 16 / 9);
  --plate-height: max(100cqh, 100cqw * 9 / 16);
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: var(--plate-width);
  max-width: none;
  height: var(--plate-height);
  translate: -50% -50%;
  object-fit: cover;
}
.picture-frame--letterbox > img { object-fit: contain; }
.picture-frame > .picture-backdrop {
  --blur: calc(var(--plate-width) * 0.03);
  width: calc(var(--plate-width) + 4 * var(--blur));
  height: calc(var(--plate-height) + 4 * var(--blur));
  object-fit: cover;
  filter: blur(var(--blur)) brightness(0.55);
}

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

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