/* Refractal blog */

.blog-page {
  --grid-reveal: 1;
  --cells: 17;
  --violet: #D4C6FB;
  --indigo: #A3A6EF;
  --teal: #9CDDD8;
  --ink: #FAFAF7;
  --ink-2: rgba(250, 250, 247, 0.76);
  --ink-3: rgba(250, 250, 247, 0.62);
  --surface: #11141B;
  --surface-hover: #161A23;
  --cover-bg: #171B26;
  --rule: rgba(255, 255, 255, 0.09);
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  /* Chart colours: the cube's teal and indigo, stepped down to pass the CVD and contrast checks */
  --chart-recall: #19A7A1;
  --chart-fpr: #7372D6;
  --chart-muted: #60647F;
  --chart-grid: rgba(255, 255, 255, 0.09);
  min-height: 100%;
  background: #0B0D12;
  color: var(--ink);
}
.blog-page main,
.blog-page .footer {
  position: relative;
  z-index: 2;
}
.blog-page :is(h1, h2, h3, h4) { color: var(--ink); }
.blog-page p { color: inherit; font-size: inherit; line-height: inherit; }

/* Grid fitted to the content column (set by blog.js) */
.blog-page.has-grid-fit .page-grid::before,
.blog-page.has-grid-fit .grid-aura::before {
  background-size: var(--cell) var(--cell);
  background-position: var(--grid-x) 50%;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.cube-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* Index header: the heading is for screen readers; the line under the nav says what the page is */
.blog-hero {
  padding: clamp(120px, 11vw, 152px) 0 clamp(36px, 3.6vw, 56px);
}
.blog-hero__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 40px;
}
.blog-hero__lead {
  margin: 0;
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink-2);
  text-wrap: pretty;
}

/* Meta row */
.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
  margin: 0;
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--ink-3);
}
.post-topic {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: var(--ink);
}
.post-topic__cube {
  width: 15px;
  height: 15px;
  flex: none;
}
.post-topic__cube polygon:nth-child(1) { fill: var(--violet); }
.post-topic__cube polygon:nth-child(2) { fill: var(--indigo); }
.post-topic__cube polygon:nth-child(3) { fill: var(--teal); }
.post-topic__cube polygon { fill-opacity: 0.28; }
.post-topic[data-topic="evaluations"] .post-topic__cube polygon,
.post-topic[data-topic="research"] .post-topic__cube polygon:nth-child(1),
.post-topic[data-topic="company"] .post-topic__cube polygon:nth-child(2),
.post-topic[data-topic="product"] .post-topic__cube polygon:nth-child(3) { fill-opacity: 1; }

/* Card link covers the whole card */
.post-link { color: inherit; }
.post-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
}
.post-link:focus-visible { outline: none; }
:is(.post-card, .featured__card):has(.post-link:focus-visible) {
  outline: 2px solid var(--violet);
  outline-offset: 6px;
}

.read-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--violet);
}
.read-link__text { font-variant-numeric: tabular-nums; }
.read-link__arrow { transition: transform 300ms var(--ease-out); }
:is(.post-card, .featured__card):hover .read-link__arrow { transform: translateX(6px); }

/* Covers */
.cover {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background-color: var(--cover-bg);
  isolation: isolate;
}
.cover::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    radial-gradient(rgba(212, 198, 251, 0.16) 1px, transparent 1.5px);
  background-size: 24px 24px;
  background-position: 50% 50%;
}
.cover__art {
  position: absolute;
  left: 8%;
  top: 10%;
  width: 84%;
  height: 80%;
  overflow: visible;
}

