.site-header.journal-header {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: stretch;
  grid-template-columns: none;
  height: 49px;
  padding-inline: max(32px, calc((100% - 1200px) / 2));
  border-bottom: 1px solid #deddd7;
  background: rgb(251 251 248 / .96);
  backdrop-filter: blur(7px);
  box-shadow: none;
}
.journal-header *, .journal-header *::before, .journal-header *::after { box-sizing: border-box; }
.journal-header .brand {
  display: flex;
  align-items: center;
  flex: 0 0 265px;
  width: 265px;
  height: 48px;
  gap: 12px;
  padding: 0 32px;
  border-left: 1px solid #deddd7;
  border-right: 1px solid #deddd7;
  color: #202024;
  font: 600 16px/24.8px "Journal Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
  white-space: nowrap;
}
.journal-header .brand-pixel {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(5, 1fr);
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  background: none;
}
.journal-header .brand-pixel::before, .journal-header .brand-pixel::after { display: none; }
.journal-header .brand-pixel i { background: #ff5229; }
.journal-header .brand-pixel i:nth-child(4), .journal-header .brand-pixel i:nth-child(5) { background: #ffaf01; }
.journal-header .brand-pixel i:nth-child(1) { grid-area: 1 / 1; } .journal-header .brand-pixel i:nth-child(2) { grid-area: 1 / 5; }
.journal-header .brand-pixel i:nth-child(3) { grid-area: 2 / 1; } .journal-header .brand-pixel i:nth-child(4) { grid-area: 2 / 2; }
.journal-header .brand-pixel i:nth-child(5) { grid-area: 2 / 3; } .journal-header .brand-pixel i:nth-child(6) { grid-area: 2 / 4; }
.journal-header .brand-pixel i:nth-child(7) { grid-area: 2 / 5; } .journal-header .brand-pixel i:nth-child(8) { grid-area: 3 / 1; }
.journal-header .brand-pixel i:nth-child(9) { grid-area: 3 / 3; } .journal-header .brand-pixel i:nth-child(10) { grid-area: 3 / 5; }
.journal-header .brand-pixel i:nth-child(11) { grid-area: 4 / 1; } .journal-header .brand-pixel i:nth-child(12) { grid-area: 4 / 5; }
.journal-header .brand-pixel i:nth-child(13) { grid-area: 5 / 1; } .journal-header .brand-pixel i:nth-child(14) { grid-area: 5 / 2; }
.journal-header .brand-pixel i:nth-child(15) { grid-area: 5 / 3; } .journal-header .brand-pixel i:nth-child(16) { grid-area: 5 / 4; }
.journal-header .brand-pixel i:nth-child(17) { grid-area: 5 / 5; }
.journal-header .nav { display: flex; flex: 1 1 auto; min-width: 0; height: 48px; overflow: visible; }
.journal-header .nav-link, .journal-header .history-trigger {
  position: relative;
  display: flex;
  align-items: center;
  height: 48px;
  padding: 0 16px;
  border: 0;
  border-right: 1px solid #deddd7;
  background: transparent;
  color: #202024;
  font: 400 14px/21.7px "Journal Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  white-space: nowrap;
  cursor: pointer;
  transition: background .24s ease, color .24s ease;
}
.journal-header .nav-link::after, .journal-header .history-trigger::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: #ff5229;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .28s cubic-bezier(.2,.8,.2,1);
}
.journal-header .nav-link:hover, .journal-header .nav-link.active, .journal-header .journal-history:hover .history-trigger,
.journal-header[data-current-issue]:not([data-current-issue=""]) .history-trigger,
.journal-header .journal-history.is-open .history-trigger { background: #fcfcfc; }
.journal-header .nav-link:hover::after, .journal-header .nav-link.active::after,
.journal-header .journal-history:hover .history-trigger::after,
.journal-header[data-current-issue]:not([data-current-issue=""]) .history-trigger::after,
.journal-header .journal-history.is-open .history-trigger::after { transform: scaleX(1); }
.journal-header .journal-history { position: relative; flex: 0 0 auto; height: 48px; }
.journal-header .history-menu {
  position: absolute;
  z-index: 70;
  top: 48px;
  left: 0;
  width: 298px;
  max-height: 319px;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid #e4e3de;
  border-top: 0;
  border-radius: 0 0 8px 8px;
  background: #fbfbf8;
  box-shadow: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-5px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.journal-header .journal-history:hover .history-menu,
.journal-header .journal-history:focus-within .history-menu,
.journal-header .journal-history.is-open .history-menu { opacity: 1; visibility: visible; transform: none; }
.journal-header .history-menu::-webkit-scrollbar { width: 6px; }
.journal-header .history-menu::-webkit-scrollbar-thumb { border: 1px solid #fbfbf8; border-radius: 4px; background: #bebcb1; }
.journal-header .history-item {
  position: relative;
  display: grid;
  grid-template-columns: 64px 1fr 20px;
  align-items: center;
  gap: 16px;
  width: 100%;
  height: 56px;
  min-height: 56px;
  padding: 0 16px;
  border-bottom: 1px solid #e4e3de;
  background: #fff;
  color: #1b1b1b;
  white-space: nowrap;
  overflow: hidden;
  transition: background .2s ease;
}
.journal-header .history-item:last-child { border-bottom: 0; }
.journal-header .history-item:hover, .journal-header .history-item[aria-current="page"] { background: #f2f2ef; }
.journal-header .history-volume, .journal-header .history-date { display: flex; align-items: center; height: 24px; min-width: 0; font-family: "Journal Mono", "Journal Sans", Menlo, "SFMono-Regular", monospace; font-variant-numeric: tabular-nums; line-height: 24px; }
.journal-header .history-volume { font-size: 14px; font-weight: 500; transition: transform .3s ease; }
.journal-header .history-date { justify-content: flex-end; color: #626268; font-size: 12px; letter-spacing: -.2px; text-align: right; transition: transform .3s ease; }
.journal-header .history-arrow-enter, .journal-header .history-arrow-exit { display: block; width: 20px; height: 20px; }
.journal-header .history-arrow-enter { position: absolute; left: 16px; top: 50%; transform: translate(-40px,-50%); pointer-events: none; transition: transform .3s cubic-bezier(.4,0,.2,1) .05s; }
.journal-header .history-arrow-enter img, .journal-header .history-arrow-exit img { display: block; width: 20px; height: 20px; }
.journal-header .history-arrow-exit { transition: transform .3s cubic-bezier(.4,0,.2,1); }
.journal-header .history-item:hover .history-arrow-enter, .journal-header .history-item:focus-visible .history-arrow-enter { transform: translate(0,-50%); }
.journal-header .history-item:hover .history-arrow-exit, .journal-header .history-item:focus-visible .history-arrow-exit { transform: translateX(40px); }
.journal-header .history-item:hover .history-volume, .journal-header .history-item:focus-visible .history-volume { transform: translateX(24px); }
.journal-header .history-item:hover .history-date, .journal-header .history-item:focus-visible .history-date { transform: translateX(8px); }
.journal-header .history-item[aria-current="page"] .history-arrow-exit img { transform: rotate(180deg); }
.journal-header .history-item.is-placeholder { cursor: default; }
.journal-header .journal-search { position: relative; z-index: 65; flex: 0 0 48px; width: 48px; height: 48px; margin-left: auto; overflow: hidden; transition: flex-basis .28s cubic-bezier(.2,.8,.2,1), width .28s cubic-bezier(.2,.8,.2,1); }
.journal-header .journal-search.is-open { flex-basis: 320px; width: 320px; }
.journal-header .search-open, .journal-header .search-close {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  background: #fbfbf8;
  color: #1b1b1b;
  cursor: pointer;
}
.journal-header .search-open { position: absolute; top: 0; right: 0; z-index: 2; border-left: 1px solid #e4e3de; border-right: 1px solid #e4e3de; transition: opacity .12s; }
.journal-header .journal-search.is-open .search-open { opacity: 0; pointer-events: none; }
.journal-header .search-form {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 320px;
  height: 49px;
  min-height: 0;
  margin: 0;
  padding: 0 0 0 14px;
  border: 1px solid #e4e3de;
  background: #fbfbf8;
}
.journal-header .search-form > .pixel-search { flex: 0 0 18px; }
.journal-header .search-input { flex: 1 1 auto; width: auto; min-width: 0; height: 46px; padding: 0; border: 0; outline: 0; background: transparent; color: #1b1b1b; font: 400 14px/22px "Journal Sans", "PingFang SC", sans-serif; }
.journal-header .search-input::placeholder { color: #626268; }
.journal-header .search-input::-webkit-search-cancel-button,
.journal-header .search-input::-webkit-search-decoration,
.journal-header .search-input::-webkit-search-results-button,
.journal-header .search-input::-webkit-search-results-decoration { display: none; -webkit-appearance: none; appearance: none; }
.journal-header .search-input::-ms-clear { display: none; }
.journal-header .search-close { flex: 0 0 48px; margin-left: auto; }
.journal-header .pixel-search { display: block; width: 18px; height: 18px; background: url("assets/figma/search-pixel.svg") center/18px 18px no-repeat; image-rendering: pixelated; }
.journal-header .pixel-close { display: block; width: 20px; height: 20px; background: url("assets/figma/close-pixel.svg") center/20px 20px no-repeat; image-rendering: pixelated; }
@media (max-width: 900px) {
  .site-header.journal-header { padding-inline: 16px; }
}
@media (max-width: 700px) {
  .journal-header .brand { flex-basis: auto; width: auto; max-width: calc(100vw - 150px); min-width: 0; gap: 8px; padding: 0 10px; font-size: clamp(11px, 3.15vw, 14px); overflow: hidden; }
  .journal-header .brand > span:last-child { overflow: hidden; text-overflow: ellipsis; }
  .journal-header .nav { flex: 0 0 auto; }
  .journal-header .nav-link, .journal-header .history-trigger { padding-inline: 10px; font-size: 12px; }
  .journal-header .journal-search { margin-left: auto; }
  .journal-header .journal-search.is-open { position: absolute; top: 0; right: 16px; width: min(320px, calc(100vw - 32px)); height: 49px; }
  .journal-header .journal-search.is-open .search-form { width: 100%; }
  .journal-header .history-menu { left: auto; right: -48px; }
}
@media (max-width: 450px) {
  .journal-header .nav-link, .journal-header .history-trigger { padding-inline: 8px; font-size: 11px; }
  .journal-header .brand { max-width: calc(100vw - 118px); }
  .journal-header .brand > span:last-child { display: none; }
  .journal-header .brand { flex: 0 0 48px; justify-content: center; padding: 0; }
  .journal-header .journal-history { position: static; }
  .journal-header .history-menu { left: 16px; right: auto; width: min(298px, calc(100vw - 32px)); }
  .journal-header .history-item { width: 100%; grid-template-columns: 64px minmax(0, 1fr) 20px; gap: 8px; }
  .journal-header .history-date { overflow: hidden; text-overflow: ellipsis; }
}
@media (prefers-reduced-motion: reduce) {
  .journal-header .journal-search, .journal-header .history-menu, .journal-header .history-item *, .journal-header .history-trigger::after { transition-duration: .01ms; }
}
