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

:root {
  --bg: #fdfdfc;
  --bg-surface: #fdfdfc;
  --text: #111111;
  --muted: rgba(0, 0, 0, 0.4);
  --line: #d9d9d9;
  --line-faint: #d9d9d9;
  --line-fade: linear-gradient(
    to right,
    transparent,
    var(--line) 14%,
    var(--line) 86%,
    transparent
  );
  --pill-bg: rgba(255, 255, 255, 0.18);
  --pill-active: rgba(255, 255, 255, 0.1);
  --accent: #111111;
  --accent-soft: #d9d9d9;
  --selection: #d9d9d9;
  --link: #111111;
  --link-underline: #d9d9d9;
  --link-underline-hover: #666666;
  --font: "Neue Haas Grotesk Display Pro", "Neue Haas Grotesk", sans-serif;
  --measure: 36.375rem;
  --page-pad-x: 1rem;
  --fs: 15px;
  --lh: calc(var(--fs) * 22 / 14);
  --fs-sm: calc(var(--fs) * 13 / 14);
  --lh-sm: calc(var(--fs) * 20 / 14);
  --ease-out-smooth: cubic-bezier(0.32, 0.72, 0, 1);
  --space-header: 3rem;
  --space-section: 3rem;
  --space-stack: 1rem;
}

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

::selection {
  background: var(--selection);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-optical-sizing: auto;
  font-size: var(--fs);
  font-weight: 400;
  line-height: var(--lh);
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a,
button {
  color: inherit;
  cursor: pointer;
}

a {
  text-decoration: none;
}

h1,
h2,
h3 {
  font-size: inherit;
  font-weight: inherit;
}

.page {
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 7rem var(--page-pad-x) 2.5rem;
}

.prose,
.bullets,
.cv-item p {
  width: 100%;
  max-width: 100%;
  overflow-wrap: break-word;
  hyphens: none;
  letter-spacing: 0;
}

.prose a,
.email-copy-link,
.bullets a,
.now-footer a,
.quests a .title,
a.row .title,
.award-copy a.title {
  position: relative;
  display: inline-block;
  color: var(--link);
  text-decoration: none;
}

.prose a::before,
.email-copy-link::before,
.bullets a::before,
.now-footer a::before,
.quests a .title::before,
a.row .title::before,
.award-copy a.title::before,
.prose a::after,
.email-copy-link::after,
.bullets a::after,
.now-footer a::after,
.quests a .title::after,
a.row .title::after,
.award-copy a.title::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  pointer-events: none;
}

.prose a::before,
.email-copy-link::before,
.bullets a::before,
.now-footer a::before,
.quests a .title::before,
a.row .title::before,
.award-copy a.title::before {
  background: var(--link-underline);
}

