@font-face {
  font-family: "Shalr Sans SC";
  src: url("fonts/medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
.browse {
  --bar-height: 4.25rem;
  --border: #dfe5df;
  --caption: .875rem;
  background: var(--paper);
  font-size: 1rem;
  overflow-y: scroll;
}
.masthead {
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 1px solid var(--border);
  background: var(--paper);
}
.masthead-inner { width: var(--content-width); margin-inline: auto; }
.masthead-inner {
  min-height: var(--bar-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.wordmark { width: 8.25rem; height: auto; }
.masthead nav { display: flex; align-self: stretch; gap: 2rem; }
.masthead nav a {
  display: grid;
  align-items: center;
  position: relative;
  min-width: 2.75rem;
  text-align: center;
  color: var(--muted);
}
.masthead nav a:is(:hover, [aria-current]) { color: var(--ink); }
.masthead nav a[aria-current] { font-weight: 700; }
.masthead nav a[aria-current]::after {
  content: "";
  position: absolute;
  inset: auto .3rem 0;
  height: 3px;
  background: var(--green);
}
.browse-layout {
  --outer-margin: calc((100% - var(--content-width)) / 2);
  margin-inline-end: var(--outer-margin);
  display: grid;
  grid-template-columns: clamp(11rem, 18vw, 19rem) minmax(0, 1fr) clamp(10rem, 15vw, 16.5rem);
  grid-template-areas: "rail stream directory";
  column-gap: clamp(1rem, 2vw, 2.5rem);
  align-items: start;
}
.fold-row {
  --fold-duration: 420ms;
  display: grid;
  grid-template-rows: 1fr;
  align-content: center;
  overflow: clip;
  transition: grid-template-rows var(--fold-duration) ease-in-out, visibility 0s;
}
.fold-row[inert] {
  grid-template-rows: 0fr;
  visibility: hidden;
  transition-delay: 0s, var(--fold-duration);
}
/* Keep the contents at their natural height as the row clips both edges. */
.fold-row > div {
  display: grid;
  grid-auto-rows: max-content;
  align-content: center;
  min-height: 0;
  min-width: 0;
}
/* React Bits Line Sidebar — local palette and responsive dimensions. */
.line-sidebar {
  --marker: clamp(1.25rem, 3.5vw, 3.75rem);
  --shift: clamp(.5rem, 1.6vw, 1.875rem);
  --item-gap: 1.25rem;
  grid-area: rail;
  position: sticky;
  top: calc(var(--bar-height) + 1px);
  margin-block-start: 2.6rem;
  max-height: calc(100dvh - var(--bar-height) - 1px);
  overflow-y: auto;
}
.line-sidebar ol {
  list-style: none;
  margin: calc(var(--item-gap) / -2) 0;
  padding: .4rem 0;
}
.line-sidebar a {
  position: relative;
  display: block;
  min-width: 0;
  padding-block: calc(.2rem + var(--item-gap) / 2);
  padding-inline: var(--marker) var(--shift);
  outline-offset: -2px;
}
.line-sidebar a::before, .line-sidebar li:has(~ li:not([inert])) a::after {
  content: "";
  position: absolute;
  left: 0;
  height: 2px;
  background-color: #819086;
  transform-origin: left center;
}
.line-sidebar a::before {
  top: 50%;
  width: var(--marker);
  background-color: color-mix(in srgb, var(--green) calc(var(--effect, 0) * 100%), #819086);
  transform: scaleX(calc(.7 + var(--effect, 0) * .5));
}
.line-sidebar li:has(~ li:not([inert])) a::after {
  bottom: 0;
  width: calc(var(--marker) / 2);
  opacity: .5;
  transform: scaleX(calc(.7 + var(--effect, 0) * .6));
}
.line-label {
  display: inline-flex;
  max-width: 100%;
  align-items: baseline;
  gap: .5em;
  font-size: .9375rem;
  font-weight: 500;
  color: color-mix(in srgb, var(--green) calc(var(--effect, 0) * 100%), var(--muted));
  transform: translateX(calc(var(--effect, 0) * var(--shift)));
  line-height: 1.4;
}
.line-index { flex: none; font-size: .8em; font-variant-numeric: tabular-nums; opacity: calc(.65 + var(--effect, 0) * .35); }
.line-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) {
  .fold-row { transition: none; }
  .line-sidebar { --shift: 0px; }
  .line-sidebar a::before, .line-sidebar li:has(~ li:not([inert])) a::after { transform: none; }
}
.directory { grid-area: directory; position: sticky; top: calc(var(--bar-height) + 1px); padding-top: 2.6rem; }
.directory h1 { margin: 0; color: var(--ink); font-size: var(--heading); line-height: 1.2; }
.intro { margin-top: .7rem; color: var(--muted); max-width: 15em; line-height: 1.75; }
.categories { display: grid; gap: .35rem; margin-top: 2.1rem; max-width: 13.5rem; }
.categories button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5em;
  min-height: 2.75rem;
  padding: .4rem 1rem;
  border: 0;
  border-radius: 2rem;
  background: transparent;
  color: var(--ink);
  white-space: nowrap;
}
.categories button[aria-pressed="true"] { color: white; background: var(--ink); font-weight: 700; }
.categories button span { font-size: var(--caption); font-variant-numeric: tabular-nums; }
.stream {
  grid-area: stream;
  min-width: 0;
  overflow-anchor: none;
  scroll-margin-top: calc(var(--bar-height) + 1px);
  border-inline: 1px solid var(--border);
  background: #fff;
}
.stream article {
  scroll-margin-top: calc(var(--bar-height) + 1px);
  --inset: clamp(1rem, 2vw, 1.65rem);
  --avatar: 2.5rem;
  --gap: .85rem;
  position: relative;
  padding: 1.55rem var(--inset) 1.55rem calc(var(--inset) + var(--avatar) + var(--gap));
  border-bottom: 1px solid var(--border);
}
.byline .post-avatar {
  position: absolute;
  top: 1.55rem;
  left: var(--inset);
  width: var(--avatar);
  height: var(--avatar);
  border-radius: 50%;
  object-fit: cover;
}
.byline { display: flex; align-items: baseline; flex-wrap: wrap; gap: .6rem; color: var(--muted); font-size: var(--caption); }
.byline strong { color: var(--ink); font-size: 1rem; }
.byline .stamp { margin-left: auto; font-variant-numeric: tabular-nums; }
.stream h2 { margin: .35rem 0 .25rem; color: var(--ink); font-size: 1.4rem; line-height: 1.4; letter-spacing: -.025em; }
.record-link:hover { text-decoration: underline; text-underline-offset: .18em; }
.record-link::after { content: ""; position: absolute; inset: 0; }
.stream article > p:not([class]) { line-height: 1.7; }
.tags { margin-top: .35rem; color: var(--green); font-size: var(--caption); }
.media {
  width: 100%;
  height: auto;
  margin-top: .85rem;
  border-radius: .85rem;
  border: 1px solid var(--border);
}
@media (max-width: 56rem) {
  .browse-layout {
    margin-inline-end: 0;
    column-gap: 0;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) var(--outer-margin);
    grid-template-areas: "rail directory ." "stream stream stream";
  }
  .line-sidebar { position: static; margin-block: 1.5rem 1rem; max-height: none; }
  .browse { --bar-height: 3.5rem; }
  .wordmark { width: 7.1rem; }
  .directory { position: static; padding-block: 1.5rem 1rem; }
  .directory h1 { font-size: 2rem; }
  .intro { max-width: none; margin-top: .4rem; }
  .categories { display: flex; flex-wrap: wrap; gap: .15rem; max-width: none; margin-top: 1rem; }
  .categories button { min-height: 2.4rem; padding-inline: .7rem; font-size: var(--caption); }
  .categories button span { font-size: .75rem; }
  .stream {
    width: var(--content-width);
    margin-inline: auto;
    border-top: 1px solid var(--border);
  }
  .stream article { --avatar: 2rem; --gap: .6rem; }
  .stream h2 { font-size: 1.25rem; }
}
@media (max-width: 41rem) {
  .stream { border-inline: 0; }
}
