/* Long-form posts with a sticky table of contents and embedded widgets.
   Loaded after styles.css by posts that use <main class="longform">.
-------------------------------------------------------------- */
:root {
  --surface: #ffffff;
  --surface-2: #f2f0eb;
  --accent: #2f6f5e;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.05);
}

@media (prefers-color-scheme: dark) {
  :root {
    --surface: #1b1a17;
    --surface-2: #22211d;
    --accent: #7cc3ac;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 16px rgba(0, 0, 0, 0.35);
  }
}

html {
  scroll-padding-top: 72px;
}

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

main.longform {
  max-width: 1040px;
  padding-top: 88px;
}

.longform__grid {
  display: block;
}

.longform__article {
  max-width: 640px;
  margin: 0 auto;
  min-width: 0;
}

@media (min-width: 1100px) {
  .longform__grid {
    display: grid;
    grid-template-columns: 220px minmax(0, 640px);
    gap: 72px;
    justify-content: center;
    align-items: start;
  }
  .longform__article {
    margin: 0;
  }
}

.post__header .post__dek {
  font-size: 19px;
  line-height: 1.5;
  color: var(--fg-muted);
  margin: 0 0 18px;
}

/* Typefaces: Franklin Gothic for body + h4 (full family declared in
   fonts/franklin-gothic.css), Freight Text (full family declared in
   fonts/freight-text.css) for the title, h2, h3 (italic) and quotes. */
:root {
  --font-body: "Franklin Gothic", -apple-system, BlinkMacSystemFont,
    "Helvetica Neue", Arial, sans-serif;
  --font-title: "Freight Text", Georgia, serif;
}

body {
  font-family: var(--font-body);
}

/* Body-copy links: a more visible underline than the site default
   (--rule-strong), mixed from the text colour so it suits both themes */
.longform .post__body a {
  text-decoration-color: color-mix(in srgb, currentColor 25%, transparent);
}

.longform .post__body a:hover {
  text-decoration-color: currentColor;
}

.longform .post__header h1,
.longform .post__body h2 {
  font-family: var(--font-title);
}

/* Type scale for long reads: body 16/400, h4 19/500 sans,
   h3 24/500 serif italic, h2 31/500 serif, title 42/500 serif.
   Weight + size + space above all step together so each level reads as distinct at a glance. */
.longform .post__header h1 {
  font-size: 42px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.12;
  margin-bottom: 16px;
}

.longform .post__body h2 {
  font-size: 31px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.2;
  margin: 60px 0 18px;
}

.longform .post__body h3 {
  font-family: var(--font-title);
  font-style: italic;
  font-size: 24px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.3;
  margin: 48px 0 12px;
}

/* Body text: 16px here (the shared post style in styles.css is 17px) */
.longform .post__body {
  font-size: 16px;
}

.longform .post__body h4 {
  font-size: 19px;
  font-weight: 500;
  line-height: 1.35;
  margin: 32px 0 8px;
}

/* A heading straight after its parent heading doesn't need the full gap */
.longform .post__body h2 + h3,
.longform .post__body h3 + h4 {
  margin-top: 20px;
}

@media (max-width: 600px) {
  .longform .post__header h1 {
    font-size: 30px;
  }
  .longform .post__body h2 {
    font-size: 25px;
    margin-top: 48px;
  }
  .longform .post__body h3 {
    font-size: 21px;
    margin-top: 40px;
  }
  .longform .post__body h4 {
    font-size: 18px;
  }
}

/* Browser-default bold (700) outshouts the 500-weight headings */
.longform .post__body strong,
.longform .post__body b {
  font-weight: 500;
}

.post__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  align-items: center;
  color: var(--fg-muted);
  font-size: 14px;
}

/* Author avatars: two small circles before the byline, with just a
   hairline edge (like the page's other rules) instead of a ring */
.post__authors {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.post__avatars {
  display: inline-flex;
  /* Franklin Gothic's tall ascender sits its capitals ~2px above the line
     box's centre; lift the avatars to centre on the cap height instead
     (the text stays put so it keeps its baseline with "48 min read") */
  position: relative;
  top: -2px;
}

/* Slight overlap; the later avatar sits on top, its hairline edge
   separating the two */
.post__avatars img + img {
  margin-left: -5px;
}


.post__avatars img {
  width: 22px;
  height: 22px;
  margin: 0;
  border-radius: 50%;
  object-fit: cover;
  outline: 1px solid color-mix(in srgb, currentColor 15%, transparent);
  outline-offset: -1px;
}

/* Table of contents — desktop sidebar
-------------------------------------------------------------- */
.toc {
  display: none;
  font-size: 13.5px;
  line-height: 1.4;
}

@media (min-width: 1100px) {
  .longform__grid > [data-toc] {
    position: sticky;
    top: 40px;
    align-self: start;
    /* Start level with the post title, not the breadcrumb above it
       (breadcrumb line + its 56px margin) */
    margin-top: 77px;
  }
  .toc {
    display: block;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    padding: 4px 8px 24px 0;
    scrollbar-width: thin;
  }
}

.toc__label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin: 0 0 14px;
}

.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc li {
  margin: 0;
}

.toc a {
  display: block;
  padding: 5px 0 5px 12px;
  border-left: 1px solid var(--rule);
  color: var(--fg-muted);
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.toc a:hover {
  color: var(--fg);
}

.toc .toc__h3 a {
  padding-left: 24px;
}

.toc .toc__h4 a {
  padding-left: 36px;
}

/* Only expand sub-sections of the section you're reading */
.toc .toc__h3,
.toc .toc__h4 {
  display: none;
}

.toc .is-open {
  display: block;
}

.toc a.is-active {
  color: var(--fg);
  border-left-color: var(--fg);
  font-weight: 500;
}

.toc a.is-trail {
  color: var(--fg);
}

/* Table of contents — mobile bar + sheet
-------------------------------------------------------------- */
.toc-bar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--rule);
  transform: translateY(-100%);
  transition: transform 0.2s ease;
}

.toc-bar.is-visible {
  transform: none;
}

@media (min-width: 1100px) {
  .toc-bar {
    display: none;
  }
}

.toc-bar__button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 12px 16px;
  font: inherit;
  font-size: 14px;
  color: var(--fg);
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
}

.toc-bar__label {
  color: var(--fg-muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  flex: none;
}

.toc-bar__current {
  flex: 1;
  font-weight: 500;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toc-bar__chev {
  color: var(--fg-muted);
  flex: none;
}

.toc-bar__progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: 100%;
  background: var(--fg);
  transform-origin: 0 50%;
  transform: scaleX(0);
}

.toc-sheet {
  border: 0;
  padding: 0;
  margin: 0;
  width: 100%;
  max-width: 100%;
  max-height: 75vh;
  inset: auto 0 0 0;
  position: fixed;
  border-radius: 14px 14px 0 0;
  background: var(--bg);
  color: var(--fg);
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.2);
}

.toc-sheet::backdrop {
  background: rgba(0, 0, 0, 0.35);
}

.toc-sheet__inner {
  padding: 20px 20px 32px;
  overflow-y: auto;
  max-height: 75vh;
}

.toc-sheet .toc {
  display: block;
  font-size: 15px;
}

.toc-sheet .toc .toc__h3,
.toc-sheet .toc .toc__h4 {
  display: block;
}

