@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("./fonts/ibm-plex-sans-latin-400-500.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./fonts/ibm-plex-mono-latin-400.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("./fonts/ibm-plex-mono-latin-500.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #fcfcff;
  --text: #33333b;
  --muted: #89898f;
  --line: #dfdfdf;
  --signature-blue: #0c8d4d;
  /* Keep Tailwind utility tokens synced with app vars. */
  --color-surface: var(--bg);
  --color-text: var(--text);
  --color-muted: var(--muted);
  --color-line: var(--line);
  --color-signature: var(--signature-blue);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html {
  font-size: 15px;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.page {
  margin-bottom: 100vh;
}

.page::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  background: var(--bg);
  z-index: -1;
}

.section-row {
  position: relative;
}

.basic-link {
  position: relative;
  color: inherit;
  text-decoration: none;
}

.basic-link::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.04em;
  height: 1px;
  border-radius: 2px;
  background: #b9b9be;
  transition: background-color 180ms ease;
}

.basic-link:hover::before {
  background: var(--text);
}

.subheading-link > span {
  text-decoration-line: underline;
  text-decoration-color: var(--signature-blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
  text-decoration-skip-ink: auto;
}

.subheading-link + .subheading-link::before {
  content: "·";
  display: inline-block;
  margin: 0 0.55rem;
  color: var(--muted);
  font-size: 0.95em;
  line-height: 1;
  transform: translateY(-0.01em);
  text-decoration-line: none;
}

.metaballs-embed {
  position: relative;
  width: 100%;
  height: clamp(12rem, 30vw, 16.5rem);
  overflow: hidden;
  border: 1px solid #dfddd8;
  border-radius: 0.45rem;
  background: #f1f0eb;
}

.metaballs-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

@media (min-width: 769px) {
  .section-row .section-label {
    position: absolute;
    top: 0.1rem;
    left: -7.25rem;
    width: 6.5rem;
    padding-left: 0.5rem;
    margin: 0;
  }

  .showcase .section-label {
    top: var(--showcase-label-top, 0);
  }

  .notes .section-label {
    top: 0.6rem;
  }
}

.showcase-toggle {
  appearance: none;
  transition:
    background-color 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.showcase-toggle:hover {
  color: var(--text);
}

.showcase-toggle:active {
  transform: scale(0.94);
}

.showcase-toggle svg * {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.15;
}

.showcase-toggle.is-active {
  color: var(--text);
  background: #e8e8e8;
}

.showcase-toggle.is-active svg * {
  fill: currentColor;
  stroke: none;
}

.showcase-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.showcase-row {
  display: block;
  transition:
    transform 170ms ease-out,
    opacity 170ms ease;
}

.showcase-list.is-switching .showcase-row {
  opacity: 0.68;
  transform: translateY(2px);
}

.showcase-thumb {
  display: none;
  pointer-events: none;
}

.showcase-list.is-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.showcase-list.is-grid .showcase-row {
  display: flex;
  flex-direction: column;
  gap: 0.48rem;
}

.showcase-list.is-grid .showcase-copy {
  order: 2;
  gap: 0.28rem;
}

.showcase-list.is-grid .showcase-thumb {
  order: 1;
  display: block;
}

.notes-table:hover .notes-row,
.notes-table:focus-within .notes-row {
  opacity: 0.34;
}

.notes-table:hover .notes-row:hover,
.notes-table:focus-within .notes-row:focus-within {
  opacity: 1;
}

.black-scroll-footer {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 0;
  pointer-events: none;
}

[data-cascade] {
  opacity: 0;
  transform: translateY(8px);
}

body.is-ready [data-cascade] {
  animation: cascade-in 2000ms cubic-bezier(0.19, 1, 0.22, 1) forwards;
  animation-delay: var(--cascade-delay, 0ms);
}

@keyframes cascade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (hover: hover) and (pointer: fine) {
  body.custom-cursor-enabled,
  body.custom-cursor-enabled * {
    cursor: none !important;
  }

  .cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 1.05rem;
    height: 1.05rem;
    border-radius: 50%;
    background: var(--signature-blue);
    pointer-events: none;
    z-index: 2147483647;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition:
      opacity 120ms ease,
      width 160ms ease,
      height 160ms ease,
      border-radius 180ms ease,
      background-color 180ms ease,
      box-shadow 180ms ease,
      filter 180ms ease;
  }

  body.custom-cursor-visible .cursor-dot {
    opacity: 1;
  }

  body.cursor-blob-mode .cursor-dot {
    width: 1.82rem;
    height: 1.82rem;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    filter: none;
    transform: translate(-50%, -50%)
      scale(calc(1 + (var(--cursor-speed, 0) * 0.06)));
    animation: none;
  }

  body.cursor-blob-mode .cursor-dot::before,
  body.cursor-blob-mode .cursor-dot::after {
    content: "";
    position: absolute;
    pointer-events: none;
  }

  body.cursor-blob-mode .cursor-dot::before {
    left: 50%;
    top: 50%;
    width: 0.16rem;
    height: 0.16rem;
    border-radius: 0;
    background: var(--signature-blue);
    transform: translate(-50%, -50%);
    animation: cursor-blob-points 520ms steps(1, end) infinite;
  }

  body.cursor-blob-mode .cursor-dot::after {
    content: none;
  }

  body.cursor-blob-mode.cursor-drag-mode .cursor-dot {
    transform: translate(-50%, -50%)
      translate(
        calc(var(--cursor-vx, 0) * 7px),
        calc(var(--cursor-vy, 0) * 7px)
      )
      scale(calc(1.08 + (var(--cursor-speed, 0) * 0.14)));
  }

  body.cursor-blob-mode.cursor-drag-mode .cursor-dot::before {
    animation-duration: 270ms;
    transform: translate(-50%, -50%)
      translate(
        calc(var(--cursor-vx, 0) * 3px),
        calc(var(--cursor-vy, 0) * 3px)
      );
  }

  @keyframes cursor-blob-points {
    0% {
      box-shadow:
        0 0 0 var(--signature-blue),
        -0.22rem 0 0 var(--signature-blue),
        0.22rem 0 0 var(--signature-blue),
        -0.44rem 0 0 var(--signature-blue),
        0.44rem 0 0 var(--signature-blue),
        -0.22rem -0.22rem 0 var(--signature-blue),
        0 -0.22rem 0 var(--signature-blue),
        0.22rem -0.22rem 0 var(--signature-blue),
        -0.44rem -0.22rem 0 var(--signature-blue),
        0.44rem -0.22rem 0 var(--signature-blue),
        -0.22rem 0.22rem 0 var(--signature-blue),
        0 0.22rem 0 var(--signature-blue),
        0.22rem 0.22rem 0 var(--signature-blue),
        -0.44rem 0.22rem 0 var(--signature-blue),
        0.44rem 0.22rem 0 var(--signature-blue),
        0 -0.44rem 0 var(--signature-blue),
        -0.22rem -0.44rem 0 var(--signature-blue),
        0.22rem -0.44rem 0 var(--signature-blue),
        -0.22rem 0.44rem 0 var(--signature-blue),
        0.22rem 0.44rem 0 var(--signature-blue),
        -0.66rem 0 0 rgba(12, 141, 77, 0.95),
        0.66rem 0 0 rgba(12, 141, 77, 0.95);
    }

    33% {
      box-shadow:
        0 0 0 var(--signature-blue),
        -0.22rem 0 0 var(--signature-blue),
        0.22rem 0 0 var(--signature-blue),
        -0.44rem 0 0 var(--signature-blue),
        0.44rem 0 0 var(--signature-blue),
        -0.22rem -0.22rem 0 var(--signature-blue),
        0 -0.22rem 0 var(--signature-blue),
        0.22rem -0.22rem 0 var(--signature-blue),
        -0.44rem -0.22rem 0 var(--signature-blue),
        0.44rem -0.22rem 0 var(--signature-blue),
        -0.22rem 0.22rem 0 var(--signature-blue),
        0 0.22rem 0 var(--signature-blue),
        0.22rem 0.22rem 0 var(--signature-blue),
        -0.44rem 0.22rem 0 var(--signature-blue),
        0.44rem 0.22rem 0 var(--signature-blue),
        0 -0.44rem 0 var(--signature-blue),
        -0.22rem -0.44rem 0 var(--signature-blue),
        0.22rem -0.44rem 0 var(--signature-blue),
        0 0.44rem 0 var(--signature-blue),
        0.22rem 0.44rem 0 var(--signature-blue),
        -0.66rem 0.22rem 0 rgba(12, 141, 77, 0.95),
        0.66rem -0.22rem 0 rgba(12, 141, 77, 0.95);
    }

    66% {
      box-shadow:
        0 0 0 var(--signature-blue),
        -0.22rem 0 0 var(--signature-blue),
        0.22rem 0 0 var(--signature-blue),
        -0.44rem 0 0 var(--signature-blue),
        0.44rem 0 0 var(--signature-blue),
        -0.22rem -0.22rem 0 var(--signature-blue),
        0 -0.22rem 0 var(--signature-blue),
        0.22rem -0.22rem 0 var(--signature-blue),
        -0.44rem -0.22rem 0 var(--signature-blue),
        0.44rem -0.22rem 0 var(--signature-blue),
        -0.22rem 0.22rem 0 var(--signature-blue),
        0 0.22rem 0 var(--signature-blue),
        0.22rem 0.22rem 0 var(--signature-blue),
        -0.44rem 0.22rem 0 var(--signature-blue),
        0.44rem 0.22rem 0 var(--signature-blue),
        -0.22rem -0.44rem 0 var(--signature-blue),
        0 -0.44rem 0 var(--signature-blue),
        0.22rem -0.44rem 0 var(--signature-blue),
        -0.44rem 0.44rem 0 var(--signature-blue),
        0 0.44rem 0 var(--signature-blue),
        0.22rem 0.44rem 0 var(--signature-blue),
        -0.66rem -0.22rem 0 rgba(12, 141, 77, 0.95),
        0.66rem 0.22rem 0 rgba(12, 141, 77, 0.95);
    }

    100% {
      box-shadow:
        0 0 0 var(--signature-blue),
        -0.22rem 0 0 var(--signature-blue),
        0.22rem 0 0 var(--signature-blue),
        -0.44rem 0 0 var(--signature-blue),
        0.44rem 0 0 var(--signature-blue),
        -0.22rem -0.22rem 0 var(--signature-blue),
        0 -0.22rem 0 var(--signature-blue),
        0.22rem -0.22rem 0 var(--signature-blue),
        -0.44rem -0.22rem 0 var(--signature-blue),
        0.44rem -0.22rem 0 var(--signature-blue),
        -0.22rem 0.22rem 0 var(--signature-blue),
        0 0.22rem 0 var(--signature-blue),
        0.22rem 0.22rem 0 var(--signature-blue),
        -0.44rem 0.22rem 0 var(--signature-blue),
        0.44rem 0.22rem 0 var(--signature-blue),
        0 -0.44rem 0 var(--signature-blue),
        -0.22rem -0.44rem 0 var(--signature-blue),
        0.22rem -0.44rem 0 var(--signature-blue),
        -0.22rem 0.44rem 0 var(--signature-blue),
        0.22rem 0.44rem 0 var(--signature-blue),
        -0.66rem 0 0 rgba(12, 141, 77, 0.95),
        0.66rem 0 0 rgba(12, 141, 77, 0.95);
    }
  }
}

@media (max-width: 768px) {
  .page {
    padding: 2rem 2rem 6rem;
  }

  .showcase-head {
    margin-bottom: 0.55rem;
  }

  .showcase-list.is-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .notes-row {
    gap: 0.55rem;
  }

  .notes-table {
    border-top: 1px solid var(--line);
  }

  .metaballs-embed {
    height: clamp(10rem, 46vw, 13.5rem);
  }
}

.article-page .site-main {
  max-width: 46rem;
  min-height: auto;
  padding-top: 2.25rem;
  padding-bottom: 6rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.article-page .page {
  margin-bottom: 0;
}

.article-shell {
  display: block;
  max-width: 34.375rem;
  margin: 0 auto;
}

.article-aside {
  padding-top: 0;
  margin-bottom: 1.1rem;
}

.article-index-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: rgba(0, 0, 0, 0.4);
  text-decoration: none;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: -0.09px;
  font-weight: 460;
  padding: 0.25rem 0;
}

.article-index-link::before {
  content: "↩";
  line-height: 1;
}

.article-index-link:hover {
  color: rgba(0, 0, 0, 0.55);
}

.article-main {
  max-width: 34.375rem;
  min-width: 0;
  color: #111;
}

.article-main header {
  margin-bottom: 0.5rem;
}

.article-main h1 {
  margin: 0;
  color: #111;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: -0.09px;
  font-weight: 500;
}

.article-main time {
  display: block;
  margin-top: 0;
  font-size: 14px;
  line-height: 20px;
  color: rgba(0, 0, 0, 0.4);
  letter-spacing: -0.09px;
  font-weight: 460;
}

.article-main h2 {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin: 2.35rem 0 0.4rem;
  color: #111;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: -0.09px;
  font-weight: 560;
}

.article-main h2::after {
  content: "";
  flex: 1;
  min-width: 1.5rem;
  border-top: 1px solid var(--line);
  transform: translateY(0.02rem);
}

.article-main p {
  margin: 0;
  padding-top: 1rem;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: -0.09px;
  font-weight: 460;
}

.article-main p code,
.article-main li code {
  font-family:
    "IBM Plex Mono", SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.86em;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 0.28rem;
  padding: 0.08em 0.34em;
}

.article-main p em {
  font-style: italic;
}

.article-main ul,
.article-main ol {
  margin: 0.8rem 0 0.9rem 1.15rem;
  padding: 0;
}

.article-main li {
  margin-bottom: 0.2rem;
  color: #111;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: -0.09px;
  font-weight: 460;
}

.article-main .footnotes {
  margin-top: 0.9rem;
  padding-top: 0;
}

.article-main .footnotes h2 {
  margin-top: 2.2rem;
}

.article-main .footnotes p {
  color: rgba(0, 0, 0, 0.4);
  font-size: 14px;
  line-height: 20px;
  letter-spacing: -0.09px;
}

.article-main .demo-note {
  margin: 0;
  padding-top: 0.65rem;
  text-align: center;
  color: rgba(0, 0, 0, 0.4);
  font-size: 14px;
  line-height: 20px;
  letter-spacing: -0.09px;
}

.article-main sup {
  font-size: 0.7em;
  line-height: 1;
}

.article-main .callout {
  margin: 0;
  margin-top: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: #f2f2ef;
  padding: 0.8rem 0.9rem;
  color: rgba(0, 0, 0, 0.4);
  font-size: 14px;
  line-height: 20px;
  letter-spacing: -0.09px;
  font-weight: 460;
}

.article-main .article-figure {
  margin: 0;
  padding-top: 1rem;
}

.article-main .article-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: #f2f2ef;
}

.article-main .article-figure figcaption {
  margin: 0;
  padding-top: 0.65rem;
  text-align: center;
  color: rgba(0, 0, 0, 0.4);
  font-size: 14px;
  line-height: 20px;
  letter-spacing: -0.09px;
  font-weight: 460;
}

@media (max-width: 900px) {
  .article-page .site-main {
    max-width: 46rem;
    padding-top: 2rem;
    padding-bottom: 5rem;
  }

  .article-main {
    max-width: 100%;
  }

  .article-shell {
    max-width: 100%;
  }

  .article-main h2 {
    margin-top: 2rem;
  }
}

@media (max-width: 640px) {
  .article-page .site-main {
    max-width: 100%;
    padding-top: 1.35rem;
    padding-bottom: 4.2rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .article-shell,
  .article-main {
    max-width: 100%;
  }
}