/* Shards a card falls together from (built by blog.js while it composes) */
.shards {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.shard { position: absolute; }
.word { display: inline-block; }
.is-composing {
  position: relative;
  z-index: 3;
  isolation: isolate;
}
.post-card.is-composing,
.post-card.is-composing:hover { background-color: transparent; }
:is(.cover.is-composing, .is-composing .cover) {
  overflow: visible;
  background-color: transparent;
}
:is(.cover.is-composing, .is-composing .cover)::before { visibility: hidden; }

/* Corner ticks */
.ticks {
  --tc: rgba(212, 198, 251, 0.8);
  --t: 12px;
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(var(--tc), var(--tc)) left top / var(--t) 1px no-repeat,
    linear-gradient(var(--tc), var(--tc)) left top / 1px var(--t) no-repeat,
    linear-gradient(var(--tc), var(--tc)) right top / var(--t) 1px no-repeat,
    linear-gradient(var(--tc), var(--tc)) right top / 1px var(--t) no-repeat,
    linear-gradient(var(--tc), var(--tc)) left bottom / var(--t) 1px no-repeat,
    linear-gradient(var(--tc), var(--tc)) left bottom / 1px var(--t) no-repeat,
    linear-gradient(var(--tc), var(--tc)) right bottom / var(--t) 1px no-repeat,
    linear-gradient(var(--tc), var(--tc)) right bottom / 1px var(--t) no-repeat;
  transition: background-size 460ms var(--ease-out);
}
:is(.post-card, .featured__card):hover .ticks {
  background-size:
    32px 1px, 1px 32px, 32px 1px, 1px 32px,
    32px 1px, 1px 32px, 32px 1px, 1px 32px;
}

/* Featured post */
.featured {
  padding-bottom: clamp(88px, 9vw, 136px);
}
.featured__card {
  position: relative;
  display: grid;
  grid-template-columns: calc(100% * 7 / 17) minmax(0, 1fr);
  column-gap: calc(100% / 17);
  align-items: center;
}
.featured__title {
  margin: 20px 0 16px;
  font-size: clamp(28px, 2.8vw, 40px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.featured__excerpt {
  max-width: 44ch;
  margin: 0;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-2);
}
.featured .read-link { margin-top: 32px; }

/* Archive */
.archive {
  padding-bottom: clamp(112px, 11vw, 160px);
}
.archive__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
  margin-bottom: 32px;
}
.archive__title {
  font-size: clamp(26px, 2.2vw, 32px);
  letter-spacing: -0.018em;
}
.archive__all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-size: 14px;
  font-weight: 600;
  color: var(--violet);
}
.archive__empty {
  margin: 0;
  padding: 48px 0;
  font-size: 17px;
  color: var(--ink-2);
}

.filters {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-right: -14px;
}
.filters[hidden] { display: none; }
.filter {
  appearance: none;
  min-height: 44px;
  padding: 10px 14px;
  border: 0;
  border-radius: 6px;
  background: none;
  font: 500 14.5px/1 var(--font-sans);
  color: var(--ink-3);
  cursor: pointer;
  transition: color 180ms var(--ease-out);
}
.filter:hover,
.filter[aria-pressed="true"] { color: var(--ink); }
.filters__bar {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--bar-w, 0);
  height: 2px;
  background: var(--bar-c, var(--violet));
  transform: translate(var(--bar-x, 0), var(--bar-y, 39px));
  transition:
    transform 460ms var(--ease-out),
    width 460ms var(--ease-out),
    background-color 300ms linear;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: calc(100% / 17);
  row-gap: var(--cell, 72px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.post-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  transition: background-color 260ms var(--ease-out);
}
.post-card[hidden] { display: none; }
.post-card:hover { background: var(--surface-hover); }
.post-card--upcoming .post-card__body { padding-bottom: 28px; }
.post-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 22px 24px 26px;
}
.post-card__title {
  margin: 14px 0 10px;
  font-size: clamp(19px, 1.45vw, 22px);
  line-height: 1.25;
  letter-spacing: -0.012em;
  text-wrap: balance;
}
.post-card__excerpt {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-2);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.post-card .read-link {
  margin-top: auto;
  padding-top: 22px;
}

/* Post hero */
.post-hero {
  padding-top: clamp(112px, 11vw, 148px);
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  transition: color 180ms var(--ease-out);
}
.back-link:hover { color: var(--ink); }
.back-link__arrow { transition: transform 300ms var(--ease-out); }
.back-link:hover .back-link__arrow { transform: translateX(-5px); }

.post-hero__grid {
  display: grid;
  grid-template-columns: calc(100% * 10 / 17) minmax(0, 1fr);
  column-gap: calc(100% / 17);
  align-items: end;
  margin: 28px 0 clamp(40px, 4.5vw, 64px);
}
.post-hero__title {
  margin: 0;
  font-size: clamp(36px, 4vw, 58px);
  line-height: 1.04;
  letter-spacing: -0.032em;
  text-wrap: balance;
}
.post-hero__dek {
  margin: 0 0 28px;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-2);
  text-wrap: pretty;
}
.post-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 24px;
  margin: 0;
}
.post-facts > div {
  padding: 14px 0;
  border-top: 1px solid var(--rule);
}
.post-facts__wide { grid-column: 1 / -1; }
.post-facts dt {
  margin-bottom: 4px;
  font-size: 13px;
  color: var(--ink-3);
}
.post-facts dd {
  margin: 0;
  font-size: 15px;
  color: var(--ink);
}
.cover--hero { aspect-ratio: 3 / 1; }
.post-page .cover--hero { view-transition-name: post-cover; }