.toc-sheet .toc a {
  padding-top: 8px;
  padding-bottom: 8px;
}

/* Generic figures
-------------------------------------------------------------- */
.post__body figure {
  margin: 36px 0;
}

.post__body figure img {
  margin: 0 auto;
  border-radius: 4px;
}

.post__body figcaption {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--fg-muted);
  text-align: left;
}

.fig img[data-zoom] {
  cursor: zoom-in;
}

/* Keep portrait photos/documents from towering over the text */
.post__body .fig img {
  width: auto;
  max-height: 560px;
}

/* Inline images get the paper-stack treatment: a soft drop shadow, a slight
   alternating tilt, and they straighten and lift on hover. */
.post__body .fig {
  margin: 44px 0;
}

.post__body .fig img {
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 8px 20px rgba(0, 0, 0, 0.08);
  transform: rotate(-1.25deg);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s ease;
}

/* A smaller, centred photo; the caption stays aligned with its left edge */
.post__body .fig--small {
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.post__body .fig--small figcaption {
  margin-top: 30px;
}

.post__body .fig:nth-of-type(even) img {
  transform: rotate(1deg);
}

.post__body .fig figcaption {
  margin-top: 14px;
}

@media (hover: hover) {
  .post__body .fig img:hover {
    transform: rotate(0deg) scale(1.02);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08), 0 22px 44px rgba(0, 0, 0, 0.18);
  }
}

@media (prefers-reduced-motion: reduce) {
  .post__body .fig img {
    transition: none;
  }
}

@media (prefers-color-scheme: dark) {
  .post__body .fig img {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 8px 24px rgba(0, 0, 0, 0.45);
  }
  .post__body .fig img:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5), 0 24px 48px rgba(0, 0, 0, 0.6);
  }
}

/* Photo cluster — a few photos laid together like the paper stack. Each
   item's flex-grow is its aspect ratio, so they share a common height. */
.post__body .photos {
  margin: 48px 0 44px;
}

.photos__row {
  display: flex;
  align-items: center;
}

.post__body .photos__item {
  position: relative;
  z-index: 1;
  min-width: 0;
  width: 100%;
  height: auto;
  margin: 0;
  border-radius: 2px;
  cursor: zoom-in;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 8px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s ease;
}

.photos__item--a { flex: 0.85 1 0; transform: translate(14px, 10px) rotate(-3.5deg); }
.photos__item--b { flex: 1.334 1 0; transform: translateY(-8px) rotate(1.5deg); z-index: 2; }
.photos__item--c { flex: 1.778 1 0; transform: translate(-14px, 12px) rotate(3deg); }

.post__body .photos__item:hover,
.post__body .photos__item:focus-visible {
  z-index: 3;
}

.photos__item:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 4px;
}

@media (hover: hover) {
  .post__body .photos__item:hover {
    transform: rotate(0deg) scale(1.06);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08), 0 22px 44px rgba(0, 0, 0, 0.2);
  }
}

.post__body .photos figcaption {
  margin-top: 26px;
}

/* YC row: application video + interview-day photo. The video card keeps its
   tilt until it's playing, then straightens and comes to the front. */
.photos__item--video { flex: 1.778 1 0; aspect-ratio: 16 / 9; cursor: default; overflow: hidden; background: #000;
  transform: translate(10px, 6px) rotate(-2deg); }
.photos__item--yc { flex: 1.334 1 0; transform: translate(-10px, -6px) rotate(2.5deg); z-index: 2; }

.photos__item--video .yt__poster,
.photos__item--video .yt__frame {
  border-radius: 0;
  height: 100%;
}

.post__body .photos__item--video:has(.yt__frame) {
  z-index: 3;
  transform: none;
}

@media (hover: hover) {
  .post__body .photos__item--video:hover {
    transform: rotate(0deg) scale(1.04);
  }
}

/* Pair: a portrait and a landscape side by side (flex-grow = aspect ratio) */
.photos__item--left { flex: 0.878 1 0; transform: translate(10px, 6px) rotate(-2.5deg); z-index: 2; }
.photos__item--right { flex: 1.744 1 0; transform: translateY(-6px) rotate(1.5deg); }

/* On phones: the landscape photo across the top, the two portraits below */
@media (max-width: 600px) {
  .photos__row {
    flex-wrap: wrap;
    row-gap: 4px;
  }
  .photos__item--b { flex: 0 0 100%; order: -1; transform: rotate(-1deg); }
  /* Second line: widths in proportion to aspect ratio (0.85 : 1.778) so
     the two photos share a height */
  .photos__item--a { flex: 0 0 32.3%; transform: translateX(6px) rotate(-2.5deg); }
  .photos__item--c { flex: 0 0 67.7%; transform: translateX(-6px) rotate(2deg); }
  /* Pair on phones: the portrait on top, the landscape below */
  .photos__item--left { flex: 0 0 70%; margin: 0 auto; transform: rotate(-1.5deg); }
  .photos__item--right { flex: 0 0 100%; transform: rotate(1deg); }
}

@media (prefers-reduced-motion: reduce) {
  .post__body .photos__item {
    transition: none;
  }
}

@media (prefers-color-scheme: dark) {
  .post__body .photos__item {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 8px 24px rgba(0, 0, 0, 0.45);
  }
  .post__body .photos__item:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5), 0 24px 48px rgba(0, 0, 0, 0.6);
  }
}

.post__body .fig-pair img {
  max-height: none;
}

.fig-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 36px 0;
}

.fig-pair figure {
  margin: 0;
}

.fig-pair img {
  box-shadow: var(--shadow);
}


/* Paper stack — documents laid on the page, lift on hover, click to enlarge
-------------------------------------------------------------- */
.papers {
  display: flex;
  justify-content: center;
  margin: 48px 0 44px;
}

.post__body .paper {
  position: relative;
  z-index: 1;
  width: 46%;
  max-width: 270px;
  margin: 0;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.paper--left {
  transform: translateX(12px) rotate(-4deg);
}

.paper--right {
  transform: translate(-12px, 18px) rotate(3.5deg);
}

.post__body .paper img {
  width: 100%;
  aspect-ratio: 8.5 / 11;
  object-fit: cover;
  object-position: top;
  margin: 0;
  background: #fff;
  border-radius: 2px;
  cursor: zoom-in;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 8px 20px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.35s ease;
}

.paper img:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 4px;
}

.post__body .paper figcaption {
  margin-top: 12px;
}

.paper:hover,
.paper:focus-within {
  z-index: 2;
}

@media (hover: hover) {
  .paper--left:hover,
  .paper--left:focus-within {
    transform: translate(8px, -12px) rotate(-1.5deg) scale(1.04);
  }
  .paper--right:hover,
  .paper--right:focus-within {
    transform: translate(-8px, 4px) rotate(1.5deg) scale(1.04);
  }
  .post__body .paper:hover img {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08), 0 22px 44px rgba(0, 0, 0, 0.18);
  }
}

@media (prefers-reduced-motion: reduce) {
  .post__body .paper,
  .post__body .paper img {
    transition: none;
  }
}

@media (prefers-color-scheme: dark) {
  .post__body .paper img {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 8px 24px rgba(0, 0, 0, 0.45);
  }
  .post__body .paper:hover img {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5), 0 24px 48px rgba(0, 0, 0, 0.6);
  }
}

