:root {
  --primary: #11120f;
  --secondary: #4d514c;
  --muted: #8c928b;
  --accent: #83ccef;
  --accent-strong: #3b9fd1;
  --background: #f8f9fa;
  --glass: rgba(226, 228, 226, 0.64);
  --glass-hover: rgba(207, 213, 209, 0.9);
  --link-rule: rgba(59, 159, 209, 0.34);
  --shadow: rgba(25, 30, 28, 0.08);
  font-family: Georgia, "Times New Roman", Times, serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--primary);
  background-color: var(--background);
  overflow-x: hidden;
  overflow-y: scroll;
  position: relative;
  transition:
    color 220ms ease,
    background-color 220ms ease;
}

body.nav-lock {
  overflow: hidden;
}

body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100lvh;
  z-index: 0;
  pointer-events: none;
  background-color: var(--background);
  background-image: url("/assets/background-light.gif");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  image-rendering: pixelated;
  opacity: 1;
  transition:
    background-color 300ms ease,
    background-image 300ms ease;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100lvh;
  z-index: 2;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.5);
  transition: background 300ms ease;
}

a {
  color: inherit;
  text-decoration: none;
  overflow-wrap: break-word;
}

a:focus-visible,
button:focus-visible {
  outline: 1px solid var(--accent-strong);
  outline-offset: 4px;
}

#app {
  position: relative;
  z-index: 3;
}

.mobile-nav-toggle,
.mobile-nav-overlay {
  display: none;
}

.shell {
  display: grid;
  grid-template-columns: minmax(220px, 28vw) minmax(0, 1fr);
  min-height: 100vh;
  width: min(100%, 1280px);
  margin: 0 auto;
  padding: 0 48px;
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  padding: 54px 32px 54px 0;
}

.mark {
  display: grid;
  place-items: center;
  width: 168px;
  aspect-ratio: 1;
  margin-bottom: 28px;
  border: 1px solid rgba(20, 24, 21, 0.1);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.38);
  box-shadow: 0 14px 38px var(--shadow);
  overflow: hidden;
  transition:
    border-color 220ms ease,
    box-shadow 220ms ease,
    transform 180ms ease;
}

.mark:hover {
  border-color: var(--link-rule);
  box-shadow: 0 16px 42px var(--shadow);
  transform: translateY(-1px);
}

.mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

nav {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

nav a {
  width: fit-content;
  color: var(--primary);
  font-size: 1.72rem;
  font-weight: 420;
  line-height: 1.08;
  transition:
    color 160ms ease,
    font-style 160ms ease,
    font-weight 160ms ease;
}

nav a:hover {
  color: var(--accent-strong);
  font-style: italic;
  font-weight: 350;
}

.side-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.social-links {
  display: flex;
  align-items: center;
  width: fit-content;
  gap: 14px;
  margin-top: 12px;
}

.social-link {
  position: relative;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: var(--accent-strong);
  opacity: 0.9;
  transition:
    color 160ms ease,
    opacity 160ms ease,
    transform 160ms ease;
}

.social-link::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  z-index: 10;
  padding: 2px 8px;
  border: 1px solid var(--accent-strong);
  border-radius: 12px;
  color: var(--accent-strong);
  background: rgba(131, 204, 239, 0.3);
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition:
    opacity 140ms ease,
    visibility 140ms ease,
    transform 140ms ease;
}

.social-link svg {
  display: block;
  width: 20px;
  height: 20px;
}

.social-link:hover {
  color: var(--primary);
  opacity: 1;
  transform: translateY(-1px);
}

@media (min-width: 861px) and (hover: hover) and (pointer: fine) {
  .desktop-nav .nav-visitor-counter {
    transition: opacity 140ms ease 180ms;
  }

  .desktop-nav:has(.social-links:hover) .nav-visitor-counter,
  .desktop-nav:has(.social-links:focus-within) .nav-visitor-counter {
    opacity: 0;
    transition-delay: 0ms;
  }

  .desktop-nav .social-link:hover::before,
  .desktop-nav .social-link:focus-visible::before {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
  }
}

main {
  max-width: 680px;
  min-width: 0;
  padding: 18vh 0 12vh;
}