/* Post body */
.post-layout {
  --sheet-top: clamp(56px, 6vw, 96px);
  display: grid;
  grid-template-columns: calc(100% * 4 / 17) calc(100% * 9 / 17);
  column-gap: calc(100% / 17);
  padding-top: var(--sheet-top);
  padding-bottom: clamp(88px, 9vw, 136px);
}
/* A clean sheet under the text so grid lines never cross it */
.post-layout::before {
  content: "";
  grid-column: 2;
  grid-row: 1;
  margin: calc(-1 * var(--sheet-top)) calc(-1 * var(--cell, 72px)) clamp(-136px, -9vw, -88px);
  background: #0B0D12;
}
.post-rail { grid-column: 1; grid-row: 1; }
.post-body { grid-column: 2; grid-row: 1; position: relative; }
.post-rail {
  position: sticky;
  top: 116px;
  display: flex;
  flex-direction: column;
  gap: 44px;
  align-self: start;
}
.toc {
  position: relative;
  padding-left: 22px;
}
.toc__list {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.toc__link {
  display: block;
  padding: 9px 0;
  font-size: 14.5px;
  line-height: 1.4;
  color: var(--ink-3);
  transition: color 220ms var(--ease-out), transform 320ms var(--ease-out);
}
.toc__link:hover { color: var(--ink); }
.toc__link[aria-current="true"] {
  color: var(--ink);
  transform: translateX(4px);
}
.toc__track {
  position: absolute;
  top: 9px;
  bottom: 9px;
  left: 0;
  width: 2px;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.1);
}
.toc__fill {
  position: absolute;
  inset: 0;
  background: linear-gradient(var(--violet), var(--indigo) 55%, var(--teal));
  transform: scaleY(var(--progress, 0));
  transform-origin: top;
}

.share__title {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--ink-3);
}
.share__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.share__link {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  font: 500 14px/1 var(--font-sans);
  color: var(--ink-2);
  cursor: pointer;
  transition: color 180ms var(--ease-out);
}
.share__link:hover { color: var(--ink); }
.share__copy.is-done { color: var(--teal); }
.share__copy[hidden] { display: none; }
.share--end { display: none; }

.post-body {
  min-width: 0;
  font-size: 18px;
  line-height: 1.75;
  color: rgba(250, 250, 247, 0.84);
}
.post-body p { margin: 0 0 1.15em; text-wrap: pretty; }
.post-body .post-body__lead {
  font-size: 21px;
  line-height: 1.6;
  color: var(--ink);
}
.post-body h2 {
  margin: 2.1em 0 0.55em;
  font-size: clamp(26px, 2.3vw, 32px);
  line-height: 1.18;
  letter-spacing: -0.02em;
  scroll-margin-top: 112px;
}
.post-body h3 {
  margin: 1.8em 0 0.45em;
  font-size: 21px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.post-body a {
  color: var(--violet);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  text-decoration-color: rgba(212, 198, 251, 0.45);
  transition: text-decoration-color 180ms var(--ease-out);
}
.post-body a:hover { text-decoration-color: currentColor; }
.post-body :is(ul, ol) {
  margin: 0 0 1.2em;
  padding-left: 1.3em;
}
.post-body li {
  margin: 0.4em 0;
  padding-left: 0.35em;
}
.post-body li::marker { color: var(--violet); }
.post-body blockquote {
  position: relative;
  margin: 2em 0;
  padding: 4px 0 4px 30px;
}
.post-body blockquote::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: linear-gradient(var(--violet) 0 33.4%, var(--indigo) 33.4% 66.7%, var(--teal) 66.7%);
}
.post-body blockquote p {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.35;
  letter-spacing: -0.015em;
  color: var(--ink);
}
/* Methods box: supporting detail at the end of a post */
.methods {
  margin: 3em 0 0;
  padding: 30px 32px 12px;
  background: var(--surface);
}
.post-body .methods h2 {
  margin: 0 0 14px;
  font-size: 22px;
}
.post-body .methods p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-2);
}