.prose a::after,
.email-copy-link::after,
.bullets a::after,
.now-footer a::after,
.quests a .title::after,
a.row .title::after,
.award-copy a.title::after {
  background: var(--link-underline-hover);
  transform: scaleX(0);
  transform-origin: left center;
  backface-visibility: hidden;
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.prose a:hover::after,
.prose a:focus-visible::after,
.email-copy-link:hover::after,
.email-copy-link:focus-visible::after,
.bullets a:hover::after,
.bullets a:focus-visible::after,
.now-footer a:hover::after,
.now-footer a:focus-visible::after,
.quests a:hover .title::after,
.quests a:focus-visible .title::after,
a.row:hover .title::after,
a.row:focus-visible .title::after,
.award-copy a.title:hover::after,
.award-copy a.title:focus-visible::after {
  transform: scaleX(1);
}

.case-index {
  position: relative;
}

.case-index li {
  padding-left: 14px;
}

.case-index a {
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0;
  text-decoration: none;
  background-image: linear-gradient(var(--link-underline-hover), var(--link-underline-hover));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  transition: color 0.2s ease, background-size 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.case-index-marker {
  --case-index-marker-size: 4px;
  position: absolute;
  top: 0;
  left: 0;
  width: var(--case-index-marker-size);
  height: var(--case-index-marker-size);
  border-radius: 50%;
  background: var(--text);
  pointer-events: none;
  opacity: 0;
  transform: translate3d(0, calc(var(--case-index-marker-y, 0px) - 50%), 0);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.16s ease-in-out;
}

.case-index a:hover,
.case-index a:focus-visible {
  background-size: 100% 1px;
}

.case-index a:hover,
.case-index a:focus-visible,
.case-index a.is-active {
  color: var(--text);
}

.case-index.has-active-marker .case-index-marker {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .case-index-marker,
  .case-index a {
    transition: none;
  }
}

.email-copy-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25em;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  line-height: inherit;
  cursor: pointer;
  white-space: nowrap;
  appearance: none;
}

.email-copy-icons {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 0.85em;
  height: 0.85em;
  color: var(--muted);
}

.email-copy-icon {
  grid-area: 1 / 1;
  width: 0.85em;
  height: 0.85em;
}

.email-copy-icon.is-copy {
  transform-origin: center;
  transition: transform 0.15s ease;
}

.email-copy-link:hover .email-copy-icon.is-copy,
.email-copy-link:active .email-copy-icon.is-copy {
  transform: scale(0.95);
}

.email-copy-icon.is-check,
.email-copy-link[data-copied] .email-copy-icon.is-copy {
  visibility: hidden;
}

.email-copy-link[data-copied] .email-copy-icon.is-check {
  visibility: visible;
}

.page-header-portrait {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.page-header-portrait > div {
  flex: 1;
  min-width: 0;
}

.page-header-photo-btn {
  flex-shrink: 0;
  width: calc(var(--lh) + 0.25rem + var(--lh));
  height: calc(var(--lh) + 0.25rem + var(--lh));
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  perspective: 520px;
  border-radius: 6px;
}

.page-header-photo {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 6px;
  object-fit: cover;
  object-position: 50% 40%;
}

.page-header-photo.is-spinning {
  animation: photo-card-spin 2.2s cubic-bezier(0.45, 0.05, 0.2, 1);
}

@keyframes photo-card-spin {
  from { transform: rotateY(0deg); }
  to { transform: rotateY(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .page-header-photo.is-spinning { animation: none; }
}

.lede {
  margin-bottom: 0;
}

.aka {
  position: relative;
  color: var(--muted);
  font-size: inherit;
  font-weight: 400;
  font-style: italic;
  line-height: inherit;
}

.text-hint,
.cv-role:has(.cv-tooltip) {
  color: inherit;
  text-decoration: underline dotted;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(0, 0, 0, 0.55);
  text-underline-offset: 0.2em;
  cursor: help;
}

.char-card {
  position: absolute;
  left: 0;
  top: 100%;
  z-index: 6;
  width: min(100%, 22rem);
  padding-top: 8px;
  color: var(--text);
  font-style: normal;
  text-decoration: none;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.text-hint:hover .char-card,
.text-hint:focus .char-card,
.text-hint:focus-visible .char-card {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.char-card-panel {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.char-card-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
}

.char-card-glyph {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 3.25rem;
  min-height: 3.25rem;
  padding: 0.35rem 0.25rem;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 4px;
  color: var(--text);
}

.char-card-pinyin {
  font-size: var(--fs-sm);
  font-weight: 400;
  line-height: var(--lh-sm);
  color: var(--muted);
}

.char-card-han {
  font-size: var(--fs);
  font-weight: 400;
  line-height: 1;
  color: var(--text);
}

.char-card-def {
  font-size: var(--fs-sm);
  font-weight: 400;
  line-height: var(--lh-sm);
  color: var(--muted);
  text-wrap: balance;
}

.pen-mark {
  display: inline;
  color: inherit;
  font: inherit;
  --mark: rgb(150, 176, 112);
  margin: -0.09em -0.09em -0.21em -0.41em;
  padding: 0.09em 0.09em 0.21em 0.41em;
  border-radius: 0.5em 0.3em;
  background-color: transparent;
  background-image: linear-gradient(
    82deg,
    color-mix(in srgb, var(--mark), transparent 50%),
    color-mix(in srgb, var(--mark), transparent 90%) 4%,
    color-mix(in srgb, var(--mark), transparent 70%) 96%,
    color-mix(in srgb, var(--mark), transparent 30%)
  );
  background-repeat: no-repeat;
  background-size: 0% 100%;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.pen-mark.is-armed {
  animation-name: pen-mark-in;
  animation-duration: var(--mark-duration, 1.8s);
  animation-timing-function: cubic-bezier(0.35, 0.08, 0.2, 1);
  animation-delay: var(--mark-delay, 1s);
  animation-fill-mode: forwards;
}

@keyframes pen-mark-in {
  to { background-size: 100% 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .pen-mark {
    animation: none;
    background-size: 100% 100%;
  }
}

.section {
  padding-top: var(--space-section);
}

.page-header + .section,
.page-header + .article-wrapper,
.page-header + .now-hero {
  padding-top: var(--space-header);
}

.now-hero + .section {
  padding-top: var(--space-section);
  padding-bottom: var(--space-section);
}

.section-label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  color: var(--muted);
  font-size: inherit;
  font-weight: 400;
  line-height: inherit;
  margin-bottom: 0.5rem;
  white-space: nowrap;
}

.divider-fade::before {
  content: "";
  display: block;
  width: 100%;
  height: 1px;
  background: var(--line-fade);
}

.section-label.divider-fade {
  align-items: stretch;
  gap: 0.5rem;
}

.section-label.text-divider {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.section-label.text-divider::after {
  content: "";
  flex: 1;
  min-width: 0;
  margin-left: 8px;
  height: 1px;
  background: rgba(0, 0, 0, 0.08);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-stack);
}

.list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 1rem;
  width: 100%;
  padding: 0.3675rem 0;
  color: var(--text);
}

.row .title {
  width: fit-content;
  max-width: 100%;
  justify-self: start;
}

.meta {
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}

.row .meta {
  flex-shrink: 0;
}

.row.is-muted,
.row.is-muted .meta {
  color: var(--muted);
  pointer-events: none;
}

.quests {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

.quests a {
  width: fit-content;
  max-width: 100%;
  padding: 0.3675rem 0;
  color: var(--link);
  text-decoration: none;
}

.quests a .title {
  width: fit-content;
  max-width: 100%;
}

.home-footer {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  width: 100%;
  margin-top: 0;
  padding: 2.5rem 0 0;
  position: relative;
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: var(--lh-sm);
}

.home-footer-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
  column-gap: 1rem;
  row-gap: 0;
  min-height: 32px;
}

.home-footer-row:has(.home-footer-link) {
  flex-wrap: nowrap;
  align-items: flex-start;
}

.home-footer-row:has(.home-footer-link) .local-time {
  flex: 1 1 auto;
  min-width: 0;
}

.home-footer .fm-panel {
  display: none;
  margin-left: auto;
  flex-shrink: 0;
}

.home-footer-link {
  margin-left: auto;
  flex-shrink: 0;
  color: var(--muted);
  font: inherit;
  text-decoration: none;
}

.home-footer-link:hover,
.home-footer-link:focus-visible {
  color: var(--text);
}

.home-footer::before {
  content: "";
  display: block;
  width: 100%;
  height: 1px;
  background: var(--line-fade);
}

.home-footer:has(.article-pager) {
  gap: 0;
}

.article-pager {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: baseline;
  width: 100%;
  margin-top: 2.5rem;
  font-family: "Neue Haas Grotesk Display Pro", "Neue Haas Grotesk", Inter, sans-serif;
  font-size: var(--fs);
  font-weight: 400;
  line-height: var(--lh);
}

.article-pager a {
  color: var(--muted);
  text-decoration: none;
}

.article-pager a:hover,
.article-pager a:focus-visible {
  color: var(--text);
}

.article-pager > :first-child {
  justify-self: start;
}

.article-pager > :nth-child(2) {
  justify-self: center;
}

.article-pager > :last-child {
  justify-self: end;
}

.article-pager + .home-footer-row {
  display: none;
}


.local-time {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  column-gap: 0.35em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum", "lnum";
}

.greeting-wheel {
  display: block;
  overflow: hidden;
  height: var(--lh-sm);
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  line-height: var(--lh-sm);
  cursor: pointer;
}

.greeting-wheel-viewport {
  display: block;
  overflow: hidden;
  height: var(--lh-sm);
  transition: width 0.4s var(--ease-out-smooth);
}

.greeting-wheel-track {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: transform 0.4s var(--ease-out-smooth);
}

.greeting-wheel-item {
  display: block;
  height: var(--lh-sm);
  line-height: var(--lh-sm);
  white-space: nowrap;
}

.signature {
  position: relative;
  display: block;
  width: 57.6px;
  max-width: 100%;
  flex-shrink: 0;
  margin-bottom: 1rem;
  overflow: hidden;
  cursor: pointer;
}

.signature img {
  display: block;
  width: 100%;
  height: auto;
}

.signature::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.7) 50%,
    transparent 100%
  );
  background-size: 45% 100%;
  background-repeat: no-repeat;
  background-position: -45% 0;
  pointer-events: none;
  opacity: 0;
  -webkit-mask-image: url("images/signature.png");
  mask-image: url("images/signature.png");
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.signature.is-gleaming::after {
  opacity: 1;
  animation: name-glisten 1.4s ease-in-out;
}

@media (hover: hover) and (pointer: fine) {
  .signature:hover::after {
    opacity: 1;
    animation: name-glisten 1.4s ease-in-out;
  }
}

.now-hero {
  width: 100%;
  margin: 0;
  overflow: hidden;
}

.now-hero img {
  width: 100%;
  height: auto;
  display: block;
}

.bullets {
  list-style: disc;
  padding-left: 1.2em;
  display: flex;
  flex-direction: column;
  gap: var(--space-stack);
}

.now-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 0;
  padding: 0;
  position: relative;
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: var(--lh-sm);
}


.now-footer.divider-fade::before {
  flex: 1 1 100%;
}

.now-footer strong {
  color: var(--text);
  font-weight: 500;
}

.cv-name {
  font-size: inherit;
  font-weight: 400;
}

.cv-updated {
  color: var(--muted);
  margin-top: 4px;
}

.list:has(.award-copy) {
  gap: 1.25rem;
}

.list:has(.award-copy) .row {
  padding-top: 0;
  padding-bottom: 0;
}

.award-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.award-detail {
  color: var(--muted);
  text-align: left;
  white-space: normal;
}

.cv-item {
  margin-bottom: var(--space-section);
}

.cv-item:last-child {
  margin-bottom: 0;
}

.cv-item-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.cv-role {
  position: relative;
  width: fit-content;
  max-width: 100%;
  font-weight: 500;
  margin-bottom: 8px;
}

.cv-item > .cv-role:has(+ .award-detail) {
  margin-bottom: 2px;
}

.cv-item > .award-detail {
  margin-bottom: 8px;
}

.cv-item-head .cv-role {
  margin-bottom: 0;
}

.cv-role.link-text {
  font-weight: 400;
}

.cv-tooltip {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 3;
  padding: 2px 12px;
  background: #000;
  color: #fff;
  border-radius: 6px;
  font-weight: 400;
  white-space: nowrap;
  pointer-events: none;
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}

.cv-item-head:hover .cv-tooltip,
.cv-role:focus .cv-tooltip,
.cv-role:focus-visible .cv-tooltip {
  opacity: 1;
  visibility: visible;
}

.page-kicker {
  margin-bottom: 0.25rem;
}

.name-hop {
  position: relative;
  display: inline-block;
  cursor: pointer;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

.name-hop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.7) 50%,
    transparent 100%
  );
  background-size: 45% 100%;
  background-repeat: no-repeat;
  background-position: -45% 0;
  pointer-events: none;
  animation: name-glisten 2.8s ease-in-out infinite;
}

.name-hop:hover::after,
.name-hop.is-playing::after {
  animation: none;
  opacity: 0;
}

.name-hop-letters {
  display: inline-flex;
  user-select: none;
}

.name-hop-letter,
.name-hop-space {
  display: inline-block;
}

.name-hop-space {
  flex-shrink: 0;
  width: 0.33em;
  white-space: pre;
}

.name-hop-letter {
  cursor: pointer;
}

.name-hop-glyph {
  display: inline-block;
  will-change: transform, color;
  transition: color 0.15s ease;
}

.name-hop-letter:hover .name-hop-glyph,
.name-hop-glyph.is-hop {
  color: var(--text);
}

.name-hop-glyph.is-hop {
  animation: name-hop 0.34s var(--ease-out-smooth);
}

@keyframes name-hop {
  0%, 100% { transform: translateY(0); }
  38% { transform: translateY(-6px); }
}

@keyframes name-glisten {
  0% { background-position: -45% 0; }
  100% { background-position: 145% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .name-hop::after { animation: none; }
  .name-hop-glyph.is-hop { animation: none; }
  .signature::after,
  .signature:hover::after,
  .signature.is-gleaming::after { animation: none; opacity: 0; }
}

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

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, var(--measure)) minmax(0, 1fr);
  align-items: stretch;
  min-height: 40px;
  background: var(--pill-bg);
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
}

