/* DesignAccord — журнал о программировании */

:root {
  --paper: #F0F1EB;
  --paper-2: #E5E9E0;
  --sheet: #F8F9F4;
  --desk: #C3CCBF;
  --ink: #17302A;
  --ink-soft: #4A675D;
  --green: #24594A;
  --night: #12302A;
  --night-2: #1C4238;
  --on-night: #E9EEE6;
  --on-night-soft: #A9BDB4;
  --brass: #C8922E;
  --brass-deep: #A06A14;
  --brass-pale: #F1DDAE;
  --rule: rgba(23, 48, 42, .14);
  --rule-strong: rgba(23, 48, 42, .3);

  --serif: "Source Serif 4", "PT Serif", Georgia, serif;
  --sans: "Geologica", "Segoe UI", "Helvetica Neue", sans-serif;
  --mono: "JetBrains Mono", "Cascadia Mono", Consolas, monospace;

  --wrap: 1312px;
  --gutter: clamp(20px, 4.4vw, 64px);
  --brand-h: 64px;
  --nav-h: 48px;
  --lip: 36px;
  --rail: clamp(104px, 11vw, 168px);
  --text: 42.5rem;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-sheet: cubic-bezier(.2, 1.1, .3, 1);
}

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

html {
  background: var(--desk);
  color: var(--ink);
  font-family: var(--serif);
  font-synthesis: none;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  overflow-x: clip;
}

em,
i,
cite,
dfn,
var,
address {
  font-style: normal;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
}

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

:focus-visible {
  outline: 3px solid var(--brass-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

#main:focus {
  outline: none;
}

.wrap {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
}

.skip {
  position: absolute;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--night);
  color: var(--on-night);
  font: 500 15px/1 var(--sans);
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform .25s var(--ease-out);
}

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

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* ---------- emblems ---------- */

.emblem {
  display: block;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  color: var(--green);
  --em-bg: var(--sheet);
  --hot-s: 1;
}

.ln {
  fill: none;
}

.node {
  fill: var(--em-bg);
}

.hot {
  fill: var(--brass);
  stroke: none;
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(var(--hot-s));
  transition: transform .6s var(--ease-sheet) .35s;
}

/* ---------- masthead ---------- */

.mast {
  position: sticky;
  top: calc(-1 * var(--brand-h));
  z-index: 50;
  background: var(--paper);
}

.mast-brand {
  display: flex;
  align-items: baseline;
  gap: 8px 18px;
  height: var(--brand-h);
  padding-top: 22px;
}

.wordmark {
  font: 650 1.625rem/1 var(--serif);
  letter-spacing: -.02em;
  text-decoration: none;
  color: var(--ink);
}

.tagline {
  margin: 0;
  font: 400 .875rem/1 var(--sans);
  color: var(--ink-soft);
}

.mast-link {
  margin-left: auto;
  font: 450 .875rem/1 var(--sans);
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--rule-strong);
  text-underline-offset: .35em;
}

.mast-link:hover {
  text-decoration-color: var(--brass);
}

.mast-nav {
  height: var(--nav-h);
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}

.strip-scroll {
  position: relative;
  height: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

.strip-scroll::-webkit-scrollbar {
  display: none;
}

.strip {
  display: flex;
  align-items: stretch;
  gap: 4px clamp(18px, 2vw, 30px);
  height: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.strip li {
  display: flex;
}

.strip a {
  display: flex;
  align-items: center;
  font: 420 .90625rem/1 var(--sans);
  font-variation-settings: "SHRP" 0;
  color: var(--ink-soft);
  text-decoration: none;
  white-space: nowrap;
  transition: color .25s ease, font-variation-settings .35s ease;
}

.strip a:hover,
.strip a[aria-current] {
  color: var(--ink);
  font-variation-settings: "SHRP" 100;
}

.strip a:focus-visible {
  outline-offset: -3px;
}

.nav-mark {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--brass);
  opacity: 0;
  pointer-events: none;
  transition: transform .55s var(--ease-out), width .55s var(--ease-out), opacity .3s ease;
}

/* ---------- cover ---------- */

.stack {
  position: relative;
}

.cover {
  position: relative;
  z-index: 0;
  overflow: clip;
  background: var(--paper);
}

.motion-live .cover {
  position: sticky;
  top: var(--cover-top, 0px);
}

.motion-live .cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--night);
  opacity: calc(var(--covered, 0) * .28);
  pointer-events: none;
}