/* Author and share blocks sit inside the body but keep their own type */
.post-body .post-authors p,
.post-body .share__title { margin: 0; }
.post-body .share__list {
  margin: 0;
  padding: 0;
}
.post-body .share__list li {
  margin: 0;
  padding: 0;
}
.post-body .share__link {
  color: var(--ink-2);
  text-decoration: none;
}
.post-body .share__link:hover { color: var(--ink); }
.post-figure { margin: 2.2em 0; }
.cover--figure { aspect-ratio: 16 / 9; }
.post-figure figcaption {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-3);
}
.post-authors {
  margin-top: 3em;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
}
.post-body .post-authors__title {
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink-3);
}
.post-body .post-authors__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.post-body .post-authors__list li {
  margin: 0;
  padding: 0;
}
.post-body .post-author__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  transition: color 180ms var(--ease-out);
}
.post-body .post-author__link:hover { color: var(--violet); }
.post-author__link [aria-hidden] {
  font-weight: 500;
  color: var(--ink-3);
}
.post-facts dd a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  text-decoration-color: rgba(250, 250, 247, 0.35);
  transition: text-decoration-color 180ms var(--ease-out), color 180ms var(--ease-out);
}
.post-facts dd a:hover {
  color: var(--violet);
  text-decoration-color: currentColor;
}

.post-cta {
  padding-bottom: clamp(96px, 10vw, 144px);
}
.post-cta__panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 40px;
  padding: clamp(36px, 4.5vw, 64px) clamp(28px, 4.5vw, 64px);
  background: var(--surface);
}
.post-cta__title {
  max-width: 20ch;
  font-size: clamp(26px, 2.7vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.022em;
}

/* Charts */
.chart {
  margin: 2.4em 0;
  padding: 24px 24px 20px;
  background: var(--surface);
}
.post-body .chart__title {
  margin: 0 0 18px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
}
.chart__scroll { overflow-x: auto; }
.post-body :is(.chart__legend, .bars) { padding: 0; }
.chart__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin: -6px 0 20px;
  padding: 0;
  list-style: none;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink-2);
}
.post-body .chart__legend li {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  padding: 0;
}
.chart__key {
  width: 10px;
  height: 10px;
  flex: none;
}
.chart__key--recall {
  border-radius: 50%;
  background: var(--chart-recall);
}
.chart__key--fpr {
  background: var(--chart-fpr);
  transform: rotate(45deg) scale(0.86);
}

.heatmap {
  width: 100%;
  min-width: 460px;
  border-collapse: separate;
  border-spacing: 2px;
  font-size: 13px;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}
.heatmap thead th {
  padding: 0 4px 8px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-3);
  text-align: center;
  vertical-align: bottom;
}
.heatmap tbody th {
  padding: 0 12px 0 0;
  font-weight: 500;
  color: var(--ink-2);
  text-align: right;
  white-space: nowrap;
}
.heatmap td {
  height: 38px;
  min-width: 48px;
  border-radius: 3px;
  text-align: center;
  transition: box-shadow 160ms var(--ease-out);
}
.heatmap td:hover { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.85); }
.heatmap__scale {
  display: block;
  width: min(280px, 70%);
  margin: 18px auto 0;
}
.heatmap__ramp {
  display: block;
  height: 8px;
  border-radius: 4px;
}
.heatmap__ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 12px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.dots {
  display: grid;
  grid-template-columns: 64px repeat(3, minmax(0, 1fr));
  column-gap: 22px;
  row-gap: 4px;
  font-size: 12.5px;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}