.about {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

p,
li {
  color: var(--primary);
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1.72;
  overflow-wrap: break-word;
}

p {
  margin: 0 0 1.35rem;
}

.text-link,
.entry-link {
  color: var(--accent-strong);
  cursor: pointer;
  border-bottom: 1px dotted var(--accent-strong);
  transition:
    color 160ms ease,
    border-color 160ms ease,
    font-style 160ms ease;
}

.text-link:hover,
.entry-link:hover {
  color: var(--accent-strong);
  border-color: var(--accent-strong);
  font-style: italic;
}

.interest-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.pill-link,
.icon-link {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(10px);
  color: var(--primary);
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 0.82rem;
  font-weight: 420;
  line-height: 1;
  padding: 7px 10px;
  transition:
    background 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.pill-link:hover,
.icon-link:hover {
  background: var(--glass-hover);
  color: var(--accent-strong);
  transform: translateY(-1px);
}

.section {
  padding: 66px 0 0;
  scroll-margin-top: 32px;
}

.about + .section {
  padding-top: 48px;
}

h2,
h3 {
  margin: 0;
  font-weight: 380;
}

h2 {
  margin-bottom: 26px;
  color: var(--primary);
  font-size: 1.7rem;
  font-style: italic;
  line-height: 1.1;
}

.entries {
  display: grid;
  gap: 31px;
}

.entry h3 {
  color: var(--primary);
  font-size: 1.05rem;
  line-height: 1.35;
}

.meta {
  margin: 0.18rem 0 0.65rem;
  color: var(--secondary);
  font-size: 0.92rem;
  line-height: 1.45;
}

ul {
  display: grid;
  gap: 0.28rem;
  margin: 0;
  padding-left: 1.1rem;
}

li {
  color: var(--secondary);
  font-size: 0.98rem;
  line-height: 1.58;
}

li .text-link {
  color: var(--accent-strong);
}

li::marker {
  color: var(--muted);
}

.visitor-counter {
  font-variant-numeric: tabular-nums;
}

.visitor-counter[data-state="unavailable"] {
  opacity: 0.62;
}

.nav-visitor-counter {
  width: fit-content;
  max-width: 190px;
  margin: 17px 0 0;
  color: var(--accent-strong);
  font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.82rem;
  letter-spacing: -0.015em;
  line-height: 1.4;
}

.section-heading-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 26px;
}

.section-heading-row h2 {
  margin-bottom: 0;
}

.section-heading-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 14px;
  font-size: 0.92rem;
}

.archive-grid {
  display: grid;
  gap: 18px;
}

.archive-item {
  display: grid;
  grid-template-columns: minmax(172px, 34%) minmax(0, 1fr);
  min-height: 210px;
  overflow: hidden;
  border: 1px solid rgba(20, 24, 21, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.42);
  box-shadow: 0 14px 38px var(--shadow);
  backdrop-filter: blur(14px);
}

.archive-image {
  min-height: 210px;
  background: rgba(255, 255, 255, 0.35);
}

.archive-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.archive-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: 20px;
}

.archive-copy h3 {
  margin-bottom: 0.55rem;
  font-size: 1.08rem;
}

.archive-copy p {
  margin-bottom: 0.8rem;
  font-size: 0.98rem;
  line-height: 1.58;
}

.archive-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.archive-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid var(--link-rule);
  border-radius: 999px;
  color: var(--secondary);
  font-size: 0.76rem;
  line-height: 1;
  padding: 6px 9px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

body.tree-page::after {
  background-color: var(--background);
  background-image: none;
}

body.tree-page::before {
  background: transparent;
}

#tree-journal {
  position: relative;
  z-index: 3;
  min-height: 100vh;
}

.tree-shell {
  width: min(100% - 40px, 1180px);
  margin: 0 auto;
  padding: 36px 0 54px;
}

.tree-header {
  max-width: 850px;
  padding: 28px 0 68px;
}

.tree-back {
  display: inline-flex;
  margin-bottom: 58px;
  border-bottom: 1px dotted var(--accent-strong);
  color: var(--accent-strong);
  font-size: 0.92rem;
  transition:
    color 160ms ease,
    font-style 160ms ease;
}

.tree-back:hover {
  font-style: italic;
}

.tree-eyebrow {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 16px;
  color: var(--secondary);
  font-size: 0.78rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.tree-visitor-counter {
  color: var(--accent-strong);
}

.tree-header h1 {
  max-width: 780px;
  margin: 0;
  color: var(--primary);
  font-size: clamp(3rem, 7.4vw, 6.8rem);
  font-style: italic;
  font-weight: 360;
  letter-spacing: -0.055em;
  line-height: 0.92;
}

.tree-intro {
  max-width: 720px;
  margin: 28px 0 0;
  color: var(--secondary);
  font-size: clamp(1.05rem, 1.7vw, 1.24rem);
  line-height: 1.68;
}

.tree-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 42px;
}

