:root {
  --paper: #fbf4e7;
  --ink: #29221f;
  --muted: #5b4f49;
  --accent: #a3361f;
  --media: #29221f;
  --backing: #f5e2b3;
  --line: rgba(41, 34, 31, .24);
  --serif: Georgia, 'Times New Roman', serif;
}

.nav { border-bottom: 1px solid var(--line); }
.intro .actions { margin-top: 1.5rem; }
.button.primary { color: var(--paper); background: var(--accent); border-color: var(--accent); }
.button.primary:hover { background: var(--ink); border-color: var(--ink); }
a.still { display: block; }
.still--wide { background: var(--backing); }
.shop-pair img { object-fit: contain; }
.head { max-width: none; }
.wf-flow > li { padding-bottom: .6rem; }
.wf-flow > li + li::before { margin: .25rem 0 .75rem; }
@media (min-width: 40rem) { .wf-teams { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.process-lead { margin-top: 0; }
.field-list { max-width: var(--measure); }
.field-list > div { border-bottom: 1px solid var(--line); padding: .75rem 0; }
.field-list dt { font-weight: 700; }
.field-list dd { margin: .25rem 0 0; color: var(--muted); }
.fold-frames img { width: 100%; height: auto; }
@media (min-width: 40rem) { .fold-frames { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.shop-cta {
  padding: .9rem 1.5rem;
  border-radius: 999px;
  background: #f7c94e;
  border-color: var(--ink);
  font-size: clamp(1.1rem, 2vw, 1.27rem);
}
.shop-cta span { margin-left: .4em; }
.source-clip { max-width: 55rem; }
#result { scroll-margin-block-start: 1.5rem; }
.shop-screenshot { aspect-ratio: 1440 / 1000; background: var(--backing); }

.work-graph, .graph-tracks, .reading-order { list-style: none; padding: 0; }
#process > .head { text-align: center; }
#process > .head > * { margin-inline: auto; }

.work-graph {
  --board: #110d1c;
  --node: #1c142d;
  --wire: #a98ae8;
  --pin: #f7a2da;
  --grid: #9f79df1a;
  --blueprint-text: #eee7fc;
  max-width: 64rem;
  margin-inline: auto;
  padding: clamp(1rem, 3.8vw, 2.75rem);
  border: 1px solid #6b518c;
  color: var(--blueprint-text);
  background:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    var(--board);
  background-size: 20px 20px;
  text-align: center;
}
.graph-step + .graph-step::before {
  content: "↓"; content: "↓" / "";
  display: block;
  color: var(--wire);
  font: 700 1.35rem/1.5 ui-monospace, monospace;
}
.graph-stage, .graph-tracks li {
  border: 1px solid var(--wire);
  background: var(--node);
  padding: 1rem 1.15rem;
}
.graph-stage {
  position: relative;
  max-width: 42rem;
  margin-inline: auto;
}
.graph-stage .kicker {
  margin: 0 0 .45rem;
  color: var(--pin);
  font: 700 .8rem/1.4 ui-monospace, monospace;
  letter-spacing: .08em;
}
.work-graph a { color: var(--pin); font-weight: 700; }
.work-graph a:focus-visible { outline-color: var(--pin); }
.graph-tracks {
  --lanes: 2;
  display: grid;
  grid-template-columns: repeat(var(--lanes), minmax(0, 1fr));
  position: relative;
  margin: 0;
  padding-block: 1.75rem;
}
.five-tracks { --lanes: 5; }
.graph-tracks::before, .graph-tracks::after {
  content: "";
  position: absolute;
  inset-inline: calc(50% / var(--lanes));
  height: .65rem;
  background: linear-gradient(var(--wire), var(--wire)) center / 1px 100% no-repeat;
}
.graph-tracks::before { top: 0; border-bottom: 1px solid var(--wire); }
.graph-tracks::after { bottom: 0; border-top: 1px solid var(--wire); }
.graph-tracks li {
  position: relative;
  margin-inline: .28rem;
  padding: .65rem .75rem;
  min-width: 0;
}
.graph-tracks li::before, .graph-tracks li::after {
  content: "↓"; content: "↓" / "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  color: var(--wire);
  font: 700 1.05rem/1.1 ui-monospace, monospace;
}
.graph-tracks li::before { top: -1.13rem; }
.graph-tracks li::after { bottom: -1.13rem; }
.graph-tracks h4 { margin: 0; font-size: 1rem; }
.graph-tracks p { margin: .25rem 0 0; font-size: .9rem; line-height: 1.4; }
.graph-tracks p + p { border-top: 1px solid #70598f; padding-top: .35rem; }
.graph-tracks strong { color: var(--pin); }
.graph-review { border-color: var(--pin); }
.graph-outcomes { padding-bottom: 0; }
.graph-outcomes::after, .graph-outcomes li::after { display: none; }
@media (max-width: 49.99rem) {
  .five-tracks {
    grid-template-columns: 1fr;
    gap: .45rem;
    padding: .8rem 0 .8rem 1.25rem;
    background: linear-gradient(var(--wire), var(--wire)) .35rem center / 1px 100% no-repeat;
  }
  .five-tracks::before, .five-tracks::after, .five-tracks li::after { display: none; }
  .five-tracks li { text-align: left; }
  .five-tracks li::before {
    content: "→"; content: "→" / "";
    left: -1.5rem;
    top: 50%;
    transform: translateY(-50%);
  }
}

.reading-order {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr));
  gap: .5rem;
}
.reading-order { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; max-width: var(--measure); }
.reading-order li {
  position: relative;
  padding: calc(.6rem + 2px) .8rem .6rem;
  background: linear-gradient(var(--accent), var(--accent)) top left / 100% 2px no-repeat, var(--backing);
  font-size: 1rem;
}
.reading-order li + li::before {
  content: "↓"; content: "↓" / "";
  position: absolute;
  left: 50%;
  top: -1.5rem;
  transform: translateX(-50%);
  color: var(--accent);
  font: 700 1.05rem/1.5rem ui-monospace, monospace;
}
@media (min-width: 56rem) {
  .reading-order { grid-template-columns: repeat(5, minmax(0, 1fr)); max-width: none; }
  .reading-order li + li::before {
    content: "→"; content: "→" / "";
    left: -1.5rem;
    top: 50%;
    width: 1.5rem;
    text-align: center;
    transform: translateY(-50%);
  }
}
.reading-order span, .reading-order strong { display: block; }
.pair-frame {
  display: grid;
  aspect-ratio: 496 / 340;
  overflow: hidden;
  background: #ebe4d9;
}
.pair-frame > img, .pair-frame > video {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}
.coloring-reference {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
  padding: .65rem;
}
.media-pair figcaption {
  font: 400 .9375rem/1.5 var(--serif);
  color: var(--muted);
}
.media-pair figcaption strong { display: block; margin-bottom: .15rem; }

/* One pass of arrow motion when the work graph or reading order first appears; done in under 4 seconds */
.graph-step:nth-child(2) { --d: 1.3s; }
.graph-step:nth-child(3) { --d: 1.7s; }
.graph-step:nth-child(4) { --d: 3.1s; }
.reading-order li:nth-child(2) { --d: .45s; }
.reading-order li:nth-child(3) { --d: .9s; }
.reading-order li:nth-child(4) { --d: 1.35s; }
.reading-order li:nth-child(5) { --d: 1.8s; }
@keyframes case-drop { from { opacity: 0; translate: 0 -.4rem; } to { opacity: 1; translate: 0 0; } }
@keyframes case-slide { from { opacity: 0; translate: -.4rem 0; } to { opacity: 1; translate: 0 0; } }
@keyframes case-wire { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes case-bar { from { background-size: 0% 2px; } to { background-size: 100% 2px; } }
@media (prefers-reduced-motion: no-preference) {
  .is-armed .graph-step + .graph-step::before,
  .is-armed .graph-tracks li::before, .is-armed .graph-tracks li::after,
  .reading-order.is-armed li + li::before { opacity: 0; }
  .is-armed .graph-tracks::before, .is-armed .graph-tracks::after { transform: scaleX(0); }
  .reading-order.is-armed li { background-size: 0% 2px; }
  .is-live .graph-step + .graph-step::before { animation: case-drop .35s ease-out var(--d, 0s) both; }
  .is-live .graph-tracks::before { animation: case-wire .4s ease-out calc(var(--d, 0s) + .25s) both; }
  .is-live .graph-tracks li::before { animation: case-drop .3s ease-out calc(var(--d, 0s) + .5s) both; }
  .is-live .graph-tracks li::after { animation: case-drop .3s ease-out calc(var(--d, 0s) + .75s) both; }
  .is-live .graph-tracks::after { animation: case-wire .4s ease-out calc(var(--d, 0s) + .9s) both; }
  .reading-order.is-live li { animation: case-bar .45s ease-out var(--d, 0s) both; }
  .reading-order.is-live li + li::before { animation: case-drop .3s ease-out calc(var(--d, 0s) - .15s) both; }
}
@media (prefers-reduced-motion: no-preference) and (max-width: 49.99rem) {
  .is-live .five-tracks li::before { animation-name: case-slide; }
}
@media (prefers-reduced-motion: no-preference) and (min-width: 56rem) {
  .reading-order.is-live li + li::before { animation-name: case-slide; }
}