.dots__panel { display: contents; }
.post-body .dots__title {
  grid-column: var(--col);
  grid-row: 1;
  margin: 0 0 6px;
  font-size: 13px;
  line-height: 1.3;
  color: var(--ink-2);
  text-align: center;
}
.dots__name {
  grid-column: 1;
  grid-row: var(--row);
  align-self: center;
  color: var(--ink-2);
}
.dots__row {
  grid-column: var(--col);
  grid-row: var(--row);
}
.dots__model {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.dots__track {
  position: relative;
  display: block;
  height: 46px;
  background:
    linear-gradient(90deg, var(--chart-grid) 1px, transparent 1px) 0 0 / 25% 100%,
    linear-gradient(270deg, var(--chart-grid) 1px, transparent 1px);
}
.dot {
  position: absolute;
  left: calc(var(--x) * 1%);
  width: 10px;
  height: 10px;
  margin-left: -5px;
}
.dot::before {
  content: "";
  position: absolute;
  inset: -9px;
}
.dot--recall {
  top: 8px;
  border-radius: 50%;
  background: var(--chart-recall);
  box-shadow: 0 0 0 2px var(--surface);
}
.dot--fpr { top: 28px; }
.dot--fpr::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--chart-fpr);
  box-shadow: 0 0 0 2px var(--surface);
  transform: rotate(45deg) scale(0.86);
}
.dot__label {
  position: absolute;
  top: 50%;
  right: calc(100% + 7px);
  font-size: 12px;
  color: var(--ink-2);
  white-space: nowrap;
  transform: translateY(-50%);
}
.dot.is-right .dot__label {
  right: auto;
  left: calc(100% + 7px);
}
.dots__axis {
  position: relative;
  display: block;
  grid-column: var(--col);
  grid-row: 4;
  height: 18px;
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--ink-3);
}
.dots__axis span {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
}
.dots__axis span:nth-child(1) { left: 0; transform: none; }
.dots__axis span:nth-child(2) { left: 50%; }
.dots__axis span:nth-child(3) { left: 100%; transform: translateX(-100%); }

.bars {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.post-body .bars__row { margin: 0; padding: 0; }
.bars__row,
.bars__axis {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  column-gap: 14px;
  align-items: center;
  font-size: 13px;
  line-height: 1.3;
}
.bars__name {
  color: var(--ink-2);
  text-align: right;
}
.bars__track {
  position: relative;
  height: 22px;
  background:
    linear-gradient(90deg, var(--chart-grid) 1px, transparent 1px) 0 0 / 25% 100%,
    linear-gradient(270deg, var(--chart-grid) 1px, transparent 1px);
}
.bars__bar {
  position: absolute;
  top: 4px;
  left: 0;
  width: var(--w);
  height: 14px;
  border-radius: 0 4px 4px 0;
  background: var(--chart-muted);
}
.is-focus .bars__bar { background: var(--chart-fpr); }
.bars__value {
  position: absolute;
  top: 50%;
  left: calc(var(--w) + 8px);
  font-size: 12.5px;
  color: var(--ink-2);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  transform: translateY(-50%);
}
.bars__value.is-inside {
  right: calc(100% - var(--w) + 8px);
  left: auto;
  font-weight: 600;
  color: #0B0D12;
}
.bars__axis { margin-top: 6px; }
.bars__ticks {
  position: relative;
  height: 16px;
  font-size: 11.5px;
  color: var(--ink-3);
}
.bars__ticks span {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
}
.bars__ticks span:nth-child(1) { left: 0; transform: none; }
.bars__ticks span:nth-child(2) { left: 25%; }
.bars__ticks span:nth-child(3) { left: 50%; }
.bars__ticks span:nth-child(4) { left: 75%; }
.bars__ticks span:nth-child(5) { left: 100%; transform: translateX(-100%); }

.chart-tip {
  position: fixed;
  z-index: 80;
  padding: 8px 11px;
  border-radius: 6px;
  background: #1B1F2B;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  font-size: 13px;
  line-height: 1.35;
  color: var(--ink-2);
  white-space: nowrap;
  pointer-events: none;
  transform: translateY(calc(-100% - 10px));
}
.chart-tip[hidden] { display: none; }
.chart-tip strong {
  display: block;
  font-weight: 600;
  color: var(--ink);
}

/* Data tables in posts */
.post-table {
  margin: 2em 0;
  overflow-x: auto;
}
.post-table:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 4px;
}
.post-table table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.45;
}
.post-table :is(th, td) {
  padding: 11px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--rule);
}
.post-table :is(th, td):first-child { padding-left: 0; }
.post-table :is(th, td):last-child { padding-right: 0; }
.post-table thead th {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  vertical-align: bottom;
  border-bottom-color: rgba(255, 255, 255, 0.22);
}
.post-table tbody th {
  font-weight: 500;
  color: var(--ink);
}
.post-table td { color: var(--ink-2); }
.post-table .num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.post-table .is-lead {
  font-weight: 600;
  color: var(--ink);
}

/* Reading progress on narrow screens */
.read-progress {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 60;
  display: none;
  height: 2px;
  pointer-events: none;
}
.read-progress__fill {
  display: block;
  height: 100%;
  background: var(--violet);
  transform: scaleX(var(--progress, 0));
  transform-origin: left;
}