.tree-stats > div {
  display: grid;
  min-height: 94px;
  align-content: space-between;
  border: 1px solid rgba(20, 24, 21, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(14px);
  padding: 15px;
}

.tree-stats strong {
  color: var(--primary);
  font-size: 1.8rem;
  font-style: italic;
  font-weight: 380;
}

.tree-stats span {
  color: var(--secondary);
  font-size: 0.78rem;
  line-height: 1.25;
}

.tree-main {
  max-width: none;
  padding: 0;
}

.tree-section {
  padding: 72px 0 0;
}

.tree-section + .tree-section {
  margin-top: 54px;
  border-top: 1px solid rgba(20, 24, 21, 0.1);
}

.tree-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 28px;
}

.tree-section-heading h2 {
  margin: 0;
  font-size: clamp(1.9rem, 3.8vw, 3rem);
  letter-spacing: -0.025em;
}

.tree-section-heading > p {
  max-width: 390px;
  margin: 0 0 4px;
  color: var(--secondary);
  font-size: 0.9rem;
  line-height: 1.5;
  text-align: right;
}

.tree-kicker {
  margin: 0 0 8px;
  color: var(--accent-strong);
  font-size: 0.73rem;
  letter-spacing: 0.1em;
  line-height: 1;
  text-transform: uppercase;
}

.tree-featured-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.tree-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.tree-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(20, 24, 21, 0.11);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 14px 38px var(--shadow);
  backdrop-filter: blur(14px);
}

.tree-image {
  position: relative;
  min-height: 270px;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 28%, rgba(255, 236, 128, 0.54), transparent 34%),
    linear-gradient(140deg, rgba(102, 143, 94, 0.7), rgba(59, 159, 209, 0.4));
}

.tree-image-featured {
  min-height: 330px;
}

.tree-image img {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
  transition:
    filter 220ms ease,
    transform 320ms ease;
}

.tree-card:hover .tree-image img {
  filter: saturate(1.04) contrast(1.015);
  transform: scale(1.018);
}

.tree-reference-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 4;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  background: rgba(20, 24, 21, 0.7);
  color: white;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  line-height: 1;
  padding: 7px 9px;
  text-transform: uppercase;
}

.tree-image-fallback {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.82);
  font-size: 3.8rem;
  font-style: italic;
}

.tree-image-missing img {
  display: none;
}

.tree-card-copy {
  padding: 20px;
}

.tree-card-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 17px;
}

.tree-card-heading h3 {
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}

.tree-scientific {
  margin: 3px 0 0;
  color: var(--secondary);
  font-size: 0.86rem;
  line-height: 1.3;
}

.tree-family {
  flex: none;
  border: 1px solid var(--link-rule);
  border-radius: 999px;
  color: var(--secondary);
  font-size: 0.67rem;
  line-height: 1;
  padding: 6px 8px;
}

.tree-observation {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 18px;
  margin: 0 0 18px;
  padding: 14px 0;
  border-top: 1px solid rgba(20, 24, 21, 0.08);
  border-bottom: 1px solid rgba(20, 24, 21, 0.08);
}

.tree-observation div {
  min-width: 0;
}

.tree-observation dt {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 0.65rem;
  letter-spacing: 0.09em;
  line-height: 1;
  text-transform: uppercase;
}

.tree-observation dd {
  margin: 0;
  color: var(--secondary);
  font-size: 0.78rem;
  line-height: 1.35;
}

.tree-writeup {
  margin: 0;
  color: var(--primary);
  font-size: 0.95rem;
  line-height: 1.62;
}

.tree-card-footer {
  display: grid;
  gap: 15px;
  margin-top: 20px;
}

.tree-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tree-tags span {
  border-radius: 999px;
  background: var(--glass);
  color: var(--secondary);
  font-size: 0.68rem;
  line-height: 1;
  padding: 6px 8px;
}

.tree-credit {
  width: fit-content;
  color: var(--muted);
  font-size: 0.69rem;
  line-height: 1.4;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
}

.tree-credit:hover {
  color: var(--accent-strong);
}

.tree-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin-bottom: 12px;
}

.tree-search input,
.tree-sort select {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(20, 24, 21, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.56);
  color: var(--primary);
  font: inherit;
  font-size: 0.9rem;
  outline: none;
  padding: 10px 12px;
}

.tree-search input:focus,
.tree-sort select:focus {
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 3px rgba(59, 159, 209, 0.12);
}

