/* MOSS — a living changelog */

:root {
  --paper: #fbfbf8;
  --paper-2: #f3f3ee;
  --ink: #111a14;
  --ink-2: #2a352e;
  --muted: #56615a;
  --faint: #6b746d;
  --rule: rgba(17, 26, 20, 0.16);
  --rule-soft: rgba(17, 26, 20, 0.08);
  --moss-950: #15281d;
  --moss-900: #1e3a2b;
  --moss-700: #2e4d3b;
  --moss-500: #5b7564;
  --lime: #8cc63f;
  --lime-soft: #cfe6a8;

  /* tree palette (overridden per tree variant) */
  --wood: #2b4637;
  --leaf-fresh: #8cc63f;
  --leaf-young: #5d8c43;
  --leaf-old: #2e4d3b;

  --serif: 'Newsreader', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --wide: 'Archivo', 'Helvetica Neue', Arial, sans-serif;

  --gutter: 44px;
  --panel-w: 360px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 13.5px/1.65 var(--mono);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--moss-700);
  outline-offset: 2px;
}

.sprites {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 50;
  padding: 8px 14px;
  background: var(--moss-900);
  color: #fff;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

.label {
  margin: 0;
  font: 500 10px/1.7 var(--mono);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.muted {
  color: var(--muted);
}

.tick {
  display: block;
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: 0.55;
}

/* ---------- hero grid ---------- */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(330px, 27%) minmax(0, 1fr) var(--panel-w);
  grid-template-rows: auto minmax(0, 1fr);
  /* at least the screen, but taller when the intro needs it: nothing may spill into the next section */
  min-height: max(640px, calc(100svh - 200px));
  border-bottom: 1px solid var(--rule-soft);
}

.masthead {
  grid-column: 1 / 3;
  grid-row: 1;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 58px;
  padding: 26px 0 0 var(--gutter);
  pointer-events: none;
}

.masthead > * {
  pointer-events: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--moss-900);
}

.brand-mark {
  width: 30px;
  height: 31px;
}

.wordmark {
  font-family: var(--wide);
  font-weight: 600;
  font-stretch: 125%;
  font-size: 25px;
  letter-spacing: 0.3em;
  color: var(--ink);
  margin-right: -0.3em;
}

.nav {
  display: flex;
  gap: 38px;
}

.nav a {
  font-size: 14px;
  text-decoration: none;
  color: var(--ink-2);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}

.nav a:hover {
  border-bottom-color: var(--lime);
}

.nav .nav-x {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.nav-x svg,
.footer-link svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-2);
  text-decoration: none;
}

.footer-link:hover {
  color: var(--ink);
}

.about-copy a {
  text-decoration-color: var(--lime);
  text-underline-offset: 3px;
}

.intro {
  grid-column: 1;
  grid-row: 2;
  z-index: 3;
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 6vh, 58px) 0 clamp(20px, 4vh, 36px) var(--gutter);
  min-height: 0;
  pointer-events: none;
}

.intro > * {
  pointer-events: auto;
}

.kicker {
  color: var(--ink-2);
  font-size: 10.5px;
  letter-spacing: 0.26em;
}

.headline {
  margin: clamp(18px, 3.8vh, 36px) 0 clamp(16px, 3.2vh, 30px);
  font-family: var(--serif);
  font-weight: 560;
  font-size: clamp(52px, min(6.6vw, 11vh), 128px);
  line-height: 0.84;
  letter-spacing: -0.052em;
  color: var(--ink);
  font-variation-settings: 'opsz' 72;
}

.headline > span:not(.sr-only) {
  display: block;
  white-space: nowrap;
}

.headline-dot {
  display: inline-block;
  width: 0.14em;
  height: 0.14em;
  margin-left: 0.05em;
  border-radius: 50%;
  background: var(--lime);
  vertical-align: 0.02em;
}

.lede {
  max-width: 34ch;
  margin: 0;
  color: #3a453e;
  font-size: 13px;
  line-height: 1.78;
}

.footnote {
  margin-top: auto;
  padding-top: 28px;
  font-size: 9.5px;
  letter-spacing: 0.24em;
}

.footnote .tick {
  margin-bottom: 12px;
}