/* Pull quotes (e.g. customer testimonials)
-------------------------------------------------------------- */
.post__body blockquote.quote {
  position: relative;
  --quote-indent: 56px;
  margin: 32px 0;
  padding: 4px 0 4px var(--quote-indent);
  border: 0;
  background: none;
  color: var(--fg);
  font-family: var(--font-title);
  font-size: 19px;
  line-height: 1.55;
  font-style: italic;
}

.post__body blockquote.quote::before {
  content: "\201C";
  position: absolute;
  /* Hangs in the indent with clear space before the text */
  left: 0;
  /* Top of the mark lines up with the cap height of the first line */
  top: -2px;
  /* Freight bold italic: teardrop terminals with the same slant as the
     italic quote text */
  font-family: var(--font-title);
  font-size: 80px;
  font-weight: 700;
  font-style: italic;
  line-height: 1;
  color: var(--accent);
  opacity: 0.4;
}

.post__body blockquote.quote p {
  margin: 0 0 12px;
}

.post__body blockquote.quote footer {
  font-family: var(--font-body);
  font-size: 13.5px;
  font-style: normal;
  color: var(--fg-muted);
  letter-spacing: 0.01em;
}

.post__body blockquote.quote footer::before {
  content: "— ";
}

@media (max-width: 600px) {
  .post__body blockquote.quote { --quote-indent: 40px; font-size: 17.5px; }
  .post__body blockquote.quote::before { top: 0; font-size: 60px; }
}

/* Investor update excerpts — not pull quotes, just passages lifted from the
   updates: a small label naming the update, then the text with a thin rule.
-------------------------------------------------------------- */
.post__body blockquote.excerpt {
  margin: 28px 0 32px;
  padding: 0 0 0 20px;
  border: 0;
  border-left: 2px solid var(--rule-strong);
  background: none;
  font-style: italic;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--fg);
}

.post__body .excerpt__label {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 500;
  font-style: normal;
  line-height: 1.4;
  color: var(--fg-muted);
}

.post__body blockquote.excerpt p {
  margin: 0 0 10px;
  font-family: var(--font-title);
  font-size: 18px;
}

.post__body blockquote.excerpt p:last-child {
  margin-bottom: 0;
}

@media (max-width: 600px) {
  .post__body blockquote.excerpt { padding-left: 16px; }
}

/* Callout
-------------------------------------------------------------- */
.callout {
  margin: 28px 0;
  padding: 18px 20px;
  background: var(--surface-2);
  border-radius: 8px;
  font-size: 15.5px;
}

.callout p {
  margin: 0;
}

/* Company summary: titled callout, one "Label: value" line per fact */
.post__body .summary {
  margin: 28px 0;
}

.post__body .summary .callout {
  margin: 0;
}

.post__body .summary .callout p + p {
  margin-top: 6px;
}

/* Causal wordmark (from the Causal 2.0 site), small, top-right of the box.
   Floated so the first line wraps around it on narrow screens. */
.summary__logo {
  float: right;
  height: 13px;
  width: auto;
  margin: 6px 0 8px 16px;
  color: var(--fg);
}

/* Phones: on its own line at the top of the box instead */
@media (max-width: 600px) {
  .post__body .summary .callout {
    padding-top: 26px;
  }
  .summary__logo {
    float: none;
    display: block;
    margin: 4px 0 24px;
  }
}

/* Table
-------------------------------------------------------------- */
.table-wrap {
  margin: 28px 0;
  overflow-x: auto;
}

.timeline-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  line-height: 1.5;
}

.timeline-table th,
.timeline-table td {
  text-align: left;
  vertical-align: top;
  padding: 9px 12px 9px 0;
  border-bottom: 1px solid var(--rule);
}

.timeline-table thead th {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-faint);
  border-bottom-color: var(--rule-strong);
}

.timeline-table tbody th {
  font-weight: 500;
  white-space: nowrap;
  color: var(--fg-muted);
  font-variant-numeric: tabular-nums;
}

/* Link + file cards
-------------------------------------------------------------- */
.link-card,
.file-card {
  display: flex;
  align-items: stretch;
  gap: 16px;
  margin: 28px 0;
  border: 1px solid var(--rule-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--fg);
  text-decoration: none;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.link-card:hover,
.file-card:hover {
  border-color: var(--fg-faint);
  box-shadow: var(--shadow);
}

.link-card__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 0 14px 16px;
}

.link-card__title {
  font-weight: 500;
  font-size: 15px;
  line-height: 1.4;
}