.tree-sort {
  display: grid;
  grid-template-columns: auto minmax(130px, auto);
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.78rem;
}

.tree-family-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 26px;
}

.tree-index {
  border-top: 1px solid rgba(20, 24, 21, 0.14);
}

.tree-index-item {
  border-bottom: 1px solid rgba(20, 24, 21, 0.14);
}

.tree-index-item summary {
  display: grid;
  grid-template-columns:
    minmax(124px, 0.72fr)
    minmax(220px, 1.55fr)
    minmax(130px, 1fr)
    auto
    22px;
  align-items: center;
  gap: 18px;
  min-height: 84px;
  border-left: 2px solid transparent;
  list-style: none;
  outline: none;
  padding: 14px 12px 14px 10px;
  transition:
    background 160ms ease,
    border-color 160ms ease;
}

.tree-index-item summary::-webkit-details-marker {
  display: none;
}

.tree-index-item summary:hover,
.tree-index-item summary:focus-visible,
.tree-index-item[open] summary {
  border-left-color: var(--accent-strong);
  background: rgba(255, 255, 255, 0.44);
}

.tree-index-item summary time {
  color: var(--muted);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
}

.tree-index-name {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.tree-index-name strong {
  color: var(--primary);
  font-size: 1.02rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.tree-index-name em {
  overflow: hidden;
  color: var(--secondary);
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tree-index-place {
  overflow: hidden;
  color: var(--secondary);
  font-size: 0.8rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tree-index-family {
  border: 1px solid var(--link-rule);
  border-radius: 999px;
  color: var(--secondary);
  font-size: 0.67rem;
  line-height: 1;
  padding: 6px 8px;
}

.tree-index-arrow {
  color: var(--accent-strong);
  font-size: 1rem;
  transform: rotate(0);
  transition: transform 180ms ease;
}

.tree-index-item[open] .tree-index-arrow {
  transform: rotate(45deg);
}

.tree-index-detail {
  display: grid;
  grid-template-columns: minmax(250px, 0.82fr) minmax(0, 1.18fr);
  gap: 24px;
  padding: 4px 12px 28px;
}

.tree-image-index {
  min-height: 0;
  aspect-ratio: 4 / 3;
  border-radius: 7px;
}

.tree-index-copy {
  align-self: center;
  min-width: 0;
}

.tree-family-filters button,
.tree-empty button,
.tree-show-more {
  border: 0;
  border-radius: 999px;
  background: var(--glass);
  color: var(--secondary);
  cursor: pointer;
  font: inherit;
  font-size: 0.76rem;
  line-height: 1;
  padding: 8px 10px;
  transition:
    background 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.tree-family-filters button:hover,
.tree-family-filters button.active,
.tree-empty button:hover,
.tree-show-more:hover {
  background: var(--glass-hover);
  color: var(--accent-strong);
  transform: translateY(-1px);
}

.tree-family-filters button.active {
  box-shadow: inset 0 0 0 1px var(--link-rule);
}

.tree-empty {
  display: grid;
  min-height: 240px;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 1px dashed rgba(20, 24, 21, 0.14);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.32);
}

.tree-empty p {
  margin: 0;
  color: var(--secondary);
}

.tree-show-more {
  display: block;
  margin: 28px auto 0;
  padding: 11px 16px;
}

.tree-footer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin: 100px 0 0;
  padding-top: 28px;
  border-top: 1px solid rgba(20, 24, 21, 0.1);
}

.tree-footer p {
  max-width: 680px;
  margin: 0;
  color: var(--secondary);
  font-size: 0.84rem;
  line-height: 1.5;
}

.tree-footer a {
  flex: none;
  color: var(--accent-strong);
  font-style: italic;
}

.tree-shell-simple {
  width: min(100% - 40px, 1040px);
  padding-bottom: 84px;
}

.tree-header-simple {
  padding-bottom: 52px;
}

.tree-header-simple .tree-back {
  margin-bottom: 48px;
}

.tree-header-simple h1 {
  font-size: clamp(3.8rem, 9vw, 7rem);
}

.tree-simple-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 54px 24px;
}

.tree-simple-card {
  min-width: 0;
}

.tree-simple-image {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 4px;
  background:
    radial-gradient(circle at 30% 28%, rgba(255, 236, 128, 0.54), transparent 34%),
    linear-gradient(140deg, rgba(102, 143, 94, 0.7), rgba(59, 159, 209, 0.4));
}

.tree-simple-image img {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tree-simple-copy {
  padding-top: 13px;
}

.tree-simple-copy h2 {
  margin: 0;
  font-size: 1.22rem;
  font-weight: 400;
  line-height: 1.2;
}

.tree-simple-copy p {
  margin: 3px 0 0;
  color: var(--secondary);
  font-size: 0.82rem;
  line-height: 1.35;
}

.tree-simple-copy a {
  display: inline-block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.3;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
}

.tree-simple-copy a:hover {
  color: var(--accent-strong);
}

@media (max-width: 900px) {
  .tree-simple-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tree-featured-grid {
    grid-template-columns: 1fr;
  }

  .tree-card-featured {
    display: grid;
    grid-template-columns: minmax(240px, 0.85fr) minmax(0, 1.15fr);
  }

  .tree-card-featured .tree-image {
    min-height: 100%;
  }

  .tree-index-item summary {
    grid-template-columns: 110px minmax(180px, 1.4fr) minmax(110px, 0.8fr) 22px;
  }

  .tree-index-family {
    display: none;
  }
}

@media (max-width: 720px) {
  .tree-shell {
    width: min(100% - 28px, 1180px);
    padding-top: 20px;
  }

  .tree-header {
    padding-bottom: 44px;
  }

  .tree-back {
    margin-bottom: 44px;
  }

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

  .tree-section {
    padding-top: 50px;
  }

  .tree-section-heading {
    align-items: start;
    flex-direction: column;
    gap: 10px;
  }

  .tree-section-heading > p {
    text-align: left;
  }

  .tree-card-featured {
    display: block;
  }

  .tree-controls {
    grid-template-columns: 1fr;
  }

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

  .tree-footer {
    align-items: start;
    flex-direction: column;
  }

  .tree-index-item summary {
    grid-template-columns: 80px minmax(0, 1fr) 22px;
    grid-template-rows: auto auto;
    gap: 4px 12px;
    min-height: 78px;
  }

  .tree-index-item summary time {
    grid-row: 1 / 3;
  }

  .tree-index-name {
    grid-column: 2;
  }

  .tree-index-place {
    grid-column: 2;
    grid-row: 2;
  }

  .tree-index-arrow {
    grid-column: 3;
    grid-row: 1 / 3;
  }

  .tree-index-detail {
    grid-template-columns: 1fr;
    padding-right: 8px;
    padding-left: 8px;
  }

  .mobile-nav-body .nav-visitor-counter {
    margin-top: 20px;
  }
}

@media (max-width: 520px) {
  .tree-simple-grid {
    grid-template-columns: 1fr;
    gap: 42px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tree-card:hover .tree-image img {
    transform: none;
  }

  .tree-index-arrow {
    transition: none;
  }
}

body.workbench-page {
  min-height: 100vh;
}

body.workbench-page::before {
  background: rgba(255, 255, 255, 0.62);
}

#shader-workbench {
  position: relative;
  z-index: 3;
  min-height: 100vh;
}

.workbench-shell {
  display: flex;
  width: min(100%, 1600px);
  min-height: 100vh;
  flex-direction: column;
  margin: 0 auto;
  padding: 16px;
}

.workbench-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 66px;
  border: 1px solid rgba(20, 24, 21, 0.1);
  border-radius: 8px;
  background: rgba(248, 249, 250, 0.78);
  box-shadow: 0 10px 32px var(--shadow);
  backdrop-filter: blur(18px);
  padding: 10px 12px;
}

.workbench-back {
  width: fit-content;
  color: var(--accent-strong);
  font-size: 0.95rem;
  border-bottom: 1px dotted var(--accent-strong);
}

.workbench-title {
  min-width: 0;
  text-align: center;
}

.workbench-title h1 {
  margin: 0;
  color: var(--primary);
  font-size: 1.52rem;
  font-style: italic;
  font-weight: 380;
  line-height: 1.05;
}

.workbench-title p {
  margin: 0.28rem 0 0;
  color: var(--secondary);
  font-size: 0.88rem;
  line-height: 1.25;
}

.workbench-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.workbench-status {
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

.workbench-layout {
  display: grid;
  flex: 1;
  grid-template-columns: 270px minmax(0, 1fr) 336px;
  gap: 16px;
  width: 100%;
  max-width: none;
  padding: 16px 0 0;
}

.workbench-panel,
.controls-panel {
  align-self: start;
  max-height: calc(100vh - 104px);
  overflow: auto;
  border: 1px solid rgba(20, 24, 21, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.48);
  box-shadow: 0 14px 38px var(--shadow);
  backdrop-filter: blur(16px);
}

.workbench-panel {
  padding: 16px;
}

.workbench-panel-section + .workbench-panel-section {
  margin-top: 22px;
}

.workbench-panel h2,
.controls-panel h2 {
  margin: 0 0 12px;
  color: var(--primary);
  font-size: 1rem;
  font-style: italic;
  font-weight: 380;
  line-height: 1.1;
}

.upload-drop {
  display: grid;
  place-items: center;
  min-height: 94px;
  border: 1px dashed var(--link-rule);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.3);
  color: var(--primary);
  cursor: pointer;
  font-size: 0.95rem;
  transition:
    background 160ms ease,
    border-color 160ms ease;
}

.upload-drop:hover {
  background: var(--glass-hover);
}

.upload-drop input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.url-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 10px;
}

.url-row input,
.control-row input,
.control-row select {
  min-width: 0;
  border: 1px solid rgba(20, 24, 21, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--primary);
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 0.86rem;
  line-height: 1.2;
  padding: 8px 9px;
}

.small-button,
.filter-tab,
.preset-chip,
.tool-button {
  border: 0;
  font-family: Georgia, "Times New Roman", Times, serif;
  cursor: pointer;
  transition:
    background 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.small-button {
  border-radius: 8px;
  background: var(--glass);
  color: var(--primary);
  padding: 8px 12px;
}

.filter-tabs {
  display: grid;
  gap: 8px;
}

.filter-tab {
  width: 100%;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.34);
  color: var(--secondary);
  font-size: 0.94rem;
  line-height: 1.1;
  padding: 10px 11px;
  text-align: left;
}

.filter-tab:hover,
.filter-tab.active,
.small-button:hover,
.preset-chip:hover,
.tool-button:hover {
  background: var(--glass-hover);
  color: var(--accent-strong);
  transform: translateY(-1px);
}

.filter-tab.active {
  color: var(--primary);
}

.preset-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preset-chip {
  min-height: 30px;
  border-radius: 999px;
  background: var(--glass);
  color: var(--secondary);
  font-size: 0.82rem;
  line-height: 1;
  padding: 8px 10px;
}

.preview-column {
  display: grid;
  min-width: 0;
  grid-template-rows: minmax(420px, 1fr) auto;
  gap: 12px;
}

.shader-preview {
  display: grid;
  min-height: min(72vh, 760px);
  overflow: hidden;
  border: 1px solid rgba(20, 24, 21, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(45deg, rgba(255, 255, 255, 0.42), rgba(210, 224, 228, 0.28)),
    rgba(255, 255, 255, 0.34);
  box-shadow: 0 14px 38px var(--shadow);
}

.shader-host {
  width: 100%;
  min-width: 0;
  height: 100%;
  min-height: 420px;
}

.preview-toolbar {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.tool-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--glass);
  color: var(--secondary);
}

.tool-button svg {
  display: block;
  width: 20px;
  height: 20px;
}

.controls-panel {
  padding: 16px;
}

.controls-grid {
  display: grid;
  gap: 12px;
}

.control-row {
  display: grid;
  gap: 7px;
  color: var(--secondary);
  font-size: 0.82rem;
  line-height: 1.2;
}

.control-row > span:first-child {
  color: var(--secondary);
}

.control-row-slider {
  grid-template-columns: minmax(74px, 0.9fr) minmax(94px, 1.2fr) 72px;
  align-items: center;
}

.control-row-slider > span:first-child {
  min-width: 0;
}

.control-row input[type="range"] {
  width: 100%;
  accent-color: var(--accent-strong);
  padding: 0;
}

.control-row input[type="number"] {
  padding: 7px 8px;
}

.control-row-toggle {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.control-row-toggle input {
  width: 34px;
  height: 20px;
  accent-color: var(--accent-strong);
}

.color-control {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 8px;
}

.color-control input[type="color"] {
  height: 36px;
  padding: 3px;
}

@media (max-width: 860px) {
  .mobile-nav-toggle {
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 50;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 8px;
    background: var(--glass);
    color: var(--secondary);
    box-shadow: 0 10px 30px var(--shadow);
    backdrop-filter: blur(12px);
    cursor: pointer;
    transition:
      background 180ms ease,
      color 180ms ease,
      transform 180ms ease;
  }

  .mobile-nav-toggle:hover {
    background: var(--glass-hover);
  }

  .hamburger {
    display: flex;
    width: 20px;
    height: 20px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
  }

  .hamburger span {
    display: block;
    width: 16px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition:
      opacity 240ms ease,
      transform 240ms ease;
  }

  .mobile-nav-open .hamburger span:first-child {
    transform: translateY(6px) rotate(45deg);
  }

  .mobile-nav-open .hamburger span:nth-child(2) {
    opacity: 0;
  }

  .mobile-nav-open .hamburger span:last-child {
    transform: translateY(-6px) rotate(-45deg);
  }

  .mobile-nav-overlay {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: block;
    min-height: 100dvh;
    background: transparent;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    backdrop-filter: blur(4px);
    transition:
      opacity 200ms ease,
      visibility 200ms ease,
      background 200ms ease;
  }

  .mobile-nav-open .mobile-nav-overlay {
    background: rgba(0, 0, 0, 0.2);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .mobile-nav-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: min(85vw, 320px);
    min-height: 100dvh;
    overflow-y: auto;
    border-right: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(248, 249, 250, 0.82);
    backdrop-filter: blur(18px);
    transform: translateX(-100%);
    transition: transform 250ms ease-out;
  }

  .mobile-nav-open .mobile-nav-panel {
    transform: translateX(0);
  }

  .mobile-nav-body {
    padding: 80px 24px 32px;
  }

  .mobile-mark {
    width: 160px;
    margin: 0 auto 16px;
  }

  .mobile-social-links {
    justify-content: space-between;
    width: 160px;
    margin: 0 auto 34px;
    gap: 0;
  }

  .mobile-social-links .social-link {
    width: 24px;
    height: 24px;
  }

  .mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .mobile-nav-links a {
    font-size: 1.5rem;
    line-height: 1.08;
  }

  .shell {
    display: block;
    width: min(calc(100vw - 32px), 720px);
    max-width: none;
    margin: 0 auto;
    padding: 0 16px;
  }

  .sidebar {
    display: none;
  }

  main {
    width: 100%;
    max-width: none;
    min-width: 0;
    padding: 112px 0 72px;
  }

  .about,
  .section,
  .entries,
  .entry {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .about {
    min-height: auto;
  }

  .pill-link,
  .icon-link {
    max-width: 100%;
    font-size: 0.78rem;
    line-height: 1.2;
    white-space: normal;
  }

  p,
  li {
    font-size: 1rem;
    max-width: 100%;
  }

  .text-link,
  .entry-link {
    overflow-wrap: anywhere;
  }

  .section {
    padding-top: 52px;
  }

  .section-heading-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .archive-item {
    grid-template-columns: 1fr;
  }

  .archive-image {
    aspect-ratio: 16 / 10;
    min-height: 0;
  }
}

@media (max-width: 1180px) {
  .workbench-layout {
    grid-template-columns: 250px minmax(0, 1fr);
  }

  .controls-panel {
    grid-column: 1 / -1;
    max-height: none;
  }

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

@media (max-width: 760px) {
  .workbench-shell {
    padding: 10px;
  }

  .workbench-topbar {
    position: relative;
    grid-template-columns: 1fr auto;
    gap: 10px;
  }

  .workbench-back {
    grid-column: 1 / 2;
  }

  .workbench-title {
    grid-column: 1 / -1;
    grid-row: 2;
    text-align: left;
  }

  .workbench-actions {
    grid-column: 2;
    grid-row: 1;
  }

  .workbench-status {
    display: none;
  }

  .workbench-layout {
    grid-template-columns: 1fr;
  }

  .workbench-panel,
  .controls-panel {
    max-height: none;
  }

  .preview-column {
    grid-template-rows: auto auto;
  }

  .shader-preview,
  .shader-host {
    min-height: 360px;
  }

  .controls-grid {
    grid-template-columns: 1fr;
  }

  .control-row-slider {
    grid-template-columns: 1fr;
  }

  .color-control {
    grid-template-columns: 48px minmax(0, 1fr);
  }
}

/* ---------------------------------------------------------------- project page */

/* plain paper: no dither, no scrim */
.project-page::before,
.project-page::after {
  display: none;
}

.project-page {
  margin: 0;
  background: #fdfdfc;
}

/* Container width follows the reference layout: a wide column (64rem) with the
   figures running full-bleed inside it, rather than a narrow measure with
   whitespace either side. */
.project-shell {
  display: block;
  max-width: 64rem;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 6rem;
}

.project-back {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 4rem;
  border-bottom: 1px dotted var(--accent-strong);
  color: #246f93;
  font-size: 0.94rem;
  line-height: 1.3;
  transition:
    color 160ms ease,
    border-color 160ms ease,
    font-style 160ms ease;
}

.project-back:hover {
  color: #246f93;
  border-color: currentColor;
  font-style: italic;
}

.project-page h1 {
  margin: 0 0 1rem;
  font-size: 2.1rem;
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -0.018em;
}

.project-page h2 {
  margin: 3rem 0 0.9rem;
  font-size: 1.3rem;
  font-weight: 600;
}

.project-page p,
.project-page li {
  font-size: 1.02rem;
  line-height: 1.72;
}

.project-meta {
  color: var(--secondary);
}

.project-meta a {
  color: var(--accent-strong);
}

.project-lead {
  font-size: 1.14rem;
  line-height: 1.68;
}

/* figures fill the column, framed the way the reference does it */
.project-page figure {
  margin: 2.25rem 0;
}

.project-page figure img {
  display: block;
  width: 100%;
  height: auto;
  padding: 0.75rem;
  background: #fff;
  border: 1px solid #e8e8e3;
  border-radius: 0.5rem;
}

.project-page figcaption {
  margin-top: 0.7rem;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--secondary);
}

.cite-ref {
  font-size: 0.72em;
  vertical-align: super;
  text-decoration: none;
}

.project-refs {
  font-size: 0.9rem;
  color: var(--secondary);
}

.project-refs li {
  margin-bottom: 0.6rem;
}

/* detector explorer: real rasters with live burst detection */
.rast-control {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0 1rem;
  font-size: 0.92rem;
}

.rast-control label {
  color: var(--secondary);
}

.rast-control input[type="range"] {
  flex: 1 1 16rem;
  accent-color: var(--accent-strong);
}

.rast-control output {
  min-width: 4.5rem;
  font-variant-numeric: tabular-nums;
}

.rast-hint {
  flex-basis: 100%;
  font-size: 0.85rem;
  color: var(--muted);
}

.rast-figure {
  padding: 1rem;
  background: #fff;
  border: 1px solid #e8e8e3;
  border-radius: 0.5rem;
}

.rast-row {
  display: grid;
  grid-template-columns: 9rem 1fr 7rem;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.6rem;
}

.rast-label strong {
  display: block;
  font-size: 0.95rem;
}

.rast-sub {
  font-size: 0.78rem;
  color: var(--muted);
}

.rast-canvas {
  display: block;
  width: 100%;
  height: 92px;
  background: #fcfcfb;
  border: 1px solid #eeeee9;
  border-radius: 0.25rem;
}

.rast-stat {
  font-size: 0.86rem;
  line-height: 1.35;
  text-align: right;
}

.rast-axis {
  display: flex;
  justify-content: space-between;
  margin-left: 9.85rem;
  margin-right: 7.85rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.rast-readout {
  margin-top: 0.85rem;
  font-size: 0.92rem;
  color: var(--secondary);
}

@media (max-width: 640px) {
  .project-shell { padding: 2rem 1rem 4rem; }
  .project-back { margin-bottom: 3rem; }
  .project-page h1 { font-size: 1.75rem; }
  .rast-row { grid-template-columns: 1fr; gap: 0.35rem; }
  .rast-stat { text-align: left; }
  .rast-axis { margin: 0; }
}

.rast-caveat {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.85rem;
  color: var(--muted);
}

/*
 * Sophie Wang's site uses the public-domain Simple White Pack as three
 * conventional cursor states. Keep the treatment desktop-only so touch and
 * coarse-pointer devices retain their native interaction behavior.
 */
@media (hover: hover) and (pointer: fine) {
  html,
  body {
    cursor: url("/assets/cursors/simple-white-default.cur"), auto;
  }

  a[href]:not([aria-disabled="true"]),
  button:not(:disabled),
  [role="button"]:not([aria-disabled="true"]),
  label[for],
  summary,
  select:not(:disabled),
  input[type="button"]:not(:disabled),
  input[type="checkbox"]:not(:disabled),
  input[type="color"]:not(:disabled),
  input[type="file"]:not(:disabled),
  input[type="radio"]:not(:disabled),
  input[type="range"]:not(:disabled),
  input[type="reset"]:not(:disabled),
  input[type="submit"]:not(:disabled) {
    cursor: url("/assets/cursors/simple-white-pointer.cur"), pointer;
  }

  a[href="/blog"]:not([aria-disabled="true"]),
  a[href^="/blog/"]:not([aria-disabled="true"]) {
    cursor: url("/assets/cursors/golden-retriever-route.png?v=tongue-small") 13 16, pointer;
  }

}