.cover-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 410px);
  gap: clamp(40px, 6vw, 88px);
  align-items: start;
  padding-block: clamp(36px, 5vw, 64px) calc(var(--lip) + clamp(48px, 6vw, 88px));
  transform-origin: 50% 0;
}

.motion-live .cover-inner {
  transform: scale(calc(1 - var(--covered, 0) * .045));
}

.cover-copy {
  container-type: inline-size;
  padding-top: clamp(4px, 1.4vw, 24px);
}

.title {
  margin: 0;
  font-family: var(--serif);
  font-optical-sizing: auto;
  color: var(--ink);
}

.title-main {
  display: block;
  font-size: clamp(2.25rem, 6vw, 6rem);
  font-size: calc(100cqi / 8.85);
  font-weight: 650;
  line-height: .95;
  letter-spacing: -.035em;
}

@container (min-width: 600px) {
  .title-main {
    font-size: calc(100cqi / 8.4);
  }
}

.title-sub {
  display: block;
  margin-top: .12em;
  font-size: clamp(1.75rem, 4.6vw, 4.5rem);
  font-size: calc(100cqi / 11.2);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -.025em;
}

.rise {
  display: inline-block;
  overflow: clip;
  padding: 0 .06em .16em;
  margin: 0 -.06em -.16em;
  vertical-align: top;
  white-space: nowrap;
}

.rise > .enter {
  display: inline-block;
}

.dek {
  max-width: 31em;
  margin: clamp(26px, 3vw, 40px) 0 0;
  font-size: clamp(1.125rem, 1rem + .5vw, 1.4375rem);
  line-height: 1.48;
  text-wrap: pretty;
}

.cover-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 30px;
  margin: clamp(28px, 3vw, 40px) 0 0;
}

.btn-start {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 0 28px;
  border-radius: 999px;
  background: var(--night);
  color: var(--on-night);
  font: 500 1rem/1.2 var(--sans);
  text-decoration: none;
  box-shadow: 0 1px 0 rgba(18, 48, 42, .2);
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), background-color .35s ease;
}

.btn-start:hover {
  background: var(--night-2);
  transform: translateY(-2px);
  box-shadow: 0 14px 24px -14px rgba(18, 48, 42, .75);
}

.btn-start:active {
  transform: translateY(0);
  transition-duration: .1s;
}

.link-quiet {
  font: 450 1rem/1.2 var(--sans);
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--rule-strong);
  text-underline-offset: .35em;
  transition: text-decoration-color .25s ease;
}

.link-quiet:hover {
  text-decoration-color: var(--brass);
}

/* flowchart sheet */

.fc-sheet {
  margin: 0;
  padding: clamp(14px, 1.8vw, 24px) clamp(14px, 1.8vw, 24px) clamp(14px, 1.6vw, 20px);
  border-radius: 6px;
  background-color: var(--sheet);
  background-image:
    linear-gradient(rgba(36, 89, 74, .075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36, 89, 74, .075) 1px, transparent 1px);
  background-size: 18px 18px;
  background-position: -1px -1px;
  box-shadow:
    0 0 0 1px rgba(23, 48, 42, .07),
    0 2px 2px rgba(23, 48, 42, .05),
    0 30px 50px -30px rgba(23, 48, 42, .5);
  transform: rotate(-1.2deg);
}

