@font-face {
  font-family: Garden Display;
  src: url('/fonts/InstrumentSerif-normal-400.woff2');
}
@font-face {
  font-family: Garden Display;
  src: url('/fonts/InstrumentSerif-italic-400.woff2');
  font-style: italic;
}
@font-face {
  font-family: Garden Sans;
  src: url('/fonts/InstrumentSans-normal-400_600.woff2');
  font-weight: 400 600;
}
@font-face {
  font-family: Garden Mono;
  src: url('/fonts/IBMPlexMono-normal-400.woff2');
}
:root {
  color-scheme: dark;
  --ground: #081e32;
  --text: #f1ebd7;
  --soft: #bccbd0;
  --rule: #476373;
  --accent: #dfc99a;
  --gutter: clamp(20px, 4.2vw, 82px);
  --serif: 'Garden Display', Georgia, serif;
  --sans: 'Garden Sans', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --song: 'Songti SC', 'Noto Serif CJK SC', serif;
  --mono: 'Garden Mono', monospace;
}
:root[data-theme='light'] {
  color-scheme: light;
  --ground: #e2dfcf;
  --text: #17364a;
  --soft: #304d5b;
  --rule: #819294;
  --accent: #58472e;
}
* {
  box-sizing: border-box;
}
html {
  scroll-padding-top: 20px;
}
body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font: 16px/1.5 var(--sans);
}
a,
button {
  color: inherit;
  font: inherit;
}
a {
  text-decoration: none;
}
button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
a:hover,
button:hover {
  color: var(--accent);
}
[hidden] {
  display: none !important;
}
.skip {
  position: fixed;
  top: -100px;
  left: 1em;
  z-index: 4;
  background: var(--ground);
  padding: 8px;
}
.skip:focus {
  top: 1em;
}
.garden-shell {
  isolation: isolate;
  position: relative;
  min-height: 100svh;
  padding: 0 var(--gutter);
  display: flex;
  flex-direction: column;
  background: radial-gradient(ellipse at 71% 42%, #10364c 0%, transparent 57%);
}
.garden-shell:before,
.directory:before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.105;
  background: url('/media/imprint/materials/cyanotype.webp') center/890px 600px;
  mix-blend-mode: luminosity;
}
[data-theme='light'] .garden-shell {
  background: radial-gradient(ellipse at 71% 42%, #eeead8, transparent 57%);
}
[data-theme='light'] .garden-shell:before,
[data-theme='light'] .directory:before {
  background-image: url('/media/imprint/materials/paper.webp');
  mix-blend-mode: multiply;
  opacity: 0.45;
}
.mast,
.controls,
.directory > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mast {
  position: relative;
  z-index: 2;
  height: clamp(65px, 8vh, 86px);
  border-bottom: 1px solid var(--rule);
}
.signature {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.mast nav,
.controls div {
  display: flex;
  gap: clamp(15px, 2.5vw, 46px);
  align-items: center;
}
.mast nav a,
.controls a,
.controls button,
.directory > header > a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 0.5em;
  font-size: 14px;
}
.mast nav a:first-child {
  font-family: var(--serif);
  font-style: italic;
  font-size: 21px;
}
.mast nav a:last-child {
  font: 12px var(--mono);
}
.garden-shell > main {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.opening {
  position: relative;
  flex: 1;
  min-height: clamp(515px, 69svh, 850px);
  display: flex;
  align-items: center;
}
.editorial {
  position: relative;
  z-index: 1;
  width: 40%;
  padding: clamp(35px, 5.4vh, 68px) 0;
  pointer-events: none;
}
.editorial a,
.editorial button {
  pointer-events: auto;
}
h1,
h2,
h3,
p {
  margin: 0;
}
.cover-copy h1 {
  font: 400 clamp(78px, min(8.2vw, 13.5vh), 155px)/0.82 var(--serif);
  letter-spacing: -0.045em;
}
.cover-copy h1 span {
  padding-left: 0.32em;
}
.cover-copy h1 i {
  font-weight: 400;
  color: var(--accent);
}
.subtitle {
  font: 400 clamp(22px, 2.15vw, 38px)/1.4 var(--song);
  letter-spacing: 0.16em;
  margin-top: clamp(20px, 3.15vh, 36px);
}
.introduction {
  color: var(--soft);
  max-width: 27em;
  margin: 1em 0 1.35em;
  font-size: clamp(14px, 1.08vw, 18px);
  line-height: 1.85;
  text-wrap: pretty;
}
.wander {
  display: inline-flex;
  align-items: center;
  gap: 2.3em;
  border-bottom: 1px solid var(--accent);
  min-height: 44px;
  font-size: 15px;
}
.scene {
  position: absolute;
  inset: 0 calc(-1 * var(--gutter)) 0 27%;
  overflow: hidden;
  pointer-events: none;
}
.scene canvas,
.nodes {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.scene:not(.painted) {
  background: url('/media/imprint/plates/perception.svg') center/contain no-repeat;
}
.scene[data-arriving] #garden {
  opacity: var(--landscape-ink, 0);
}
.scene .portal-impression {
  pointer-events: none;
}
.nodes {
  pointer-events: none;
}
.node {
  pointer-events: auto;
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transform: translate(-50%, -50%);
  min-width: 40px;
  min-height: 44px;
  color: var(--soft);
}
.node b {
  font: 10px var(--mono);
  text-shadow: 0 1px 3px var(--ground);
}
.node span {
  width: 9px;
  height: 9px;
  border: 1px solid currentColor;
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--ground);
}
.node[aria-current='true'] span,
.node:hover span {
  background: var(--accent);
  color: var(--accent);
}
.node-0 {
  left: 48%;
  top: 76%;
}
.node-1 {
  left: 55%;
  top: 79%;
}
.node-2 {
  left: 69%;
  top: 72%;
}
.node-3 {
  left: 83%;
  top: 66%;
}
.node-4 {
  left: 74%;
  top: 87%;
}
.node-5 {
  left: 37%;
  top: 87%;
}
.plate-caption {
  position: absolute;
  right: 0;
  bottom: 4.5%;
  display: flex;
  align-items: baseline;
  gap: 12px;
  color: var(--soft);
  font: 12px var(--mono);
}
.plate-caption b {
  font-weight: 400;
}
.plate-caption i {
  font: italic 22px var(--serif);
}
.rail {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.rail a {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 10px;
  align-content: center;
  min-height: clamp(76px, 9vh, 104px);
}
.rail small {
  font: 11px var(--mono);
  color: var(--soft);
  padding-top: 0.65em;
}
.rail span {
  font: 400 clamp(23px, 2.1vw, 37px)/1 var(--serif);
}
.rail em {
  grid-column: 2;
  font: 13px var(--song);
  letter-spacing: 0.16em;
  color: var(--soft);
  margin-top: 5px;
}
.rail a[aria-current='true']:before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  width: 46px;
  border-top: 2px solid var(--accent);
}
.controls {
  color: var(--soft);
  min-height: 50px;
}
.controls a,
.controls button {
  font-size: 12px;
}
.controls button[aria-pressed='true'] {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}
#selected-field {
  max-width: 442px;
}
.back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--soft);
  font-size: 13px;
  margin-bottom: clamp(8px, 2vh, 24px);
}
.record-label,
.directory > header > div > span,
.reading-source {
  font: 11px/1.4 var(--mono);
  letter-spacing: 0.08em;
  color: var(--soft);
}
#field-copy h1 {
  font: italic 400 clamp(53px, 6.5vw, 108px)/1 var(--serif);
  letter-spacing: -0.04em;
  color: var(--accent);
}
#field-copy h1 em {
  display: block;
  font: 400 clamp(22px, 2vw, 32px)/1.4 var(--song);
  letter-spacing: 0.14em;
  margin-top: 4px;
  color: var(--text);
}
#field-copy p,
.record > p {
  font-size: 14px;
  color: var(--soft);
  line-height: 1.8;
  margin: 12px 0 22px;
}
.readings {
  border-top: 1px solid var(--rule);
}
.reading {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: baseline;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 15px;
}
.reading small {
  display: block;
  color: var(--soft);
  font-size: 12px;
}
.reading-source {
  letter-spacing: 0;
}
.turn {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}
.turn a {
  display: grid;
  place-content: center;
  width: 44px;
  height: 44px;
  font-size: 23px;
}
.directory {
  position: relative;
  isolation: isolate;
  max-width: 1800px;
  margin: auto;
  padding: clamp(60px, 9vh, 120px) var(--gutter);
}
.directory > header {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 24px;
  margin-bottom: 24px;
}
.directory h2 {
  font:
    400 clamp(34px, 4vw, 68px)/1.4 var(--serif),
    var(--song);
}
.records {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 44px 10%;
}
.record {
  scroll-margin: 32px;
}
.record h3 {
  font: 400 clamp(35px, 3.4vw, 58px)/1.1 var(--serif);
  margin-top: 9px;
}
.record h3 em {
  font: 400 0.45em var(--song);
  color: var(--soft);
  white-space: nowrap;
}
.record > p {
  margin: 8px 0 16px;
}
.index-exit {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  margin-top: 44px;
  border-bottom: 1px solid var(--rule);
}
@media (min-width: 1750px) {
  .garden-shell {
    max-width: 2100px;
    margin: auto;
  }
}
@media (max-width: 760px) {
  .mast nav {
    gap: 16px;
  }
  .mast nav a:first-child {
    font-size: 18px;
  }
  .garden-shell {
    min-height: 0;
  }
  .opening {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
  }
  .editorial {
    width: 100%;
    order: 0;
    padding: 32px 0 0;
  }
  .cover-copy h1 {
    font-size: clamp(64px, 10.8vw, 91px);
    line-height: 0.85;
  }
  .cover-copy h1 span {
    padding-left: 0.23em;
  }
  .subtitle {
    font-size: 22px;
    margin-top: 17px;
  }
  .introduction {
    max-width: 32em;
    line-height: 1.65;
    margin: 0.5em 0 0.4em;
  }
  .wander {
    gap: 1.6em;
  }
  .scene {
    order: 1;
    position: relative;
    inset: auto;
    margin: 0 calc(0px - var(--gutter));
    width: calc(100% + 2 * var(--gutter));
    height: clamp(245px, 71vw, 395px);
  }
  .plate-caption {
    right: 0;
    bottom: 6px;
    font-size: 10px;
  }
  .plate-caption i {
    font-size: 17px;
  }
  .rail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .rail a {
    min-height: 58px;
    gap: 2px 6px;
  }
  .rail a:nth-child(n + 4) {
    border-top: 1px solid var(--rule);
  }
  .rail span {
    font-size: 23px;
  }
  .rail small {
    font-size: 9px;
  }
  .rail em {
    font-size: 11px;
    margin-top: 2px;
  }
  .records {
    grid-template-columns: 1fr;
    gap: 34px;
  }
  .directory > header > a {
    font-size: 12px;
  }
  .directory {
    padding-top: 60px;
  }
  .turn {
    position: absolute;
    right: 0;
    top: 18px;
  }
  .back {
    margin-bottom: 8px;
  }
  .reading {
    padding: 8px 0;
  }
  .controls {
    min-height: 48px;
  }
  #selected-field {
    max-width: 100%;
  }
}
@media (max-width: 380px) {
  .mast nav {
    gap: 10px;
  }

  .rail span {
    font-size: 20px;
  }
  .rail a {
    column-gap: 3px;
  }
  .mast nav a {
    font-size: 12px;
  }
}
@media print {
  .mast nav,
  .rail,
  .controls,
  .wander,
  .scene,
  .nodes,
  .plate-caption,
  .turn,
  .directory header > a,
  .back {
    display: none;
  }
  .garden-shell,
  .directory,
  body {
    background: white;
    color: #132b3b;
    --text: #132b3b;
    --soft: #344754;
    --accent: #173a58;
    --rule: #aaa;
  }
  .garden-shell {
    min-height: 0;
  }
  .opening {
    min-height: 0;
  }
  .editorial {
    width: 100%;
  }
  .directory {
    padding-top: 1em;
  }
  .record {
    break-inside: avoid;
  }
  .records {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 761px) {
  .scene canvas {
    mask-image: linear-gradient(90deg, transparent, #000 22%);
  }
}
@media (max-width: 760px) {
  .rail a {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    gap: 4px 5px;
  }
  .rail span {
    grid-column: 1/-1;
    grid-row: 1;
    font-size: clamp(19px, 5.6vw, 26px);
  }
  .rail small,
  .rail em {
    grid-row: 2;
    align-self: center;
    padding-top: 0;
    margin: 0;
  }
  .rail small {
    grid-column: 1;
  }
  .rail em {
    grid-column: 2;
  }
  .rail a {
    padding: 8px 2px 7px 0;
  }
}

html[lang="zh-CN"] .mast nav a:first-child {font: 14px var(--sans)}

@media(max-width:760px){
  .node {min-width:44px}
  .node-0 {left:35%;top:72%}
  .node-1 {left:54%;top:80%}
  .node-2 {left:69%;top:66%}
  .node-3 {left:85%;top:58%}
  .node-4 {left:83%;top:85%}
  .node-5 {left:26%;top:90%}
}

.imprint-wordmark {
  display: inline-flex;
  align-items: center;
  gap: .28em;
  white-space: nowrap;
  font: 600 clamp(1.35rem, 2.25vw, 2.45rem)/1 var(--bi-sans, "Instrument Sans", sans-serif);
  letter-spacing: -.065em;
}
.imprint-symbol {
  width: 1.22em;
  height: 1.22em;
  background: currentColor;
  mask: url('/art/imprint-nav.svg') center / contain no-repeat;
}
@media (max-width: 650px) {
  .imprint-wordmark { font-size: clamp(1.04rem, 4.3vw, 1.36rem); }
}
