body.portal {
  --portal-paper: #f8f6f0;
  --portal-card: #fffdf8;
  --portal-ink: #2e281f;
  --portal-ink-muted: #5e5347;
  --portal-stone: #ebe2d4;
  --portal-tint: #f1e9dd;
  --portal-walnut: #493829;
  --portal-walnut-hover: #604b3a;
  --portal-line: #ded5c7;
  --portal-bronze: #775333;
  --portal-serif: 'Instrument Serif', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --portal-sans: Inter, 'Helvetica Neue', Arial, sans-serif;
  margin: 0;
  background: var(--portal-paper);
  color: var(--portal-ink);
  font: 400 1rem/1.6 var(--portal-sans);
}

html:lang(zh) body.portal {
  --portal-serif: 'Noto Serif CJK SC', 'Songti SC', STSong, SimSun, serif;
  --portal-sans: 'Noto Sans CJK SC', 'PingFang SC', 'Microsoft YaHei', Arial, sans-serif;
}

.portal *, .portal *::before, .portal *::after { box-sizing: border-box; }
.portal img { display: block; max-width: 100%; }
.portal a { color: inherit; }
.portal :focus-visible { outline: 2px solid var(--portal-bronze); outline-offset: 4px; }

.portal-width {
  width: min(calc(100% - clamp(2rem, 8vw, 7.5rem)), 77rem);
  margin-inline: auto;
}

.portal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.6rem;
  min-height: 5.25rem;
  padding-block: .8rem;
  border-bottom: 1px solid var(--portal-line);
}

.portal-brand { display: block; flex: 0 0 auto; width: min(36%, 10.9rem); }
.portal-brand img { width: 100%; height: auto; }
.portal-header-nav { display: flex; align-items: center; justify-content: end; flex-wrap: wrap; gap: .5rem clamp(.65rem, 2.3vw, 1.9rem); }
.portal-header-nav a { text-decoration: none; font-size: .9rem; font-weight: 650; }
.portal-header-nav a:hover { text-decoration: underline; text-underline-offset: .28rem; }
.portal .language-select {
  appearance: none;
  min-height: 2.75rem;
  max-width: 100%;
  padding: .35rem 1.9rem .35rem .75rem;
  border: 1px solid var(--portal-line);
  border-radius: .12rem;
  background: var(--portal-card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='m3 5 4 4 4-4' fill='none' stroke='%232e281f' stroke-width='1.3'/%3E%3C/svg%3E") right .55rem center / .75rem no-repeat;
  color: var(--portal-ink);
  font: 600 .875rem/1.2 var(--portal-sans);
  cursor: pointer;
}

.portal-hero {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  min-height: 28rem;
  margin-block: clamp(1rem, 2.8vw, 2.2rem) clamp(1.25rem, 3.1vw, 2.5rem);
  background: var(--portal-stone);
  color: var(--portal-ink);
}

.portal-intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(1.65rem, 5.15vw, 4.65rem);
  background: radial-gradient(ellipse at 0% 100%, #dfd0bd 0%, transparent 68%);
}

.portal-region {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin: 0 0 clamp(.75rem, 1.65vw, 1.4rem);
  color: var(--portal-bronze);
  font: 650 .876rem/1.3 var(--portal-sans);
  letter-spacing: .1em;
  text-transform: uppercase;
}

.portal-region::before { width: 1.8rem; height: 1px; background: currentColor; content: ''; }
.portal h1, .portal h2 { margin: 0; font-family: var(--portal-serif); font-weight: 400; text-wrap: balance; }
.portal h1 { max-width: 12ch; font-size: clamp(2.65rem, 5.15vw, 5.55rem); line-height: .99; letter-spacing: -.057em; }
.portal-lede { max-width: 31ch; margin: clamp(1.05rem, 2.5vw, 1.75rem) 0 0; color: var(--portal-ink-muted); font-size: clamp(1rem, 1.34vw, 1.125rem); line-height: 1.57; text-wrap: pretty; }
.portal-feature { position: relative; min-width: 0; margin: 0; overflow: hidden; isolation: isolate; }
.portal-hero-photo { width: 100%; height: 100%; max-height: 37rem; object-fit: cover; object-position: center 55%; }
.portal-caption { position: absolute; inset: auto auto 1rem 1rem; margin: 0; padding: .34rem .65rem; background: var(--portal-walnut); color: var(--portal-card); font-size: .875rem; font-weight: 650; }

.portal-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 2.35vw, 1.9rem); }
.portal-card { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--portal-line); background: var(--portal-card); scroll-margin-block-start: 1rem; }
.portal-card-image { position: relative; display: grid; flex: 0 0 auto; place-items: center; aspect-ratio: 2.08 / 1; overflow: hidden; background: var(--portal-tint); border-bottom: 1px solid var(--portal-line); }
.portal-card-image:focus-visible { outline-offset: -4px; z-index: 1; }
.portal-booklet {
  grid-template: minmax(0, 1fr) / repeat(2, minmax(0, 1fr));
  place-items: stretch;
  text-decoration: none;
}
.portal-cover-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  container-type: inline-size;
  min-width: 0;
  padding: clamp(.6rem, 2vw, 1.4rem);
  border-inline-end: 1px solid var(--portal-line);
  background: var(--portal-card);
  text-align: center;
}
.portal-cover-region {
  color: var(--portal-bronze);
  font: 650 clamp(.75rem, 4.9cqi, .875rem)/1.35 var(--portal-sans);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.portal-cover-region::after {
  content: '';
  display: block;
  width: 1.7rem;
  height: 1px;
  margin: .6rem auto .75rem;
  background: var(--portal-bronze);
}
.portal-cover-title {
  font: 400 clamp(1rem, 2.35vw, 2.15rem)/1.13 var(--portal-serif);
  font-size: clamp(1rem, 10.1cqi, 2.15rem);
  letter-spacing: -.025em;
  text-wrap: balance;
}
.portal-cover-title > span { display: block; }
.portal-cover-title > span + span { margin-block-start: .16em; color: var(--portal-bronze); }
.portal-booklet img { width: 100%; height: 100%; object-fit: cover; object-position: 57% center; }
.portal-gallery img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.portal-card-copy { display: flex; flex: 1; flex-direction: column; align-items: flex-start; padding: clamp(1.25rem, 2.75vw, 2rem); }
.portal h2 { font-size: clamp(1.72rem, 3vw, 2.65rem); line-height: 1.09; letter-spacing: -.035em; }
.portal-card p { max-width: 49ch; margin: .65rem 0 1.2rem; color: var(--portal-ink-muted); font-size: 1rem; line-height: 1.55; }
.portal-card-actions { display: flex; flex-wrap: wrap; align-items: center; column-gap: clamp(.6rem, 1.4vw, 1.25rem); row-gap: .25rem; margin-top: auto; }
.portal-button { display: inline-flex; align-items: center; min-height: 2.75rem; padding: .48rem .85rem; border: 1px solid var(--portal-walnut); border-radius: .12rem; background: var(--portal-walnut); color: var(--portal-card) !important; text-decoration: none; font-size: .9rem; font-weight: 650; line-height: 1.3; transition: background-color 160ms; }
.portal-button:hover { background: var(--portal-walnut-hover); }
.portal-editions { display: flex; align-items: center; flex-wrap: wrap; }
.portal-editions a { display: inline-flex; align-items: center; min-height: 2.75rem; padding-inline: .45rem; color: var(--portal-bronze); font-size: .9rem; font-weight: 650; text-underline-offset: .22rem; }
.portal-editions a + a { margin-inline-start: .2rem; }
.portal-editions a:hover { color: var(--portal-ink); }

.portal-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem 1rem; margin-top: clamp(1.35rem, 3.2vw, 2.6rem); padding-block: 1.05rem 1.35rem; border-top: 1px solid var(--portal-line); color: var(--portal-ink-muted); font-size: .875rem; }
.portal-footer a { text-underline-offset: .18rem; }