.link-card__desc {
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--fg-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.link-card__host {
  margin-top: auto;
  font-size: 12.5px;
  color: var(--fg-faint);
}

.post__body .link-card__img {
  width: 34%;
  max-width: 220px;
  object-fit: cover;
  margin: 0;
  border-radius: 0;
  flex: none;
}

.file-card {
  align-items: center;
  margin: 12px 0;
  padding: 12px 16px;
}

.file-card + .file-card {
  margin-top: -2px;
}

.file-card__icon {
  flex: none;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #1d6f42;
  background: #e3f1e8;
  border-radius: 4px;
  padding: 8px 6px;
}

@media (prefers-color-scheme: dark) {
  .file-card__icon {
    color: #8fd3aa;
    background: #1d3326;
  }
}

.file-card__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.file-card__title {
  font-weight: 500;
  font-size: 15px;
}

.file-card__meta {
  font-size: 13px;
  color: var(--fg-muted);
}

.file-card__arrow {
  color: var(--fg-faint);
}

/* LinkedIn post — styled like a card from the LinkedIn feed
-------------------------------------------------------------- */
.li-post {
  --li-blue: #0a66c2;
  --li-bg: #ffffff;
  --li-border: #e0dfdc;
  --li-text: rgba(0, 0, 0, 0.9);
  --li-muted: rgba(0, 0, 0, 0.6);
  --li-article: #eef3f8;
  display: block;
  margin: 36px 0;
  background: var(--li-bg);
  border: 1px solid var(--li-border);
  border-radius: 10px;
  color: var(--li-text);
  font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: 14px;
  line-height: 1.45;
  text-decoration: none;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.02), 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

@media (prefers-color-scheme: dark) {
  .li-post {
    --li-bg: #1b1f23;
    --li-border: #38434f;
    --li-text: rgba(255, 255, 255, 0.9);
    --li-muted: rgba(255, 255, 255, 0.6);
    --li-article: #283139;
    --li-blue: #71b7fb;
  }
}

.li-post:hover {
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.li-post > span {
  display: block;
}

.li-post__head {
  display: flex !important;
  gap: 10px;
  padding: 12px 16px 0;
}

.post__body .li-post__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  margin: 0;
  flex: none;
}

.li-post__who {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.li-post__name {
  font-weight: 600;
  font-size: 14px;
}

.li-post:hover .li-post__name {
  color: var(--li-blue);
  text-decoration: underline;
}

.li-post__sub {
  font-size: 12px;
  line-height: 1.35;
  color: var(--li-muted);
}

.li-post__globe {
  width: 12px;
  height: 12px;
  vertical-align: -2px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.2;
}

.li-post__logo {
  width: 22px;
  height: 22px;
  flex: none;
  fill: #0a66c2;
}

@media (prefers-color-scheme: dark) {
  .li-post__logo {
    fill: #71b7fb;
  }
}

.li-post__text {
  padding: 10px 16px 12px;
}

.li-post__article {
  background: var(--li-article);
}

.post__body .li-post__article img {
  width: 100%;
  height: auto;
  aspect-ratio: 484 / 327;
  object-fit: cover;
  margin: 0;
  border-radius: 0;
}

.li-post__article-meta {
  display: flex;
  flex-direction: column;
  padding: 10px 16px 12px;
}

.li-post__article-title {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.35;
}

.li-post__article-host {
  font-size: 12px;
  color: var(--li-muted);
  margin-top: 2px;
}

.li-post__stats {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  margin: 0 16px;
  padding: 10px 0 12px;
  font-size: 12px;
  color: var(--li-muted);
}

.li-post__reactions,
.li-post__bubbles {
  display: flex;
  align-items: center;
}

.li-post__bubbles {
  margin-right: 8px;
}

.li-r {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid var(--li-bg);
  margin-right: -4px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 9px;
}

.li-r--like {
  background-color: #378fe9;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M7 11v9H4v-9h3zm2 9V10l4-7c1.5 0 2.5 1 2.2 2.6L14.6 9H20a1.8 1.8 0 0 1 1.8 2.1l-1.2 7A2.3 2.3 0 0 1 18.3 20H9z'/%3E%3C/svg%3E");
}

.li-r--love {
  background-color: #df704d;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 21s-8-5.2-8-11a4.5 4.5 0 0 1 8-2.8A4.5 4.5 0 0 1 20 10c0 5.8-8 11-8 11z'/%3E%3C/svg%3E");
}

.li-r--clap {
  background-color: #6dae4f;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M8 12l5-7 2 1-3 5 6-4 1.5 1.5-5 5 6-2 1 2-6 3c-3 2-7 2-8-1l-1-3z'/%3E%3C/svg%3E");
}

/* ACV step chart
-------------------------------------------------------------- */
.post__body .acv-chart {
  margin-bottom: 54px; /* 1.5× the usual 36px figure gap */
}

.acv-chart {
  --chart-line: #1a7f5a;
  --chart-fill: rgba(26, 127, 90, 0.09);
}

@media (prefers-color-scheme: dark) {
  .acv-chart {
    --chart-line: #3aa87c;
    --chart-fill: rgba(58, 168, 124, 0.12);
  }
}

.acv-chart__plot svg {
  display: block;
  width: 100%;
  overflow: visible;
  touch-action: pan-y;
  outline: none;
}

.acv-chart__plot svg:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 6px;
  border-radius: 4px;
}

.acv-chart text {
  font-family: inherit;
  font-size: 12px;
  fill: var(--fg-muted);
  font-variant-numeric: tabular-nums;
}

.acv-chart .grid {
  stroke: var(--rule);
  stroke-width: 1;
}

.acv-chart .baseline {
  stroke: var(--rule-strong);
}

.acv-chart .step {
  fill: none;
  stroke: var(--chart-line);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.acv-chart .area {
  fill: var(--chart-fill);
}

.acv-chart .record {
  fill: var(--chart-line);
  stroke: var(--bg);
  stroke-width: 2;
}

.acv-chart text.record-label {
  fill: var(--fg);
  font-weight: 500;
}

.acv-chart .cursor-line {
  stroke: var(--fg-faint);
  stroke-width: 1;
  stroke-dasharray: 2 3;
}

.acv-chart .cursor-dot {
  fill: var(--bg);
  stroke: var(--chart-line);
  stroke-width: 2;
}

.acv-chart .tip rect {
  fill: var(--fg);
}

.acv-chart text.tip-text {
  fill: var(--bg);
  font-weight: 500;
}

.acv-chart text.month.is-active {
  fill: var(--fg);
  font-weight: 600;
}

.acv-chart .cursor {
  opacity: 0;
  transition: opacity 0.12s ease;
}

.acv-chart.is-hovering .cursor {
  opacity: 1;
}

/* Visible fallback without JS; screen-reader-only once the chart draws */
.acv-chart__table {
  font-size: 14px;
  border-collapse: collapse;
}

.acv-chart__table th,
.acv-chart__table td {
  padding: 2px 16px 2px 0;
  text-align: left;
}

.acv-chart.is-drawn .acv-chart__table {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* A table can't shrink below its caption, so an unwrapped caption kept the
   hidden table ~370px wide and made the page scroll sideways on phones. */
.acv-chart.is-drawn .acv-chart__table caption {
  white-space: normal;
}

/* YouTube (click to load)
-------------------------------------------------------------- */
.yt__poster,
.yt__frame {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
}

.post__body .yt__poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  margin: 0;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.yt__poster:hover img {
  opacity: 1;
}

.yt__play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 68px;
  height: 48px;
  margin: -24px 0 0 -34px;
  border-radius: 12px;
  background: rgba(20, 20, 20, 0.8);
  transition: background 0.2s ease;
}

.yt__play::after {
  content: "";
  position: absolute;
  left: 27px;
  top: 14px;
  border-style: solid;
  border-width: 10px 0 10px 17px;
  border-color: transparent transparent transparent #fff;
}

.yt__poster:hover .yt__play {
  background: #e62117;
}

.yt__title {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px 16px 12px;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
}

.yt__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Tweets
-------------------------------------------------------------- */
.post__body figure.tweet {
  display: flex;
  justify-content: center;
}

/* Static fallback before (or without) Twitter's script */
.post__body .tweet blockquote.twitter-tweet {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 16px 18px;
  border: 1px solid var(--rule-strong);
  border-radius: 12px;
  background: var(--surface);
  color: var(--fg-muted);
  font-size: 14px;
}

.post__body .tweet blockquote.twitter-tweet p {
  color: var(--fg);
  font-size: 15px;
  margin: 0 0 10px;
}

/* Twitter's script inlines max-width: 550px; stretch to the text column */
.post__body .twitter-tweet-rendered {
  margin: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
}

.post__body .twitter-tweet-rendered iframe {
  width: 100% !important;
  max-width: 100% !important;
}

/* Deck / PDF viewer
-------------------------------------------------------------- */
/* Widget titles: the caption style (see .post__body figcaption), above the widget */
.post__body .deck__head,
.post__body .widget-head {
  margin: 0 0 12px;
  text-align: left;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--fg-muted);
}

.deck__frame {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-2);
  box-shadow: var(--shadow);
}

.deck__track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  outline: none;
}

.deck__track::-webkit-scrollbar {
  display: none;
}

.post__body .deck__track img {
  flex: 0 0 100%;
  width: 100%;
  aspect-ratio: 1400 / 788;
  object-fit: contain;
  scroll-snap-align: center;
  margin: 0;
  border-radius: 0;
  background: #fff;
}

.deck__nav {
  position: absolute;
  top: 50%;
  width: 40px;
  height: 40px;
  margin-top: -20px;
  border: 0;
  border-radius: 50%;
  background: rgba(20, 20, 20, 0.55);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.deck__nav:hover {
  background: rgba(20, 20, 20, 0.8);
}

.deck__nav[disabled] {
  visibility: hidden;
}

.deck__nav--prev {
  left: 12px;
}

.deck__nav--next {
  right: 12px;
}

.deck__frame:hover .deck__nav,
.deck__nav:focus-visible {
  opacity: 1;
}

@media (hover: none) {
  .deck__nav {
    opacity: 0.85;
    width: 34px;
    height: 34px;
    margin-top: -17px;
    font-size: 20px;
  }
}

.deck__bar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
  font-size: 13px;
  color: var(--fg-muted);
}