.fc {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.fc text {
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 450;
  font-variation-settings: "SHRP" 100;
  fill: var(--ink);
  text-anchor: middle;
}

.fc-line {
  fill: none;
  stroke: var(--green);
  stroke-width: 1.6;
  stroke-linejoin: round;
}

.fc-arrow {
  fill: var(--green);
}

.fc-block {
  transform-box: fill-box;
  transform-origin: center;
}

.fc-shape {
  fill: var(--sheet);
  stroke: var(--green);
  stroke-width: 1.6;
  stroke-linejoin: round;
  transition: fill .35s ease, stroke .35s ease;
}

.fc-block.is-on .fc-shape {
  fill: var(--brass-pale);
  stroke: var(--brass-deep);
}

.fc .fc-branch {
  font-size: 14px;
  font-weight: 400;
  fill: var(--ink-soft);
  text-anchor: start;
  transition: fill .3s ease;
}

.fc .fc-branch.is-end {
  text-anchor: end;
}

.fc .fc-branch.is-taken {
  fill: var(--brass-deep);
  font-weight: 650;
}

.fc .fc-var {
  text-anchor: start;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  fill: var(--ink-soft);
  transition: opacity .4s ease;
}

.fc-var tspan {
  fill: var(--ink);
  font-weight: 600;
  transition: fill .4s ease;
}

.fc-var tspan.is-new {
  fill: var(--brass-deep);
}

.fc .fc-out.is-hidden {
  opacity: 0;
}

.fc-bracket {
  fill: none;
  stroke: var(--ink-soft);
  stroke-width: 1.4;
}

.fc-token {
  fill: var(--brass);
  stroke: var(--sheet);
  stroke-width: 3;
  opacity: 0;
  transition: opacity .18s ease;
  pointer-events: none;
}

.fc-token.is-live {
  opacity: 1;
}

.fc-sheet figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin-top: 10px;
  font: 400 .8125rem/1.45 var(--sans);
  color: var(--ink-soft);
}

.fc-sheet figcaption span {
  flex: 1 1 18em;
  max-width: 34em;
}

.fc-replay {
  flex: none;
  padding: 8px 15px;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  background: var(--sheet);
  font: 500 .8125rem/1 var(--sans);
  color: var(--ink);
  cursor: pointer;
  transition: border-color .25s ease, background-color .25s ease;
}

.fc-replay:hover {
  border-color: var(--brass-deep);
  background: var(--brass-pale);
}

.fc-replay[hidden] {
  display: none;
}

/* ---------- sheets ---------- */

.sheet {
  position: relative;
  margin-top: calc(-1 * var(--lip));
  border-radius: 18px 18px 0 0;
  background: var(--paper);
  box-shadow:
    0 -1px 0 rgba(23, 48, 42, .06),
    0 -24px 46px -30px rgba(23, 48, 42, .55);
  scroll-margin-top: calc(var(--nav-h) - 1px);
}

.motion-live .sheet {
  transform-origin: 50% 0;
  transform: scale(calc(.968 + var(--enter, 1) * .032));
  border-radius: calc(14px + (1 - var(--enter, 1)) * 26px) calc(14px + (1 - var(--enter, 1)) * 26px) 0 0;
}

.motion-live .sheet.is-flat {
  transform: none;
}

.motion-live .sheet.is-moving {
  will-change: transform;
}

/* ---------- contents ---------- */

.contents {
  min-height: var(--cover-h, 0px);
  padding-block: calc(var(--lip) + clamp(52px, 7vw, 104px)) clamp(88px, 10vw, 140px);
  background: var(--paper-2);
}

.contents-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 32px;
  margin-bottom: clamp(28px, 4vw, 52px);
}

.contents-head h2 {
  margin: 0;
  font: 650 clamp(2.5rem, 1.6rem + 3.6vw, 5rem)/1 var(--serif);
  letter-spacing: -.03em;
}

.contents-head p {
  margin: 0;
  font: 400 .9375rem/1.4 var(--sans);
  color: var(--ink-soft);
}

.toc {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 1.3vw, 20px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc li {
  display: flex;
}

.toc-lead {
  grid-column: 1 / -1;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  width: 100%;
  min-height: 216px;
  padding: 22px 24px 24px;
  border-radius: 8px;
  background: var(--sheet);
  color: var(--ink);
  text-decoration: none;
  box-shadow:
    0 0 0 1px var(--rule),
    0 1px 1px rgba(23, 48, 42, .05);
  transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out);
}

.card .emblem {
  flex: none;
  align-self: flex-end;
  width: 84px;
  height: 84px;
  stroke-width: 2.2;
}

.card-title {
  max-width: 11em;
  font: 600 clamp(1.375rem, 1.05rem + .9vw, 1.9375rem)/1.08 var(--serif);
  letter-spacing: -.018em;
  text-wrap: balance;
}