.site-nav-side {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  padding: 0 16px;
}

.site-nav-side-left {
  justify-content: flex-end;
}

.site-nav-side-right {
  justify-content: flex-start;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  height: 40px;
  color: var(--muted);
  white-space: nowrap;
}

.site-nav > a.is-active,
.site-nav-path {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  padding: 0 var(--page-pad-x);
  background: var(--pill-active);
  color: var(--text);
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
}

.site-nav-path {
  gap: 0.4em;
  margin: 0;
  min-width: 0;
}

.site-nav-path-sep {
  color: var(--muted);
}

.site-nav-path [aria-current="page"] {
  color: var(--text);
  white-space: nowrap;
}

.site-nav a:hover:not(.is-active) {
  color: var(--text);
}

.site-nav a:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.site-nav-menu,
.site-nav-menu-panel {
  display: none;
}

@media screen and (max-width: 768px) {
  :root {
    --page-pad-x: 1.5rem;
  }

  body {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  /* Mobile menu starts below the top edge on every page, and the page follows it. */
  body:has(.site-nav) {
    padding-top: calc(20px + 1.25rem);
  }

  body > audio,
  #fm-audio {
    display: none;
  }

  .page {
    padding: 1.25rem var(--page-pad-x) 2.5rem;
  }

  .site-nav {
    position: sticky;
    top: 0;
    order: -1;
    align-self: stretch;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, var(--measure)) minmax(0, 1fr);
    align-items: start;
    padding: 0;
  }

  .site-nav-side {
    display: none;
  }

  .site-nav > a.is-active,
  .site-nav-path {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    width: auto;
    min-width: 0;
    padding: 0 calc(var(--page-pad-x) + 40px) 0 var(--page-pad-x);
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    overflow: hidden;
  }

  .site-nav-path a,
  .site-nav-path-sep {
    flex-shrink: 0;
  }

  .site-nav-path [aria-current="page"],
  .site-nav > a.is-active {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .site-nav-menu {
    position: relative;
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    justify-self: end;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-right: var(--page-pad-x);
    flex-shrink: 0;
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    transition: transform 0.12s;
  }

  .site-nav-menu:active {
    transform: scale(0.9);
  }

  .site-nav-menu-icon {
    position: relative;
    width: 16px;
    height: 16px;
  }

  .site-nav-menu-icon span {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 14px;
    height: 1.5px;
    border-radius: 999px;
    background: currentColor;
    transition: transform 0.2s var(--ease-out-smooth);
  }

  .site-nav-menu-icon span:first-child {
    transform: translate(-50%, calc(-50% - 3px));
  }

  .site-nav-menu-icon span:last-child {
    transform: translate(-50%, calc(-50% + 3px));
  }

  .site-nav.is-open .site-nav-menu-icon span:first-child {
    transform: translate(-50%, -50%) rotate(45deg);
  }

  .site-nav.is-open .site-nav-menu-icon span:last-child {
    transform: translate(-50%, -50%) rotate(-45deg);
  }

  .site-nav-menu-panel {
    display: grid;
    grid-column: 2;
    grid-row: 2;
    grid-template-rows: 0fr;
    min-width: 0;
    overflow: hidden;
    padding: 0 var(--page-pad-x);
    transition: grid-template-rows 0.2s var(--ease-out-smooth);
  }

  .site-nav.is-open .site-nav-menu-panel {
    grid-template-rows: 1fr;
  }

  .site-nav-menu-panel-inner {
    overflow: hidden;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav.is-open .site-nav-menu-panel-inner {
    padding: 4px 0 16px;
  }

  .site-nav-menu-panel a {
    height: 32px;
  }

  .site-nav-menu:focus-visible {
    outline: 2px solid var(--text);
    outline-offset: 2px;
  }

  @media (prefers-reduced-motion: reduce) {
    .site-nav-menu,
    .site-nav-menu-icon span,
    .site-nav-menu-panel {
      transition: none;
    }
  }
}

.fm-panel {
  --fm-art-size: 32px;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-width: 80px;
  height: var(--fm-art-size);
  background: #111111;
  border: none;
  border-radius: 999px;
  padding: 0 10px 0 6px;
}

.fm-panel-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  height: 100%;
  min-width: 68px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  outline: none;
}