.deck__count {
  font-variant-numeric: tabular-nums;
  min-width: 48px;
}

.deck__progress {
  flex: 1;
  height: 2px;
  background: var(--rule);
  border-radius: 2px;
  overflow: hidden;
}

.deck__progress span {
  display: block;
  height: 100%;
  background: var(--fg-muted);
  transform-origin: 0 50%;
  transition: transform 0.2s ease;
}

.deck__fs,
.deck__dl {
  font: inherit;
  font-size: 13px;
  color: var(--fg-muted);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
}

.deck__fs:hover,
.deck__dl:hover {
  color: var(--fg);
}

.deck:fullscreen {
  background: #111;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px;
  margin: 0;
}

.deck:fullscreen .deck__frame {
  width: min(100%, calc((100vh - 120px) * 1400 / 788));
  margin: 0 auto;
}

.deck:fullscreen .deck__bar,
.deck:fullscreen figcaption {
  width: min(100%, calc((100vh - 120px) * 1400 / 788));
  margin-left: auto;
  margin-right: auto;
  color: #aaa;
}

/* Wayback gallery
-------------------------------------------------------------- */
.wayback__nav {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--rule);
}

.wayback__step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--rule-strong);
  border-radius: 50%;
  background: var(--bg);
  color: var(--fg);
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.wayback__step svg {
  width: 14px;
  height: 14px;
}

.wayback__step:hover:not(:disabled) {
  background: color-mix(in srgb, var(--fg) 8%, var(--bg));
}

.wayback__step:disabled {
  opacity: 0.35;
  cursor: default;
}

.wayback__tabs {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 0;
}

/* One rule runs behind the labels; each label masks it, leaving short
   connecting lines between consecutive timestamps. */
.wayback__tabs::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--rule-strong);
}

/* Run the rule only between the first and last labels, not past them */
.wayback__tabs::before { left: 10px; right: 10px; }

.wayback__short { display: none; }

.wayback__tabs button {
  position: relative;
  font: inherit;
  font-size: 12.5px;
  line-height: 1;
  color: var(--fg-muted);
  /* Mask the rule only behind the label plus a 3px gap, so the connecting
     lines run almost up to the timestamp. The full pill (padding) stays the
     same size so selecting doesn't shift the layout. */
  background: linear-gradient(var(--surface-2), var(--surface-2)) center / calc(100% - 14px) 100% no-repeat;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 8px 10px;
  margin: 0;
  /* Trim the line box to cap height / baseline so digits sit dead centre */
  text-box: trim-both cap alphabetic;
  white-space: nowrap;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.wayback__tabs button:first-child { margin-left: 0; }
.wayback__tabs button:last-child { margin-right: 0; }

.wayback__tabs button:hover {
  color: var(--fg);
}

.wayback__tabs button[aria-selected="true"] {
  color: var(--fg);
  font-weight: 500;
  background: var(--bg);
  border-color: var(--rule-strong);
}

.browser {
  border: 1px solid var(--rule-strong);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.browser__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--rule);
  font-size: 12.5px;
}

.browser__dots {
  display: flex;
  gap: 6px;
}

.browser__dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--rule-strong);
}

.browser__url {
  flex: 1;
  text-align: center;
  color: var(--fg-muted);
  background: var(--bg);
  border-radius: 6px;
  padding: 8px 10px;
  line-height: 1;
  /* Trim to cap height / baseline so the URL sits dead centre */
  text-box: trim-both cap alphabetic;
  font-variant-numeric: tabular-nums;
}

.browser__open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: -4px -4px -4px 0;
  border-radius: 6px;
  color: var(--fg-muted);
  text-decoration: none;
  flex: none;
}

.browser__open svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.browser__open:hover {
  background: color-mix(in srgb, var(--fg) 8%, transparent);
}

.browser__open:hover {
  color: var(--fg);
}

.browser__viewport {
  height: min(520px, 70vh);
  overflow-y: auto;
  background: #fff;
  outline: none;
  overscroll-behavior: contain;
}

.post__body .browser__viewport img {
  margin: 0;
  width: 100%;
  border-radius: 0;
  transition: opacity 0.15s ease;
}

.browser__viewport img.is-loading {
  opacity: 0.4;
}

.browser__viewport--live {
  overflow: hidden;
}

.browser__viewport--live {
  --zoom: 0.67;
}

/* Render the page at a wider virtual viewport, then scale it down,
   so more of the demo fits in the frame. */
.browser__viewport--live iframe {
  display: block;
  width: calc(100% / var(--zoom));
  height: calc(100% / var(--zoom));
  border: 0;
  background: #fff;
  transform: scale(var(--zoom));
  transform-origin: 0 0;
}

.wayback__headline {
  display: block;
  color: var(--fg);
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 4px;
}

/* Lightbox
-------------------------------------------------------------- */
.lightbox {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: 96vw;
  max-height: 96vh;
  cursor: zoom-out;
}

.lightbox:focus,
.lightbox:focus-visible {
  outline: none;
}

.lightbox::backdrop {
  background: rgba(10, 10, 10, 0.88);
}

.lightbox img {
  max-width: 96vw;
  max-height: 92vh;
  width: auto;
  height: auto;
  margin: 0;
  border-radius: 4px;
}

.lightbox p {
  color: #ccc;
  text-align: center;
  font-size: 14px;
  margin: 10px 0 0;
}

/* Draft-only section
-------------------------------------------------------------- */
.draft-notes {
  margin-top: 56px;
  padding: 4px 20px 8px;
  border: 1px dashed var(--rule-strong);
  border-radius: 10px;
}

.draft-notes > h2:first-child {
  margin-top: 20px;
}

@media (max-width: 600px) {
  main.longform {
    padding: 64px 16px 96px;
  }
  .post__header .post__dek {
    font-size: 17px;
  }
  .fig-pair {
    gap: 10px;
  }
  .link-card__desc {
    display: none;
  }
  .draft-notes {
    padding: 4px 14px 8px;
  }
}

/* X (Twitter) DM thread — rebuilt in HTML from a screenshot
-------------------------------------------------------------- */
.xdm {
  --x-blue: #1d9bf0;
  --x-bg: #ffffff;
  --x-border: #eff3f4;
  --x-text: #0f1419;
  --x-muted: #536471;
  margin: 36px 0;
  background: var(--x-bg);
  border: 1px solid var(--x-border);
  border-radius: 16px;
  overflow: hidden;
  color: var(--x-text);
  font-family: "TwitterChirp", -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 20px;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-color-scheme: dark) {
  .xdm {
    --x-bg: #000000;
    --x-border: #2f3336;
    --x-text: #e7e9ea;
    --x-muted: #71767b;
  }
}

.xdm__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--x-border);
  color: inherit;
  text-decoration: none;
}

.xdm__head:hover {
  background: color-mix(in srgb, var(--x-text) 3%, transparent);
}