.card:hover,
.card:focus-visible {
  transform: translateY(-6px);
  box-shadow:
    0 0 0 1px var(--rule),
    0 26px 38px -24px rgba(23, 48, 42, .55);
}

.card:hover .emblem,
.card:focus-visible .emblem {
  --hot-s: 1.3;
  animation: redraw .9s var(--ease-out);
}

.card:active {
  transform: translateY(-2px);
  transition-duration: .12s;
}

.card--lead {
  flex-direction: row-reverse;
  align-items: flex-end;
  min-height: clamp(220px, 23vw, 320px);
  padding: clamp(24px, 3vw, 40px);
  background: var(--night);
  color: var(--on-night);
}

.card--lead .emblem {
  align-self: flex-start;
  width: clamp(120px, 13vw, 190px);
  height: clamp(120px, 13vw, 190px);
  stroke-width: 1.6;
  color: var(--on-night);
  --em-bg: var(--night);
}

.card--lead .card-title {
  max-width: none;
  font-size: clamp(2.25rem, 1rem + 4.6vw, 5.25rem);
  line-height: 1;
  letter-spacing: -.03em;
}

.card--lead:focus-visible {
  outline-color: var(--brass);
}

.motion-live .toc:not(.is-in) .card {
  opacity: 0;
}

.motion-live .toc.is-in .card {
  animation: rise-soft .9s var(--ease-out) calc(var(--i, 0) * 70ms) backwards;
}

/* ---------- articles ---------- */

.piece {
  display: grid;
  grid-template-columns:
    [full-start] var(--gutter)
    [rail-start text-start] minmax(0, 1fr)
    [rail-end text-end wide-end] var(--gutter)
    [full-end];
  align-content: start;
  padding-block: calc(var(--lip) + clamp(56px, 8vw, 120px)) clamp(80px, 10vw, 148px);
}

.piece:nth-of-type(even) {
  background: var(--paper-2);
}

.piece-rail {
  grid-column: rail;
  grid-row: 1;
  margin-bottom: 22px;
}

.piece-emblem {
  width: 64px;
  height: 64px;
  stroke-width: 1.9;
  --em-bg: var(--paper);
}

.piece:nth-of-type(even) .piece-emblem {
  --em-bg: var(--paper-2);
}

.rail-line {
  display: none;
}

.piece > h2 {
  grid-column: text-start / wide-end;
  grid-row: 2;
  margin: 0;
  font: 650 clamp(2.25rem, 1.15rem + 5vw, 6rem)/.98 var(--serif);
  letter-spacing: -.032em;
  text-wrap: balance;
  overflow-wrap: break-word;
}

.piece > figure[data-slot="image"] {
  grid-column: text-start / wide-end;
  grid-row: 3;
  margin: clamp(36px, 4.5vw, 64px) 0 0;
}

.piece > .article-body {
  grid-column: text;
  grid-row: 4;
  margin-top: clamp(36px, 4.5vw, 64px);
}

.piece > figure[data-slot="image"]:empty,
.piece > .article-body:empty {
  display: none;
}

.motion-live .piece:not(.is-seen) .piece-emblem {
  stroke-dashoffset: 1;
  --hot-s: 0;
}

.motion-live .piece.is-seen .piece-emblem {
  animation: draw 1.4s var(--ease-out) .1s backwards;
}

/* lead image of an article */

.piece > figure[data-slot="image"] img,
.piece > figure[data-slot="image"] picture,
.piece > figure[data-slot="image"] > svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(72vh, 700px);
  object-fit: contain;
  padding: clamp(12px, 2.4vw, 32px);
  border-radius: 10px;
  background: var(--sheet);
  box-shadow: 0 0 0 1px var(--rule), 0 24px 40px -32px rgba(23, 48, 42, .45);
}

.piece > figure[data-slot="image"] picture img {
  padding: 0;
  box-shadow: none;
  border-radius: 0;
}

.piece figcaption,
.article-body figcaption {
  max-width: 44em;
  margin-top: 14px;
  font: 400 .875rem/1.5 var(--sans);
  color: var(--ink-soft);
  text-indent: 0;
  hyphens: manual;
}

/* ---------- reading ---------- */