/* Motion */
@media (prefers-reduced-motion: no-preference) {
  /* Composition: hidden until blog.js throws the pieces in; visible anyway if it never runs */
  .js .is-armed,
  .js .compose-lead:not(.is-composing):not(.is-composed) { visibility: hidden; }
  .js .compose-lead:not(.is-composing):not(.is-composed) {
    animation: compose-failsafe 0s 2.4s forwards;
  }
  .is-composing .ticks {
    animation: ticks-lock 900ms cubic-bezier(0.16, 1, 0.3, 1) var(--tick-delay, 640ms) backwards;
  }

  .blog-page .nav { view-transition-name: site-nav; }
  ::view-transition-group(post-cover) {
    animation-duration: 620ms;
    animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  ::view-transition-old(post-cover),
  ::view-transition-new(post-cover) {
    height: 100%;
    object-fit: cover;
  }
  ::view-transition-old(root),
  ::view-transition-new(root) { animation-duration: 340ms; }
}
/* Key cubes wait outside each shape; hovering the card fits them into their slots */
.cover__art use.is-key { transform: translate(calc(var(--kx) * 1px), calc(var(--ky) * 1px)); }
@media (hover: hover) {
  :is(.post-card, .featured__card, .cover--hero):hover .cover__art use.is-key { transform: none; }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .cover__art use[href="#bc"] {
    transition: translate 440ms var(--ease-out);
    transition-delay: calc(var(--i) * 14ms);
  }
  .cover__art use.is-key {
    transition:
      transform 680ms cubic-bezier(0.34, 1.32, 0.5, 1) var(--kd, 0ms),
      translate 440ms var(--ease-out) calc(var(--i) * 14ms);
  }
  :is(.post-card, .featured__card):hover .cover__art use[href="#bc"] { translate: 0 -8px; }
}
@keyframes compose-failsafe {
  to { visibility: visible; }
}
@keyframes ticks-lock {
  from {
    background-size:
      64px 1px, 1px 64px, 64px 1px, 1px 64px,
      64px 1px, 1px 64px, 64px 1px, 1px 64px;
  }
}

/* Layout: two columns of four cells */
@media (max-width: 1023px) {
  .blog-page { --cells: 9; }
  .post-hero__grid {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 24px;
  }
  .featured__card {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 32px;
  }
  .featured .cover { order: -1; }
  .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: calc(100% / 9);
  }
  .archive--more .post-card:nth-child(n + 3) { display: none; }
  .post-layout { grid-template-columns: minmax(0, 1fr); }
  .post-layout::before { grid-column: 1; margin-inline: calc(50% - 50vw); }
  .post-rail { display: none; }
  .post-body { grid-column: 1; }
  .post-body { max-width: 700px; }
  .share--end {
    display: block;
    margin-top: 32px;
  }
  .read-progress { display: block; }
  .cover--hero { aspect-ratio: 16 / 9; }
}

/* Layout: one column */
@media (max-width: 640px) {
  .blog-page { --cells: 6; }
  .post-grid {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 24px;
  }
  .archive--more .post-card:nth-child(n + 3) { display: flex; }
  .post-body { font-size: 17px; }
  .post-body .post-body__lead { font-size: 19px; }
  .post-hero__title { font-size: 27px; }
  .post-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post-facts__date {
    grid-column: 1 / -1;
    order: 1;
  }
  .post-facts__wide { order: 2; }
  .post-body h2 { font-size: 23px; }
  .chart { padding: 18px 16px 16px; }
  .dots { display: block; }
  .dots__name { display: none; }
  .dots__panel {
    display: block;
    margin-top: 16px;
  }
  .post-body .dots__title { text-align: left; }
  .dots__row {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    align-items: center;
  }
  .dots__model {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    color: var(--ink-2);
  }
  .dots__axis { margin-left: 64px; }
  .heatmap { min-width: 420px; }
  .heatmap tbody th {
    min-width: 92px;
    white-space: normal;
  }
  .bars__row,
  .bars__axis {
    grid-template-columns: 104px minmax(0, 1fr);
    column-gap: 10px;
    font-size: 12px;
  }
  .bars__name { overflow-wrap: anywhere; }
  .post-cta__panel { padding: 32px 24px; }
  .methods { padding: 22px 20px 8px; }
  .cover--hero { aspect-ratio: 4 / 3; }
}