.post__body .xdm__avatar {
  width: 40px;
  height: 40px;
  margin: 0;
  border-radius: 50%;
  flex: none;
}

.xdm__who {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.xdm__name {
  font-size: 17px;
  font-weight: 700;
  line-height: 20px;
}

.xdm__handle {
  color: var(--x-muted);
  line-height: 18px;
}

.xdm__logo {
  width: 20px;
  height: 20px;
  margin-left: auto;
  fill: var(--x-text);
  flex: none;
}

.xdm__thread {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 16px 20px;
}

.post__body .xdm__date {
  margin: 0 0 8px;
  color: var(--x-muted);
  font-size: 13px;
  line-height: 16px;
  font-weight: 500;
  text-align: center;
}

.xdm__group {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.post__body .xdm__msg {
  position: relative;
  max-width: min(84%, 460px);
  margin: 0;
  padding: 12px 16px;
  background: var(--x-blue);
  color: #ffffff;
  border-radius: 22px;
  overflow-wrap: anywhere;
}

/* Inline spacer reserves room for the timestamp: it sits on the last line
   when there's space and wraps to its own line when there isn't. */
.xdm__msg:has(.xdm__time)::after {
  content: "";
  display: inline-block;
  width: 62px;
}

.xdm__time {
  position: absolute;
  right: 14px;
  bottom: 11px;
  font-size: 12px;
  line-height: 16px;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
}

.post__body .xdm__msg a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.85);
  text-underline-offset: 2px;
}

@media (max-width: 600px) {
  .xdm__thread { padding: 14px 12px 16px; }
  .post__body .xdm__msg { max-width: 88%; }
}

/* Link card with a large page thumbnail on top */
.link-card--hero {
  flex-direction: column;
  gap: 0;
}

.link-card__shot {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-bottom: 1px solid var(--rule-strong);
  background: var(--surface-2);
}

.post__body .link-card__shot img {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  border-radius: 0;
  object-fit: cover;
  object-position: top left;
  transition: transform 0.4s ease;
}

@media (hover: hover) {
  .link-card--hero:hover .link-card__shot img { transform: scale(1.015); }
}

.link-card--hero .link-card__body {
  padding: 14px 16px 16px;
}

@media (max-width: 600px) {
  .wayback__nav { gap: 4px; padding: 8px 6px; }
  .wayback__step { width: 26px; height: 26px; border-color: transparent; background: none; }
  .wayback__tabs button { font-size: 11px; padding: 7px 6px; margin: 0; background-size: calc(100% - 8px) 100%; }
  .wayback__tabs::before { left: 6px; right: 6px; }
  .wayback__full { display: none; }
  .wayback__short { display: inline; }
}

/* X thread — custom-rendered so the tweets read as one connected thread
-------------------------------------------------------------- */
.xthread {
  --x-blue: #1d9bf0;
  --x-bg: #ffffff;
  --x-border: #eff3f4;
  --x-line: #cfd9de;
  --x-text: #0f1419;
  --x-muted: #536471;
  position: relative;
  margin: 36px 0;
  padding: 4px 0;
  background: var(--x-bg);
  border: 1px solid var(--x-border);
  border-radius: 16px;
  color: var(--x-text);
  font-family: "TwitterChirp", -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 20px;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-color-scheme: dark) {
  .xthread {
    --x-bg: #000000;
    --x-border: #2f3336;
    --x-line: #333639;
    --x-text: #e7e9ea;
    --x-muted: #71767b;
  }
}

.xthread__tweet {
  display: flex;
  gap: 12px;
  padding: 12px 16px 0;
}

.xthread__rail {
  position: relative;
  flex: none;
  width: 40px;
}

/* Connector: runs from under this avatar to the next tweet's avatar */
.xthread__tweet:not(:last-of-type) .xthread__rail::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 44px;
  bottom: -16px;
  width: 2px;
  margin-left: -1px;
  background: var(--x-line);
}

.post__body .xthread__avatar {
  display: block;
  width: 40px;
  height: 40px;
  margin: 0;
  border-radius: 50%;
}

.xthread__main {
  flex: 1;
  min-width: 0;
  padding-bottom: 16px;
}

.xthread__tweet:last-of-type .xthread__main {
  padding-bottom: 14px;
}

.xthread__head {
  padding-right: 28px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.xthread__name {
  font-weight: 700;
}

.xthread__meta,
.post__body .xthread__meta a {
  color: var(--x-muted);
  text-decoration: none;
}

.post__body .xthread__meta a:hover {
  text-decoration: underline;
}

.post__body .xthread__text {
  margin: 2px 0 0;
  font-size: 15px;
  line-height: 20px;
  overflow-wrap: anywhere;
}

.post__body .xthread__text a {
  color: var(--x-blue);
  text-decoration: none;
}

.post__body .xthread__text a:hover {
  text-decoration: underline;
}

.xthread__media {
  position: relative;
  margin-top: 12px;
  border: 1px solid var(--x-border);
  border-radius: 16px;
  overflow: hidden;
  background: var(--x-border);
}

.xthread__media video {
  display: block;
  width: 100%;
  height: auto;
  cursor: pointer;
}

.xthread__gif {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 16px;
  pointer-events: none;
}

.xthread__logo {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  color: var(--x-text);
}

.xthread__logo svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

@media (max-width: 600px) {
  .xthread__tweet { gap: 10px; padding: 12px 12px 0; }
}

/* Collapsed: first tweet only, with a "Show this thread" button */
.xthread.is-collapsed .xthread__tweet:not(:first-of-type) {
  display: none;
}

.xthread.is-collapsed .xthread__rail::after {
  display: none;
}

.xthread.is-collapsed .xthread__main {
  padding-bottom: 14px;
}

.xthread__more {
  display: block;
  margin: 12px 0 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: var(--x-blue);
  cursor: pointer;
}

.xthread__more:hover {
  text-decoration: underline;
}

.xthread__tweet:focus {
  outline: none;
}

/* New vs churned ARR — diverging quarterly bars
-------------------------------------------------------------- */
.arr-chart {
  --arr-new: #1a7f5a;
  --arr-exp: #52b788;
  --arr-churn: #c4473a;
  margin: 36px 0;
}

@media (prefers-color-scheme: dark) {
  .arr-chart {
    --arr-new: #3aa87c;
    --arr-exp: #17714a;
    --arr-churn: #e0614f;
  }
}

.post__body .arr-chart__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: var(--fg-muted);
}