.article-body {
  max-width: var(--text);
  font-size: clamp(1.125rem, 1.04rem + .32vw, 1.25rem);
  font-weight: 400;
  line-height: 1.64;
  font-optical-sizing: auto;
  font-variant-numeric: oldstyle-nums proportional-nums;
  hyphens: auto;
  text-wrap: pretty;
  overflow-wrap: break-word;
}

.article-body > * {
  margin-block: 0;
}

.article-body > * + * {
  margin-top: 1.15em;
}

.article-body > p + p {
  margin-top: 0;
  text-indent: 1.6em;
}

.article-body > p:first-of-type::first-letter {
  -webkit-initial-letter: 3;
  initial-letter: 3;
  margin-right: .1em;
  font-weight: 650;
  color: var(--green);
}

@supports not ((initial-letter: 3) or (-webkit-initial-letter: 3)) {
  .article-body > p:first-of-type::first-letter {
    float: left;
    margin: .06em .1em 0 0;
    font-size: 3.85em;
    line-height: .82;
  }
}

.article-body > h3 {
  margin-top: 2.1em;
  font: 650 1.55em/1.12 var(--serif);
  letter-spacing: -.02em;
  text-wrap: balance;
  hyphens: manual;
}

.article-body > h4 {
  margin-top: 1.8em;
  font: 600 1em/1.3 var(--sans);
  letter-spacing: -.005em;
  hyphens: manual;
}

.article-body > h3 + *,
.article-body > h4 + * {
  margin-top: .55em;
}

.article-body a {
  color: var(--green);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(36, 89, 74, .35);
  text-underline-offset: .18em;
  transition: text-decoration-color .2s ease;
}

.article-body a:hover {
  text-decoration-color: var(--brass);
  text-decoration-thickness: 2px;
}

.article-body strong,
.article-body b {
  font-weight: 650;
}

.article-body em {
  letter-spacing: .08em;
}

.article-body i,
.article-body cite,
.article-body dfn,
.article-body var {
  font-weight: 540;
}

.article-body abbr[title] {
  text-decoration: underline dotted 1px;
  text-underline-offset: .2em;
}

.article-body sup,
.article-body sub {
  font-family: var(--sans);
  font-size: .62em;
  line-height: 0;
}

.article-body ul,
.article-body ol {
  padding-left: 1.5em;
}

.article-body li + li {
  margin-top: .4em;
}

.article-body ul {
  list-style: none;
}

.article-body ul > li {
  position: relative;
}

.article-body ul > li::before {
  content: "";
  position: absolute;
  left: -1.2em;
  top: .62em;
  width: .38em;
  height: .38em;
  border: 1.5px solid var(--green);
}

.article-body ol > li::marker {
  font-family: var(--sans);
  font-size: .85em;
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--green);
}

.article-body blockquote {
  margin-inline: 0;
  padding: .15em 0 .15em 1.15em;
  border-left: 3px solid var(--brass);
  font-size: 1.08em;
  line-height: 1.52;
}

.article-body code,
.article-body kbd,
.article-body samp {
  padding: .08em .32em;
  border-radius: 4px;
  background: rgba(36, 89, 74, .09);
  font-family: var(--mono);
  font-size: .84em;
  font-variant-numeric: normal;
  font-variant-ligatures: none;
  hyphens: none;
}

.article-body pre {
  overflow-x: auto;
  padding: 1.15em 1.3em;
  border-radius: 10px;
  background: var(--night);
  color: var(--on-night);
  font-family: var(--mono);
  font-size: .8em;
  font-variant-ligatures: none;
  line-height: 1.6;
  text-indent: 0;
  hyphens: none;
  tab-size: 4;
}

.article-body pre code {
  padding: 0;
  background: none;
  font-size: 1em;
  color: inherit;
}

.article-body table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: .8em;
  line-height: 1.45;
  font-variant-numeric: lining-nums tabular-nums;
  hyphens: manual;
}

.article-body caption {
  padding-bottom: .6em;
  text-align: left;
  font-weight: 600;
}

.article-body th,
.article-body td {
  padding: .55em 1.1em .55em 0;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}

.article-body th {
  border-bottom-color: var(--rule-strong);
  font-weight: 600;
}

.article-body figure {
  margin-inline: 0;
  text-indent: 0;
}

.article-body img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

.article-body dt {
  font-weight: 650;
}