.fm-panel-art {
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: #2a2a2a;
}

.fm-panel-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.fm-panel-control {
  position: relative;
  width: 24px;
  height: 10px;
  flex-shrink: 0;
  margin-left: auto;
}

.fm-panel-eq {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.fm-panel-play,
.fm-panel-pause {
  position: absolute;
  top: 50%;
  right: 0;
  left: auto;
  bottom: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.fm-eq-bar {
  width: 2px;
  height: 2px;
  border-radius: 999px;
  background: #6f6f6f;
}

.fm-panel-play {
  width: 0;
  height: 0;
  margin: 0;
  border-top: 3px solid transparent;
  border-bottom: 3px solid transparent;
  border-left: 6px solid #6f6f6f;
  transform: translateY(-50%);
}

.fm-panel-pause {
  width: 7px;
  height: 7px;
  transform: translateY(-50%);
}

.fm-panel-pause::before,
.fm-panel-pause::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 2px;
  height: 7px;
  border-radius: 1px;
  background: #6f6f6f;
  transform: translateY(-50%);
}

.fm-panel-pause::before {
  left: 0;
}

.fm-panel-pause::after {
  right: 0;
}

.fm-panel:not(.playing) .fm-panel-btn:hover .fm-panel-eq {
  opacity: 0;
  visibility: hidden;
}

.fm-panel:not(.playing) .fm-panel-btn:hover .fm-panel-play {
  opacity: 1;
  visibility: visible;
}

.fm-panel.playing .fm-panel-eq,
.fm-panel.playing .fm-panel-play {
  opacity: 0;
  visibility: hidden;
}

.fm-panel.playing .fm-panel-pause {
  opacity: 1;
  visibility: visible;
}

#custom-tooltip {
  position: fixed;
  pointer-events: none;
  background: var(--text);
  color: #fff;
  width: max-content;
  max-width: min(280px, calc(100vw - 24px));
  padding: 6px 12px;
  border-radius: 6px;
  text-align: center;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.3;
  white-space: nowrap;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.2s ease;
  transform: translate(-50%, -140%);
}