.post__body .arr-chart__legend li {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.arr-chart .sw {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.arr-chart .sw--new { background: var(--arr-new); }
.arr-chart .sw--exp { background: var(--arr-exp); }
.arr-chart .sw--churn { background: var(--arr-churn); }
.arr-chart .sw--net { width: 9px; height: 9px; border-radius: 50%; background: var(--fg); }

.arr-chart__plot svg {
  display: block;
  width: 100%;
  overflow: visible;
  touch-action: pan-y;
  outline: none;
}

.arr-chart__plot svg:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 6px;
  border-radius: 4px;
}

.arr-chart text {
  font-family: inherit;
  font-size: 12px;
  fill: var(--fg-muted);
  font-variant-numeric: tabular-nums;
}

.arr-chart .grid { stroke: var(--rule); }
.arr-chart .baseline { stroke: var(--rule-strong); }
.arr-chart .hit { fill: transparent; }
.arr-chart .new { fill: var(--arr-new); }
.arr-chart .exp { fill: var(--arr-exp); }
.arr-chart .churn { fill: var(--arr-churn); }

.arr-chart .net {
  fill: var(--fg);
  stroke: var(--bg);
  stroke-width: 2;
}

.arr-chart .col {
  transition: opacity 0.15s ease;
}

.arr-chart.is-hovering .col:not(.is-active) {
  opacity: 0.35;
}

.arr-chart text.q.is-active {
  fill: var(--fg);
  font-weight: 600;
}

.arr-chart .tip {
  opacity: 0;
  transition: opacity 0.12s ease;
  pointer-events: none;
}

.arr-chart.is-hovering .tip { opacity: 1; }
.arr-chart .tip rect { fill: var(--fg); }
.arr-chart text.tip-text { fill: var(--bg); font-weight: 500; }

.arr-chart__table {
  font-size: 14px;
  border-collapse: collapse;
}

.arr-chart__table caption {
  text-align: left;
  color: var(--fg-muted);
  font-size: 13px;
}

.arr-chart__table th,
.arr-chart__table td {
  padding: 2px 16px 2px 0;
  text-align: left;
}

.arr-chart.is-drawn .arr-chart__table {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* A table can't shrink below its caption, so an unwrapped caption kept the
   hidden table ~370px wide and made the page scroll sideways on phones. */
.arr-chart.is-drawn .arr-chart__table caption {
  white-space: normal;
}

/* Footnotes
   Inline: <sup class="fn-ref"><a href="#fn-N" id="fnref-N">N</a></sup>
   Notes live in <section class="footnotes"> at the end of .post__body.
   Without JS the number just jumps to the note; longform.js adds a
   hover/focus (tap on touch) tooltip with the note's text.
-------------------------------------------------------------- */
.post__body .fn-ref {
  font-size: 0.72em;
  line-height: 0;
  vertical-align: super;
  margin-left: 1px;
}

.post__body .fn-ref a {
  padding: 0 2px;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  font-variant-numeric: lining-nums;
}

.post__body .fn-ref a:hover,
.post__body .fn-ref a[aria-expanded="true"] {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.post__body .footnotes {
  margin-top: 40px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--fg-muted);
}

.longform .post__body .footnotes__title {
  margin: 0 0 12px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--fg-muted);
}

.post__body .footnotes ol {
  margin: 0;
  padding-left: 20px;
}

.post__body .footnotes li {
  margin: 0 0 8px;
  padding-left: 4px;
}

.post__body .footnotes li p {
  margin: 0;
}

.post__body .footnotes li:target {
  color: var(--fg);
}

.post__body .fn-back {
  text-decoration: none;
  margin-left: 2px;
}

.fn-tip {
  position: absolute;
  z-index: 30;
  max-width: min(340px, calc(100vw - 32px));
  padding: 10px 14px;
  border: 1px solid var(--rule-strong);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 1.5;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.12s ease, visibility 0s linear 0.12s;
}

.fn-tip.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.12s ease;
}

.fn-tip p {
  margin: 0;
}

/* LinkedIn strip: compact .li-post cards in a sideways-scrolling row.
   Long post text is cut off with an ellipsis in the HTML. longform.js
   reveals the prev/next buttons and greys them out at either end.
-------------------------------------------------------------- */
.post__body .li-strip {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px 12px;
  margin: 32px 0 36px;
}

.li-strip__track {
  grid-column: 1 / -1;
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  /* A scroll container clips its contents, so pad it out far enough for the
     cards' hover shadow (0 8px 24px) and pull it back with negative margins:
     cards still line up with the text column, shadows spill past it. */
  --bleed: 24px;
  margin: -18px calc(-1 * var(--bleed)) -22px;
  padding: 18px var(--bleed) 32px;
  scroll-padding: 0 var(--bleed);
  scrollbar-width: thin;
  outline: none;
}

/* The bleed must not exceed the page gutter (16px on phones), or the
   track pokes past the viewport and the page scrolls sideways. */
@media (max-width: 600px) {
  .li-strip__track {
    --bleed: 16px;
  }
}

.li-strip__track:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -12px; /* hug the cards, not the shadow padding */
  border-radius: 10px;
}

.li-post--compact {
  flex: 0 0 290px;
  display: flex;
  flex-direction: column;
  margin: 0;
  scroll-snap-align: start;
  font-size: 13px;
}

.li-post--compact .li-post__head {
  padding: 12px 14px 0;
}

.post__body .li-post--compact .li-post__avatar {
  width: 40px;
  height: 40px;
}

.li-post--compact .li-post__name {
  font-size: 13px;
}

.li-post--compact .li-post__logo {
  width: 18px;
  height: 18px;
}

.li-post--compact .li-post__text {
  padding: 8px 14px 10px;
  overflow-wrap: break-word;
}

/* URLs in post text, coloured like LinkedIn's links */
.li-post__url {
  color: var(--li-blue);
  font-weight: 600;
}

.post__body .li-post--compact .li-post__media {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 800 / 420;
  object-fit: cover;
  margin: auto 0 0; /* equal-height cards: image sits at the bottom */
  border-radius: 0;
}

.li-post--compact .li-post__stats {
  margin: 0 14px;
  padding: 8px 0 10px;
}

.post__body .li-strip figcaption {
  grid-row: 2;
  grid-column: 1;
  margin: 0;
}

.li-strip__nav {
  grid-row: 2;
  grid-column: 2;
  display: flex;
  gap: 6px;
}

.li-strip__nav[hidden] {
  display: none;
}

.li-strip__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--rule-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--fg);
  cursor: pointer;
}

.li-strip__btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.li-strip__btn:hover:not(:disabled) {
  border-color: var(--fg-muted);
}

.li-strip__btn:disabled {
  opacity: 0.35;
  cursor: default;
}

@media (max-width: 600px) {
  .li-post--compact { flex-basis: 82%; }
}

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

/* Reels — short-form videos as 9:16 covers, fanned out like the photo
   cluster. Each links to its LinkedIn post; longform.js opens the video
   in a player instead (playing at its real aspect ratio).
-------------------------------------------------------------- */
.post__body .reels {
  margin: 48px 0 44px;
}

.reels__row {
  display: flex;
  align-items: center;
  justify-content: center;
}

.post__body .reels__item {
  position: relative;
  z-index: 1;
  flex: 1 1 0;
  min-width: 0;
  max-width: 150px;
  margin: 0 -5px;
  aspect-ratio: 9 / 16;
  border-radius: 12px;
  overflow: hidden;
  background: #111;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 8px 20px rgba(0, 0, 0, 0.14);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s ease;
}

.reels__item--1 { transform: translateY(10px) rotate(-4deg); }
.reels__item--2 { transform: translateY(-6px) rotate(2deg); z-index: 2; }
.reels__item--3 { transform: translateY(4px) rotate(-1.5deg); z-index: 3; }
.reels__item--4 { transform: translateY(-8px) rotate(3deg); z-index: 2; }
.reels__item--5 { transform: translateY(12px) rotate(-2.5deg); }

.post__body .reels__item img {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  border-radius: 0;
  object-fit: cover;
}