.article-body dd {
  margin-left: 1.5em;
}

.article-body hr {
  height: 28px;
  margin-block: 2.4em;
  border: 0;
  background: center / 12px 12px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M6 1l5 5-5 5-5-5z' fill='none' stroke='%2324594A' stroke-width='1.4'/%3E%3C/svg%3E");
}

/* ---------- colophon ---------- */

.colophon {
  padding-block: calc(var(--lip) + clamp(56px, 7vw, 96px)) clamp(48px, 6vw, 72px);
  background: var(--night);
  color: var(--on-night);
  box-shadow: 0 -24px 46px -30px rgba(18, 48, 42, .7);
}

.colophon-grid {
  display: grid;
  grid-template-columns:
    [full-start] var(--gutter)
    [rail-start text-start] minmax(0, 1fr)
    [rail-end text-end wide-end] var(--gutter)
    [full-end];
}

.colophon-end {
  display: none;
}

.colophon-text {
  grid-column: text-start / wide-end;
}

.colophon-text p {
  margin: 0;
}

.colophon-mark {
  font: 650 clamp(2.75rem, 1.4rem + 5.4vw, 6.5rem)/.95 var(--serif);
  letter-spacing: -.035em;
}

.colophon-line {
  margin-top: 14px !important;
  font: 400 .9375rem/1.4 var(--sans);
  color: var(--on-night-soft);
}

.colophon-license {
  max-width: 34em;
  margin-top: clamp(36px, 5vw, 64px) !important;
  font-size: 1.0625rem;
  line-height: 1.6;
}

.colophon a {
  color: var(--on-night);
  text-decoration-color: rgba(233, 238, 230, .4);
  text-underline-offset: .2em;
}

.colophon a:hover {
  text-decoration-color: var(--brass);
}

.colophon :focus-visible {
  outline-color: var(--brass);
}

.colophon-top {
  margin-top: 28px !important;
  font: 450 .9375rem/1 var(--sans);
}

/* ---------- entrance ---------- */

.motion-ok .enter {
  animation-name: var(--anim, rise-soft);
  animation-duration: var(--dur, .9s);
  animation-timing-function: var(--ease-out);
  animation-delay: var(--delay, 0s);
  animation-fill-mode: both;
  animation-play-state: paused;
}

.motion-ok .fc-line {
  stroke-dasharray: 1;
  animation: draw .7s cubic-bezier(.65, 0, .35, 1) calc(1.05s + var(--d) * 120ms) both paused;
}

.motion-ok .fc-arrow {
  animation: fade .4s ease calc(1.5s + var(--d) * 120ms) both paused;
}

.motion-ok .fc-block {
  animation: pop .6s var(--ease-sheet) calc(.95s + var(--d) * 120ms) both paused;
}

.motion-ok .fc-labels,
.motion-ok .fc-note {
  animation: fade .6s ease 1.9s both paused;
}

.motion-ok .fc-sheet figcaption {
  animation: fade .6s ease 1.7s both paused;
}

.motion-ok.is-ready .enter,
.motion-ok.is-ready .fc-line,
.motion-ok.is-ready .fc-arrow,
.motion-ok.is-ready .fc-block,
.motion-ok.is-ready .fc-labels,
.motion-ok.is-ready .fc-note,
.motion-ok.is-ready .fc-sheet figcaption {
  animation-play-state: running;
}

@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes rise-soft {
  from { opacity: 0; transform: translate3d(0, 22px, 0); }
  to { opacity: 1; transform: none; }
}

@keyframes rise-mask {
  from { transform: translate3d(0, 112%, 0); }
  to { transform: none; }
}

@keyframes land {
  0% { opacity: 0; transform: translate3d(48px, 90px, 0) rotate(6deg) scale(.95); }
  55% { opacity: 1; }
  100% { opacity: 1; transform: rotate(-1.2deg); }
}

@keyframes pop {
  from { opacity: 0; transform: scale(.82); }
  to { opacity: 1; transform: none; }
}