/* ---------- stage ---------- */

.stage {
  grid-column: 2;
  grid-row: 1 / 3;
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  /* the forest is a drawing: clicking or dragging on it shouldn't select or highlight anything */
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* No browser focus boxes inside the drawing; keyboard focus gets the tree's own
   indicators instead (dashed outline on trees, enlarged leaf + callout ring). */
.forest-svg:focus,
.forest-svg :focus {
  outline: none;
}

.forest-svg {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
  touch-action: manipulation;
}

.stage-label {
  position: absolute;
  z-index: 1;
  font-size: 8.5px;
  line-height: 1.8;
  letter-spacing: 0.2em;
  color: #5d665f;
  pointer-events: none;
}

.stage-label .tick {
  margin-top: 10px;
  width: 22px;
}

.stage-label.tl {
  top: 106px;
  left: 16%;
}

.stage-label.tr {
  top: 106px;
  right: 4%;
}

.stage-label.br {
  right: 4%;
  bottom: 42px;
}

.specimen {
  position: absolute;
  left: 3%;
  bottom: 22px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  font-size: 8.5px;
  letter-spacing: 0.2em;
  color: #5d665f;
  pointer-events: none;
  max-width: 44%;
}

.specimen span:first-child {
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stage-note {
  position: absolute;
  left: 50%;
  top: 34%;
  z-index: 3;
  width: min(330px, 80%);
  transform: translateX(-50%);
  text-align: center;
  pointer-events: none;
}

.stage-note .note-title {
  margin: 0 0 8px;
  font: italic 400 30px/1 var(--serif);
  color: var(--moss-900);
}

.stage-note .note-body {
  margin: 0;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}

.stage-note strong {
  color: var(--ink-2);
  font-weight: 500;
}

.tip {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 5;
  padding: 5px 9px;
  background: var(--moss-900);
  color: #f3f6f1;
  font: 500 10.5px/1.4 var(--mono);
  letter-spacing: 0.04em;
  white-space: nowrap;
  pointer-events: none;
  border-radius: 1px;
}

/* background drawing */
.contours path {
  fill: none;
  stroke: #1c2f24;
  stroke-opacity: 0.075;
  stroke-width: 1;
}

.grid path {
  fill: none;
  stroke: #1c2f24;
  stroke-opacity: 0.2;
  stroke-width: 0.8;
}

.grid .guide {
  stroke-opacity: 0.07;
  stroke-dasharray: 2 5;
}

/* ---------- trees ---------- */

.tree path {
  fill: none;
  stroke: var(--wood);
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tree path.twig {
  stroke-opacity: 0.9;
}

.tree path.bare {
  stroke-opacity: 0.8;
}

.tree path.sprig {
  stroke-opacity: 0.6;
}

.tree .dot {
  fill: var(--leaf-old);
}

.tree .fresh .dot,
.tree .dot.fresh {
  fill: var(--leaf-fresh);
}

.tree .young .dot,
.tree .dot.young {
  fill: var(--leaf-young);
}

.tree .old .dot,
.tree .dot.old {
  fill: var(--leaf-old);
}

/* pre-releases: a pale leaf with a ring in its age colour */
.tree .pre .dot,
.tree .dot.pre {
  fill-opacity: 0.28;
  stroke-width: 0.85;
}

/* lime is light on white: give fresh leaves on the selected tree a darker rim */
.tree.featured .fresh .dot {
  stroke: #5b8a22;
  stroke-width: 0.8;
  vector-effect: non-scaling-stroke;
}

.tree .fresh.pre .dot,
.tree .dot.fresh.pre {
  stroke: var(--leaf-fresh);
}

.tree.featured .fresh.pre .dot {
  stroke: #5b8a22;
  stroke-width: 1.2;
}

.tree .young.pre .dot,
.tree .dot.young.pre {
  stroke: var(--leaf-young);
}

.tree .old.pre .dot,
.tree .dot.old.pre {
  stroke: var(--leaf-old);
}

.shadow {
  fill: url(#shade);
}

.sway {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: sway var(--sway-d, 9s) ease-in-out var(--sway-delay, 0s) infinite alternate both;
}

@keyframes sway {
  from {
    transform: rotate(-0.45deg);
  }
  to {
    transform: rotate(0.45deg);
  }
}

@keyframes grow {
  to {
    stroke-dashoffset: 0;
  }
}

.pop {
  transform-box: fill-box;
  transform-origin: center;
  animation: pop 0.6s cubic-bezier(0.3, 0.7, 0.4, 1) both;
}

@keyframes pop {
  from {
    transform: scale(0);
    opacity: 0;
  }
  60% {
    transform: scale(1.35);
    opacity: 1;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.fade {
  animation: fade 0.8s ease both;
}

@keyframes fade {
  from {
    opacity: 0;
  }
}

/* forest (background) trees */
.tree.forest {
  --wood: #b3bcb4;
  --leaf-fresh: #c2dc95;
  --leaf-young: #aebfa3;
  --leaf-old: #a2b1a6;
  cursor: pointer;
  transition: opacity 0.6s ease;
}

.tree.forest.far {
  opacity: 0.6;
}

.tree.forest.mid {
  opacity: 0.72;
}

.tree.forest.near {
  opacity: 0.85;
  --wood: #9daaa0;
  --leaf-fresh: #a9d06a;
  --leaf-young: #8fae80;
  --leaf-old: #7f9686;
}

.tree.forest:hover,
.tree.forest:focus-visible {
  --wood: #5b7564;
  --leaf-fresh: #93c94b;
  --leaf-young: #6f9a58;
  --leaf-old: #4c6a57;
  opacity: 1;
}

.tree.forest:focus-visible {
  outline: none;
}

.tree.forest .hit {
  fill: transparent;
  stroke: none;
  vector-effect: non-scaling-stroke;
}

.tree.forest:focus-visible .hit {
  stroke: var(--moss-700);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}

.tree.forest * {
  pointer-events: none;
}

.tree.forest .hit {
  pointer-events: all;
}

.tree.forest.is-featured {
  opacity: 0;
  pointer-events: none;
}

.tree.forest.is-featured .hit {
  pointer-events: none;
}

.tree.forest.pending {
  opacity: 0.45;
  cursor: default;
}

.tree.forest.pending.is-featured {
  opacity: 0;
}

.tree.featured.unavailable .seed-dot {
  fill: var(--faint);
  animation: none;
}

/* featured tree */
.tree.featured .leaf {
  cursor: pointer;
}

.tree.featured .leaf:focus {
  outline: none;
}

.leaf .hit {
  fill: transparent;
}

.leaf .dot {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.2s ease;
}

.leaf.is-hover .dot,
.leaf:focus-visible .dot {
  transform: scale(1.6);
}

.leaf[aria-selected='true'] .dot {
  transform: scale(1.35);
}

.rings ellipse,
.rings-demo ellipse {
  fill: none;
  stroke: #1c2f24;
  stroke-opacity: 0.16;
  stroke-width: 0.6;
}

.rings-demo ellipse {
  stroke-width: 1;
  stroke-opacity: 0.35;
}

.seed .seed-stem {
  stroke: var(--moss-500);
  stroke-width: 1.4;
}

.seed .seed-dot {
  fill: var(--lime);
  transform-box: fill-box;
  transform-origin: center;
  animation: breathe 1.6s ease-in-out infinite alternate;
}

.seed .ring {
  fill: none;
  stroke: #1c2f24;
  stroke-opacity: 0.2;
  stroke-width: 0.8;
}

@keyframes breathe {
  from {
    transform: scale(0.7);
    opacity: 0.6;
  }
  to {
    transform: scale(1.15);
    opacity: 1;
  }
}

/* callout on the selected leaf */
.callout {
  animation: fade 0.5s ease both;
}

.callout .ring {
  fill: none;
  stroke: var(--moss-900);
  stroke-width: 1.3;
}

.callout .leader {
  fill: none;
  stroke: var(--moss-900);
  stroke-width: 1;
}

.callout .box {
  fill: var(--moss-900);
}

.callout text {
  fill: #eef3ec;
  font-family: var(--mono);
}

.callout .box-label {
  font-size: 8.8px;
  font-weight: 500;
  letter-spacing: 0.2em;
  fill: #c9d6cb;
}

.callout .box-tag {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

/* ---------- panel ---------- */

.panel {
  contain: size;
  grid-column: 3;
  grid-row: 1 / 3;
  z-index: 3;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 24px 34px 26px;
  border-left: 1px solid var(--rule);
  background: var(--paper);
  overflow-y: auto;
  scrollbar-width: thin;
}

.tagline {
  align-self: flex-end;
  font-size: 9px;
  letter-spacing: 0.26em;
  text-align: left;
}

.tagline .dash {
  display: inline-block;
  width: 24px;
  height: 1px;
  margin-left: 8px;
  vertical-align: middle;
  background: currentColor;
  opacity: 0.6;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 34px;
}

.pager {
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--ink-2);
}

.pager-buttons {
  display: flex;
  gap: 6px;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.icon-btn:hover {
  background: var(--paper-2);
}

.icon-btn svg {
  width: 17px;
  height: 17px;
}

.panel-title:focus {
  outline: none;
}

.panel-title:focus-visible {
  outline: 2px solid var(--moss-700);
  outline-offset: 4px;
}

.panel-title {
  margin: 6px 0 0;
  font: 500 25px/1.15 var(--serif);
  letter-spacing: -0.015em;
}

.accent-rule {
  display: block;
  width: 36px;
  height: 2px;
  margin-top: 14px;
  background: var(--lime);
}

.mini-tree {
  display: block;
  width: 100%;
  height: 132px;
  margin: 14px 0 6px;
  flex-shrink: 0;
}

.mini-tree .dot {
  stroke: none;
}

.panel-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.field .label {
  margin-bottom: 4px;
}

.field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.value {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.value.repo .owner {
  color: var(--ink-2);
}

.value.repo .name {
  font-weight: 500;
}

.value.tag {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-text {
  overflow-wrap: anywhere;
}

.sub {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 0;
}

.badge {
  display: inline-block;
  padding: 1px 7px;
  border: 1px solid var(--rule);
  border-radius: 20px;
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  vertical-align: 1px;
}

.tone-dot {
  display: inline-block;
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--leaf-old);
}

.tone-dot.fresh {
  background: var(--leaf-fresh);
}

.tone-dot.young {
  background: var(--leaf-young);
}

.tone-dot.pre {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--leaf-young);
}

.tone-dot.fresh.pre {
  box-shadow: inset 0 0 0 1.5px var(--leaf-fresh);
}

.tone-dot.old.pre {
  box-shadow: inset 0 0 0 1.5px var(--leaf-old);
}

.stepper {
  display: flex;
  gap: 2px;
}

.stepper button {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.stepper button:hover {
  border-color: var(--moss-700);
}

.stepper button[aria-disabled='true'] {
  opacity: 0.35;
  cursor: default;
}

.icon {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notes {
  max-height: 200px;
  overflow-y: auto;
  padding-right: 6px;
  font-size: 12px;
  line-height: 1.65;
  color: #3a453e;
  scrollbar-width: thin;
  overflow-wrap: anywhere;
}

.notes p,
.notes ul,
.notes ol,
.notes blockquote,
.notes pre {
  margin: 0 0 7px;
}

.notes ul,
.notes ol {
  padding-left: 16px;
}

.notes li + li {
  margin-top: 2px;
}

.notes .md-h {
  margin-top: 4px;
  font-weight: 500;
  color: var(--ink);
}

.notes code {
  padding: 0 3px;
  background: var(--paper-2);
  border-radius: 2px;
  font-size: 11.5px;
}

.notes pre {
  padding: 8px;
  background: var(--paper-2);
  overflow-x: auto;
  white-space: pre;
}

.notes pre code {
  padding: 0;
  background: none;
}

.notes blockquote {
  padding-left: 10px;
  border-left: 2px solid var(--lime-soft);
}

.notes a {
  color: var(--moss-700);
  text-decoration-color: var(--lime);
  text-underline-offset: 2px;
}

.notes .more a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  font-size: 12.5px;
  text-decoration: none;
  color: var(--ink-2);
}

.link span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link:hover span {
  text-decoration: underline;
  text-decoration-color: var(--lime);
  text-underline-offset: 3px;
}

.empty-copy {
  margin: 6px 0 8px;
  font-size: 12px;
  line-height: 1.65;
  color: var(--muted);
}

.panel-rule {
  width: 100%;
  margin: 2px 0;
  border: 0;
  border-top: 1px solid var(--rule);
}

.about {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: #3a453e;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 42px;
  padding: 10px 16px;
  background: var(--moss-900);
  color: #f3f6f1;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  border-radius: 2px;
  transition: background 0.2s ease;
}

.btn:hover {
  background: var(--moss-950);
}

.data-note {
  margin: -6px 0 0;
  font-size: 9.5px;
  letter-spacing: 0.08em;
  color: var(--faint);
}

.observing {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.skeleton {
  width: 60%;
  height: 16px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--paper-2), #e7e9e2, var(--paper-2));
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

/* ---------- explore bar ---------- */

.explore {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 40px;
  align-items: start;
  padding: 24px var(--gutter) 22px;
  border-bottom: 1px solid var(--rule-soft);
}

.serif-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font: 500 19px/1.2 var(--serif);
  letter-spacing: -0.01em;
}

.accent-line {
  display: inline-block;
  width: 30px;
  height: 1.5px;
  background: var(--lime);
}

.hint {
  margin: 6px 0 14px;
  font-size: 11.5px;
  color: var(--muted);
}

.repo-input {
  display: flex;
  align-items: center;
  height: 52px;
  max-width: 560px;
  border: 1px solid rgba(17, 26, 20, 0.55);
  border-radius: 3px;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.repo-input:focus-within {
  border-color: var(--moss-900);
  box-shadow: 0 0 0 3px rgba(140, 198, 63, 0.25);
}

.gh-icon {
  width: 21px;
  height: 21px;
  margin: 0 12px 0 14px;
  flex-shrink: 0;
  color: var(--ink);
}

.repo-input input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0 4px 0 12px;
  border: 0;
  border-left: 1px solid var(--rule);
  background: transparent;
  font: 400 13px var(--mono);
  color: var(--ink);
  outline: none;
}

.repo-input input::placeholder {
  color: var(--faint);
}

.repo-input .submit {
  display: grid;
  place-items: center;
  width: 52px;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.repo-input .submit svg {
  width: 18px;
  height: 18px;
}

.repo-input .submit:hover {
  color: var(--moss-700);
}

.repo-input[aria-busy='true'] .submit svg {
  animation: nudge 0.9s ease-in-out infinite alternate;
}

@keyframes nudge {
  to {
    transform: translateX(4px);
  }
}

.status {
  min-height: 1.6em;
  max-width: 560px;
  margin: 10px 0 0;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--muted);
}

.status[data-kind='error'] {
  color: #8a2f1f;
}

.status[data-kind='warn'] {
  color: #7a5a12;
}

.status[data-kind='ok'] {
  color: var(--moss-700);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-self: center;
  margin-top: 8px;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 0 10px 28px;
  border-left: 1px solid var(--rule);
}

.stat:last-child {
  border-right: 1px solid var(--rule);
}

.stat-num {
  font: 500 30px/1 var(--serif);
  letter-spacing: -0.01em;
  color: var(--ink);
}

.stat .label {
  font-size: 9.5px;
}

.recent-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.recent-head .serif-heading {
  font-size: 16px;
}

.view-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  color: var(--ink-2);
  text-decoration: none;
  white-space: nowrap;
}

.view-all svg {
  width: 12px;
  height: 12px;
}

.recent-list {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.recent-row {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) minmax(0, 0.7fr) 92px;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 3px 0;
  border: 0;
  background: transparent;
  font-size: 11.5px;
  text-align: left;
  cursor: pointer;
}

.recent-row:hover .recent-repo {
  text-decoration: underline;
  text-decoration-color: var(--lime);
  text-underline-offset: 3px;
}

.recent-repo,
.recent-tag {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-tag,
.recent-row time {
  color: var(--muted);
}

.recent-row time {
  text-align: right;
}

/* ---------- sections ---------- */

.section {
  padding: 84px var(--gutter) 72px;
  border-bottom: 1px solid var(--rule-soft);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px 32px;
  margin-bottom: 40px;
}

.section-head .label {
  grid-column: 1 / -1;
}

.section-title {
  margin: 0;
  font: 500 clamp(36px, 4.6vw, 60px) / 1 var(--serif);
  letter-spacing: -0.035em;
}

.section-title em {
  font-style: italic;
  font-weight: 400;
  color: var(--moss-700);
}

.section-caption {
  grid-column: 1;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}

.scope {
  grid-column: 2;
  grid-row: 2 / 4;
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--rule);
  border-radius: 24px;
}

.scope button {
  padding: 6px 16px;
  border: 0;
  border-radius: 20px;
  background: transparent;
  font-size: 12px;
  cursor: pointer;
}

.scope button[aria-pressed='true'] {
  background: var(--moss-900);
  color: #f3f6f1;
}

.log-year + .log-year {
  margin-top: 34px;
}

.log-year h3 {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin: 0 0 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}

.log-year-num {
  font: 500 26px/1 var(--serif);
}

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

.log-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 220px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 7px 0;
  border-bottom: 1px solid var(--rule-soft);
  font-size: 12.5px;
}

.log-body.is-forest .log-row {
  grid-template-columns: 112px minmax(0, 250px) minmax(0, 200px) minmax(0, 1fr) auto;
}

.log-row.is-selected {
  background: linear-gradient(90deg, rgba(140, 198, 63, 0.14), transparent 70%);
}

.log-row time,
.log-repo {
  color: var(--muted);
}

.log-repo,
.log-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.log-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.log-tag:hover {
  text-decoration: underline;
  text-decoration-color: var(--lime);
  text-underline-offset: 3px;
}

.log-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  text-decoration: none;
  font-size: 11.5px;
}

.log-link:hover {
  color: var(--ink);
}

.log-empty {
  margin: 0;
  color: var(--muted);
}

.more-btn {
  display: block;
  margin: 28px auto 0;
  padding: 10px 22px;
  border: 1px solid var(--rule);
  border-radius: 24px;
  background: transparent;
  font-size: 12px;
  cursor: pointer;
}

.more-btn:hover {
  border-color: var(--moss-700);
}

.legend {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 44px 48px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.legend li {
  padding-top: 18px;
  border-top: 1px solid var(--rule);
}

.glyph {
  display: block;
  width: 116px;
  height: 80px;
  overflow: visible;
}

.legend h3 {
  margin: 14px 0 6px;
  font: 500 20px/1.2 var(--serif);
}

.legend p {
  max-width: 38ch;
  margin: 0;
  color: #3a453e;
  font-size: 12.5px;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px;
}

.about-copy p {
  max-width: 56ch;
  margin: 0 0 16px;
  font-size: 13.5px;
}

.about-repos {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: repo;
}

.about-repos li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 2px 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--rule-soft);
  font-size: 12.5px;
  counter-increment: repo;
}

.about-repos li::before {
  content: counter(repo, decimal-leading-zero);
  grid-row: 1 / 3;
  color: var(--faint);
  font-size: 10px;
  padding-top: 2px;
}

.about-repos a {
  font-weight: 500;
  text-decoration: none;
}

.about-repos a:hover {
  text-decoration: underline;
  text-decoration-color: var(--lime);
}

.about-desc {
  grid-column: 2 / 4;
  grid-row: 2;
  color: var(--muted);
  font-size: 11.5px;
}

.about-count {
  grid-column: 3;
  grid-row: 1;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.footer {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 26px var(--gutter) 30px;
}

.footer .label {
  font-size: 9px;
  letter-spacing: 0.26em;
  white-space: nowrap;
}

.footer-rule {
  flex: 1;
  height: 1px;
  background: var(--rule);
}

/* ---------- responsive ---------- */

@media (max-width: 1280px) {
  :root {
    --gutter: 32px;
    --panel-w: 330px;
  }

  .hero {
    grid-template-columns: minmax(300px, 29%) minmax(0, 1fr) var(--panel-w);
  }

  .explore {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .recent {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1080px) {
  .hero {
    grid-template-columns: minmax(290px, 36%) minmax(0, 1fr);
    grid-template-rows: auto minmax(560px, auto) auto;
    min-height: 0;
  }

  .masthead {
    grid-column: 1 / 3;
  }

  .intro {
    grid-row: 2;
  }

  .stage {
    grid-column: 2;
    grid-row: 1 / 3;
    min-height: 640px;
  }

  .panel {
    grid-column: 1 / 3;
    grid-row: 3;
    display: grid;
    grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
    grid-template-rows: auto auto auto auto 1fr;
    column-gap: 40px;
    border-left: 0;
    border-top: 1px solid var(--rule);
    overflow: visible;
    padding: 28px var(--gutter);
    contain: none;
  }

  .panel > * {
    grid-column: 1;
  }

  .tagline {
    align-self: start;
    justify-self: start;
  }

  .panel-head {
    margin-top: 18px;
  }

  .mini-tree {
    height: 180px;
  }

  .panel-body {
    grid-column: 2;
    grid-row: 1 / 6;
  }

  .notes {
    max-height: none;
  }

  .legend {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  :root {
    --gutter: 16px;
  }

  body {
    font-size: 13px;
  }

  .hero {
    display: flex;
    flex-direction: column;
  }

  .masthead {
    gap: 20px;
    justify-content: space-between;
    padding: 16px var(--gutter) 0;
    flex-wrap: wrap;
  }

  .wordmark {
    font-size: 20px;
  }

  .nav {
    gap: 16px;
  }

  .nav a {
    font-size: 12.5px;
  }

  .intro {
    padding: 34px var(--gutter) 8px;
  }

  .headline {
    margin: 22px 0 20px;
    font-size: clamp(56px, 18vw, 92px);
  }

  .lede {
    max-width: none;
  }

  .footnote {
    display: none;
  }

  .stage {
    height: min(128vw, 580px);
    min-height: 420px;
  }

  .stage-label.tl,
  .stage-label.tr {
    top: 14px;
  }

  .stage-label.tl {
    left: var(--gutter);
  }

  .stage-label.br {
    display: none;
  }

  .specimen {
    left: var(--gutter);
    bottom: 12px;
    max-width: 80%;
  }

  .panel {
    display: flex;
    padding: 24px var(--gutter);
  }

  .tagline {
    display: none;
  }

  .panel-head {
    margin-top: 0;
  }

  .mini-tree {
    display: none;
  }

  .explore {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .stat {
    padding-left: 14px;
  }

  .stat-num {
    font-size: 24px;
  }

  .stat .label {
    font-size: 8.5px;
    letter-spacing: 0.16em;
  }

  .recent-row {
    grid-template-columns: 8px minmax(0, 1fr) auto;
  }

  .recent-tag {
    display: none;
  }

  .section {
    padding: 56px var(--gutter) 48px;
  }

  .section-head {
    grid-template-columns: minmax(0, 1fr);
  }

  .scope {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
    margin-top: 12px;
  }

  .log-row,
  .log-body.is-forest .log-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px 12px;
  }

  .log-row time {
    grid-column: 1 / -1;
    font-size: 11px;
  }

  .log-repo {
    grid-column: 1 / -1;
  }

  .log-name {
    display: none;
  }

  .legend,
  .about-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .footer-rule {
    display: none;
  }

  .footer .label {
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .tree path {
    animation: none !important;
    stroke-dasharray: none !important;
    stroke-dashoffset: 0 !important;
  }

  .pop,
  .fade,
  .callout,
  .sway,
  .seed .seed-dot,
  .skeleton {
    animation: none !important;
  }
}

@media (max-width: 400px) {
  .stage-label.tr {
    display: none;
  }

  .nav {
    gap: 12px;
  }

  .nav a {
    font-size: 12px;
    white-space: nowrap;
  }
}

/* short desktop screens (1366×768, laptops at 125–150% scaling) */
@media (min-width: 1081px) and (max-height: 780px) {
  .footnote {
    display: none;
  }

  .lede {
    font-size: 12.5px;
    line-height: 1.7;
  }

  .stage-label.tl,
  .stage-label.tr {
    top: 84px;
  }
}

/* on narrow screens the X link in the masthead is just the logo */
@media (max-width: 760px) {
  .nav-x span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .nav .nav-x {
    padding: 4px;
    margin: -4px;
  }
}