/* Darken the bottom so the title reads on any frame */
.reels__item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, 0.75));
  pointer-events: none;
}

.reels__play {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0.9;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.reels__play svg {
  width: 18px;
  height: 18px;
  margin-left: 2px;
  fill: #fff;
}

.reels__meta {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 10px 9px;
  font-family: var(--font-body);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.reels__title {
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.25;
}

.reels__dur {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  opacity: 0.8;
}

.post__body .reels__item:hover,
.post__body .reels__item:focus-visible {
  z-index: 4;
}

.reels__item:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 4px;
}

@media (hover: hover) {
  .post__body .reels__item:hover {
    transform: rotate(0deg) scale(1.08);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1), 0 22px 44px rgba(0, 0, 0, 0.25);
  }
  .reels__item:hover .reels__play {
    opacity: 1;
    transform: scale(1.1);
  }
}

.post__body .reels figcaption {
  margin-top: 38px;
}

/* On phones: three across, then two, still fanned */
@media (max-width: 600px) {
  .reels__row {
    flex-wrap: wrap;
    row-gap: 10px;
  }
  .post__body .reels__item {
    flex: 0 0 calc(33.333% - 2px);
    margin: 0 -3px;
  }
  .reels__title { font-size: 11.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .post__body .reels__item,
  .reels__play {
    transition: none;
  }
}

@media (prefers-color-scheme: dark) {
  .post__body .reels__item {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 8px 24px rgba(0, 0, 0, 0.45);
  }
}

/* Reel player: a dialog that plays the video at its own aspect ratio */
.reel-player {
  width: auto;
  max-width: 96vw;
  max-height: 96vh;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
}

.reel-player::backdrop {
  background: rgba(10, 10, 10, 0.9);
}

.reel-player__frame {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.reel-player video {
  display: block;
  height: auto;
  border-radius: 12px;
  background: #000;
}

.reel-player__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  color: #ddd;
  font-family: var(--font-body);
  font-size: 14px;
}

.reel-player__title {
  color: #fff;
  font-weight: 500;
}

.reel-player__date {
  color: #999;
  margin-left: 6px;
}

.reel-player__link {
  color: #ddd;
  white-space: nowrap;
}

.reel-player__btn {
  position: fixed;
  top: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
}

.reel-player__btn:hover {
  background: rgba(255, 255, 255, 0.22);
}

.reel-player__btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.reel-player__btn--prev { left: 16px; }
.reel-player__btn--next { right: 16px; }
.reel-player__btn--close { top: 16px; right: 16px; margin-top: 0; }

@media (max-width: 600px) {
  .reel-player__btn--prev,
  .reel-player__btn--next { top: auto; bottom: 16px; margin-top: 0; }
  .reel-player__bar { flex-direction: column; align-items: flex-start; gap: 4px; padding: 0 4px; }
}

/* Body lists: the marker sits in the indent with an equal gap (--list-gap)
   on each side of it — text edge | gap | marker | gap | item text.
   Markers are drawn with ::before so both gaps are exact.
-------------------------------------------------------------- */
.longform .post__body ul:not([class]),
.longform .post__body ol:not([class]) {
  --list-gap: 12px;
  margin: 0 0 22px;
  list-style: none;
}

/* Bullet: a 5px dot (Franklin Gothic's own bullet is a pinprick) */
.longform .post__body ul:not([class]) {
  --list-marker: 5px;
  padding-left: calc(var(--list-gap) * 2 + var(--list-marker));
}

/* Number: "1." in tabular figures is 14.4px wide at 16px */
.longform .post__body ol:not([class]) {
  --list-marker: 0.9em;
  padding-left: calc(var(--list-gap) * 2 + var(--list-marker));
  /* A named counter, not the built-in list-item one: Safari doesn't
     increment list-item once it's reset, so every number showed as 0. */
  counter-reset: ol-item;
}

.longform .post__body ol:not([class]) > li {
  counter-increment: ol-item;
}

.longform .post__body ul:not([class]) > li,
.longform .post__body ol:not([class]) > li {
  position: relative;
  margin-bottom: 8px;
  padding-left: 0;
}

.longform .post__body ul:not([class]) > li::before,
.longform .post__body ol:not([class]) > li::before {
  position: absolute;
  left: calc(-1 * (var(--list-gap) + var(--list-marker)));
}

.longform .post__body ul:not([class]) > li::before {
  content: "";
  top: calc(0.5lh - 4.5px);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--fg-faint);
}

.longform .post__body ol:not([class]) > li::before {
  content: counter(ol-item) ".";
  top: 0;
  color: var(--fg-muted);
  font-variant-numeric: tabular-nums;
}

.longform .post__body li > ul:not([class]),
.longform .post__body li > ol:not([class]) {
  margin: 8px 0 0;
}

@media (max-width: 600px) {
  .longform .post__body ul:not([class]),
  .longform .post__body ol:not([class]) {
    --list-gap: 9px;
  }
}

/* Hacker News post — styled after the HN item page
-------------------------------------------------------------- */
.post__body .hn-wrap {
  margin: 32px 0 36px;
}

.post__body .hn {
  --hn-orange: #ff6600;
  --hn-bg: #f6f6ef;
  --hn-text: #000000;
  --hn-sub: #828282;
  background: var(--hn-bg);
  border-radius: 4px;
  overflow: hidden;
  color: var(--hn-text);
  font-family: Verdana, Geneva, sans-serif;
  font-size: 13.33px;
  line-height: 1.35;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
}

@media (prefers-color-scheme: dark) {
  .post__body .hn {
    --hn-bg: #1c1c19;
    --hn-text: #e4e4dc;
    --hn-sub: #8f8f88;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
  }
}

.post__body .hn__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px;
  background: var(--hn-orange);
  color: #000;
  text-decoration: none;
}

/* The post's global b/strong weight is 500; HN's wordmark is bold */
.post__body .hn__bar b {
  font-weight: 700;
}

.hn__logo {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1px solid #fff;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  line-height: 1;
}

.hn__item {
  padding: 10px 14px 14px 10px;
}

.hn__title {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.post__body .hn__title a {
  color: var(--hn-text);
  text-decoration: none;
}

.hn__vote {
  flex: none;
  width: 0;
  height: 0;
  margin-right: 2px;
  border: 5px solid transparent;
  border-bottom: 8px solid var(--hn-sub);
  border-top: 0;
  transform: translateY(-1px);
}

.hn__sub {
  margin: 2px 0 0 16px;
  color: var(--hn-sub);
  font-size: 9.33px;
}

.post__body .hn__sub a {
  color: var(--hn-sub);
  text-decoration: none;
}

.post__body .hn__sub a:hover,
.post__body .hn__title a:hover {
  text-decoration: underline;
}

.hn__text {
  margin: 12px 0 0 16px;
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.post__body .hn__text p {
  margin: 0 0 9px;
}

.post__body .hn__text p:last-child {
  margin-bottom: 0;
}

.post__body .hn__text a {
  color: var(--hn-text);
  text-decoration: underline;
  text-decoration-color: currentColor;
}

/* Sign-off at the end of the post */
.post__body .signoff {
  margin: 28px 0 0;
  font-family: var(--font-title);
  font-style: italic;
  font-size: 21px;
  color: var(--fg-muted);
}