@keyframes draw {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

@keyframes redraw {
  0% { stroke-dashoffset: 0; }
  35% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}

/* ---------- layouts ---------- */

@media (min-width: 900px) {
  .piece,
  .colophon-grid {
    grid-template-columns:
      [full-start] minmax(var(--gutter), 1fr)
      [rail-start] var(--rail)
      [rail-end text-start] minmax(0, var(--text))
      [text-end] var(--rail)
      [wide-end] minmax(var(--gutter), 1fr)
      [full-end];
  }

  .piece-rail {
    grid-row: 1 / span 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    padding-right: clamp(16px, 2vw, 32px);
  }

  .piece-emblem {
    flex: none;
    width: clamp(76px, 7.4vw, 112px);
    height: clamp(76px, 7.4vw, 112px);
    stroke-width: 1.6;
  }

  .rail-line {
    position: relative;
    display: block;
    flex: 1 1 auto;
    width: 2px;
    min-height: 48px;
    margin-top: 22px;
    margin-bottom: calc(-1 * clamp(80px, 10vw, 148px) - var(--lip));
    overflow: hidden;
    border-radius: 2px;
    background: var(--rule);
  }

  .rail-fill {
    position: absolute;
    inset: 0;
    background: var(--green);
    transform-origin: 50% 0;
    transform: scaleY(var(--read, 0));
  }

  .piece > h2 {
    grid-row: 1;
    margin-top: -.06em;
  }

  .piece > figure[data-slot="image"] {
    grid-row: 2;
  }

  .piece > .article-body {
    grid-row: 3;
  }

  .colophon-end {
    grid-column: rail;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-right: clamp(16px, 2vw, 32px);
  }

  .colophon-end::before {
    content: "";
    width: 2px;
    height: calc(var(--lip) + clamp(56px, 7vw, 96px) - 4px);
    margin-top: calc(-1 * (var(--lip) + clamp(56px, 7vw, 96px)));
    margin-bottom: 4px;
    background: rgba(233, 238, 230, .28);
  }

  .colophon-end span {
    padding: 9px 20px 10px;
    border: 1.5px solid rgba(233, 238, 230, .5);
    border-radius: 999px;
    font: 450 .9375rem/1 var(--sans);
    font-variation-settings: "SHRP" 100;
    color: var(--on-night-soft);
  }
}

@media (max-width: 1099px) {
  .toc {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 880px) {
  .cover-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .fc-sheet {
    width: min(100%, 440px);
    justify-self: center;
    margin-top: 8px;
  }
}

@media (max-width: 719px) {
  :root {
    --brand-h: 72px;
    --nav-h: 46px;
    --lip: 24px;
  }

  .mast-brand {
    flex-wrap: wrap;
    align-content: center;
    align-items: baseline;
    gap: 6px 14px;
    padding-top: 0;
  }

  .wordmark {
    font-size: 1.4375rem;
  }

  .tagline {
    order: 3;
    flex-basis: 100%;
    font-size: .8125rem;
  }

  .strip-scroll {
    width: 100%;
    padding-inline: var(--gutter);
    scroll-padding-inline: var(--gutter);
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--gutter), #000 calc(100% - 40px), transparent);
    mask-image: linear-gradient(90deg, transparent 0, #000 var(--gutter), #000 calc(100% - 40px), transparent);
  }

  .strip {
    width: max-content;
    padding-right: 40px;
  }

  .nav-mark {
    left: 0;
  }

  .cover-actions {
    gap: 14px 24px;
  }

  .toc {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .card {
    flex-direction: row-reverse;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    min-height: 0;
    padding: 14px 16px 14px 18px;
  }

  .card .emblem {
    align-self: center;
    width: 52px;
    height: 52px;
    stroke-width: 2.6;
  }

  .card-title {
    max-width: none;
    font-size: 1.3125rem;
  }

  .card:hover,
  .card:focus-visible {
    transform: translateY(-3px);
  }

  .card--lead {
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    min-height: 210px;
    padding: 22px;
  }

  .card--lead .emblem {
    align-self: flex-end;
    width: 96px;
    height: 96px;
    stroke-width: 1.8;
  }

  .card--lead .card-title {
    font-size: clamp(1.75rem, 8.6vw, 2.75rem);
  }
}

@media (max-width: 380px) {
  .piece > h2 {
    hyphens: auto;
  }
}

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

  .card:hover,
  .card:focus-visible,
  .btn-start:hover {
    transform: none;
  }
}