html:lang(zh) .portal h1 { max-width: none; font-size: clamp(2.4rem, 4.7vw, 4.7rem); letter-spacing: .018em; }
html:lang(zh) .portal h2 { letter-spacing: 0; }
html:lang(zh) .portal-lede { max-width: 19em; }
html:lang(zh) .portal-card p { max-width: 28em; }

@media (max-width: 760px) {
  .portal-width { width: min(calc(100% - 2rem), 39rem); }
  .portal-header { min-height: 4.4rem; gap: .35rem .75rem; }
  .portal-hero { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .portal-intro { padding: clamp(1.45rem, 6.2vw, 2.65rem); }
  .portal h1 { max-width: 16ch; font-size: clamp(2.55rem, 8.1vw, 4.35rem); }
  html:lang(zh) .portal h1 { font-size: clamp(2.25rem, 7.3vw, 4rem); }
  .portal-hero-photo { height: auto; max-height: min(66vw, 26rem); aspect-ratio: 3 / 2; }
  .portal-caption { inset: auto auto .65rem .65rem; }
  .portal-sections { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 460px) {
  .portal-width { width: calc(100% - 1.5rem); }
  .portal-header-nav { gap: .35rem .7rem; }
  .portal-header-nav a { display: none; }
  .portal-region { font-size: .875rem; }
  .portal-card-image { aspect-ratio: 1.9 / 1; }
  .portal-editions a { padding-inline: .31rem; }
}

@media (prefers-reduced-motion: reduce) {
  .portal *, .portal *::before, .portal *::after { transition: none !important; }
}