#custom-tooltip.is-fm-tooltip {
  transform: translate(-50%, calc(-100% - 10px));
}

/* Full screens sit in a device frame: a desktop window, or an iPhone bezel. */
.case-placeholder:has(.screen-window),
.case-placeholder:has(.screen-phone) {
  aspect-ratio: auto;
  padding: 10%;
}

.screen-window {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.screen-window-bar {
  display: flex;
  align-items: center;
  flex: none;
  height: 22px;
  padding: 0 8px;
  box-shadow: inset 0 -1px rgba(0, 0, 0, 0.05);
}

.screen-window-dots {
  position: relative;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ed6a5e;
}

.screen-window-dots::before,
.screen-window-dots::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

.screen-window-dots::before {
  background: #f4be50;
  transform: translateX(9px);
}

.screen-window-dots::after {
  background: #62c554;
  transform: translateX(18px);
}

.screen-window video,
.screen-window img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0;
}

.screen-phone {
  position: relative;
  width: min(42%, 220px);
  margin-inline: auto;
  aspect-ratio: 9 / 19.5;
  padding: 3.2% 3.4%;
  border-radius: 14%;
  background: #1a1a1a;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.screen-phone::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: 2.6%;
  left: 32%;
  right: 32%;
  height: 3.4%;
  border-radius: 100px;
  background: #1a1a1a;
  pointer-events: none;
}

.screen-phone video,
.screen-phone img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 11%;
}

/* A card recording sits in the frame, sized by height. */
.case-placeholder:has(> video) {
  container-type: size;
}

.case-placeholder > video {
  display: block;
  width: auto;
  height: 70cqh;
  max-width: 90%;
  border-radius: 6.5%;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

/* Bottom two-thirds of a phone recording: a straight cut across the top. */
.case-placeholder:has(.phone-bottom) {
  container-type: size;
  align-items: flex-start;
  padding: 0;
}

.phone-bottom {
  position: relative;
  height: 90cqh;
  aspect-ratio: 831 / 1160;
  overflow: hidden;
  /* Corner is a 146px circle on the 831×1160 phone crop. */
  border-radius: 0 0 17.57% 17.57% / 0 0 12.59% 12.59%;
}

.phone-bottom video {
  position: absolute;
  display: block;
  width: 103.73%;
  height: 150.34%;
  max-width: none;
  left: -2.17%;
  top: -50.17%;
}

/* The recording includes a dark matte around the iPhone. Crop to the phone. */
.case-placeholder:has(.phone-shot) {
  container-type: size;
}

.phone-shot {
  --src-w: 766;
  --src-h: 1534;
  --crop-x: 34;
  --crop-y: 24;
  --crop-w: 696;
  --crop-h: 1490;
  position: relative;
  height: 92cqh;
  aspect-ratio: 696 / 1490;
  overflow: hidden;
  border-radius: 21.6% / 10.1%;
}

.phone-shot.is-bottom {
  --src-w: 876;
  --src-h: 1188;
  --crop-x: 48;
  --crop-y: 24;
  --crop-w: 786;
  --crop-h: 1164;
  width: calc(92cqh * 786 / 1682);
  height: auto;
  aspect-ratio: 786 / 1164;
  align-self: flex-end;
  border-radius: 15.5% 15.5% 0 0 / 10.48% 10.48% 0 0;
}

.phone-shot video {
  position: absolute;
  display: block;
  width: calc(100% * var(--src-w) / var(--crop-w));
  height: calc(100% * var(--src-h) / var(--crop-h));
  max-width: none;
  left: calc(100% * var(--crop-x) / var(--crop-w) * -1);
  top: calc(100% * var(--crop-y) / var(--crop-h) * -1);
}
