:root {
  --editorial-ivory: #f7f3eb;
  --editorial-paper: #fcf9f3;
  --editorial-ink: #241b16;
  --editorial-muted: #5f5046;
  --editorial-rule: #d8c8b7;
  --editorial-accent: #9b4827;
  --editorial-accent-deep: #743317;
  --editorial-olive: #798369;
  --editorial-olive-wash: #e8eadf;
  --editorial-ochre: #b5853c;
  --editorial-ochre-wash: #f3e8d2;
  --editorial-ochre-ink: #735624;
  --editorial-serif: "Songti SC", "Noto Serif CJK SC", "STSong", "SimSun", serif;
  --editorial-latin: Baskerville, "Iowan Old Style", Georgia, serif;
  --editorial-paper-shadow: 0 .6rem 1.3rem -.95rem rgb(36 27 22 / .28);
  --editorial-paper-lift: 0 1.15rem 1.9rem -1.2rem rgb(36 27 22 / .37);
  --editorial-ease: cubic-bezier(.22, .63, .36, 1);
}

.site-header {
  color: var(--editorial-ink);
  background: var(--editorial-paper);
  border-color: var(--editorial-rule);
}

.site-header .brand strong,
.site-footer .brand strong {
  padding: 0;
  background: none;
  color: var(--editorial-ink);
  font: 600 1.75rem/.92 var(--editorial-latin);
  letter-spacing: -.065em;
}

.site-header .brand span,
.site-footer .brand span {
  border-left: 1px solid var(--editorial-rule);
  padding-left: .6rem;
  color: var(--editorial-ink);
  font-size: .76rem;
  font-weight: 550;
}

.site-nav a { font-weight: 600; }
.site-nav a[aria-current="page"] { color: var(--editorial-accent); }
.site-nav a[aria-current="page"]::after {
  inset: auto .7rem .26rem;
  height: 1px;
  background: var(--editorial-accent);
}
.site-header .link-btn { color: var(--editorial-accent); }
.site-footer {
  color: var(--editorial-muted);
  background: var(--editorial-ivory);
  border-top: 1px solid var(--editorial-rule);
}
.site-footer a:focus-visible { outline-color: var(--editorial-accent); }

body[data-page="home"],
.editorial-home {
  background: var(--editorial-ivory);
  color: var(--editorial-ink);
}

.editorial-home {
  --link: var(--editorial-accent);
  --wine: var(--editorial-ink);
  --muted: var(--editorial-muted);
  --line: var(--editorial-rule);
}

.editorial-hero {
  background: radial-gradient(ellipse at 75% 25%, var(--editorial-paper), transparent 64%),
              linear-gradient(135deg, var(--editorial-paper) 41%, var(--editorial-ivory));
}
.editorial-hero-grid {
  display: grid;
  row-gap: clamp(1.65rem, 3.5vw, 2.75rem);
  align-items: center;
  padding-block: clamp(2.15rem, 4vw, 3.9rem) clamp(2.25rem, 4vw, 3.9rem);
}

.editorial-event-title, .editorial-title-line {
  display: grid;
  gap: .46rem;
  min-width: 0;
}

.editorial-event-title {
  grid-column: 1 / -1;
  padding-block-end: clamp(.8rem, 1.75vw, 1.5rem);
  border-block-end: 1px solid var(--editorial-rule);
  color: var(--editorial-ink);
  font: 650 clamp(1.32rem, 6.55vw, 3.2rem)/1.13 var(--editorial-serif);
  letter-spacing: -.03em;
}
.editorial-title-fjcc { white-space: nowrap; }

.editorial-title-edition {
  color: var(--editorial-accent);
  font: 650 clamp(.92rem, 2.4vw, 1.65rem)/1.22 var(--font);
  letter-spacing: .055em;
}
.editorial-title-region {
  color: var(--editorial-muted);
  font: 650 clamp(1.05rem, 2.55vw, 1.85rem)/1.22 var(--editorial-serif);
  letter-spacing: .015em;
}

.editorial-subtitle {
  color: var(--editorial-muted);
  font: 400 italic clamp(1rem, 2.25vw, 1.43rem)/1.3 var(--editorial-latin);
}
.editorial-summary {
  max-width: 29em;
  margin-top: .92rem;
  color: var(--editorial-muted);
  font-size: clamp(.94rem, 2.2vw, 1.08rem);
  line-height: 1.85;
}
.editorial-masthead { min-width: 0; }
.editorial-actions { margin-top: 1.45rem; }
.editorial-home .row { gap: .45rem 1.35rem; }

.editorial-home .action.editorial-primary {
  border: 1px solid var(--editorial-accent);
  border-radius: .13rem;
  padding: .65rem 1.28rem;
  background: var(--editorial-accent);
  color: #fffdf8;
  font-weight: 630;
}
.editorial-home .action.editorial-primary:is(:hover, :active) {
  border-color: var(--editorial-accent-deep);
  background: var(--editorial-accent-deep);
}
.editorial-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: .4rem;
  color: var(--editorial-accent);
  font-size: .9rem;
  font-weight: 650;
  text-decoration: underline;
  text-decoration-color: #b88971;
  text-underline-offset: .26em;
}
.editorial-link:hover { text-decoration-color: currentColor; }
.editorial-link:is(:focus-visible, :active) { text-decoration-thickness: 2px; }

.editorial-photo { width: min(100%, 21rem); margin: 0; }
.editorial-photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  padding: .36rem;
  border: 1px solid var(--editorial-rule);
  border-radius: .24rem;
  background: var(--editorial-paper);
  box-shadow: var(--editorial-paper-shadow);
}
.editorial-photo figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .22rem .34rem;
  padding: .58rem .15rem 0;
  color: var(--editorial-ink);
  font-size: .73rem;
  letter-spacing: .025em;
  overflow-wrap: anywhere;
}
.editorial-photo figcaption::before {
  content: "";
  flex: 0 0 .72rem;
  height: 1px;
  margin-inline-end: .2rem;
  background: var(--editorial-ochre);
}
.editorial-photo figcaption span { color: var(--editorial-muted); }
.editorial-section-icon {
  display: inline-grid;
  width: 2.7rem;
  height: 2.7rem;
  place-items: center;
  color: var(--editorial-olive);
  border: 1px solid var(--editorial-rule);
  border-radius: .2rem;
  background: var(--editorial-paper);
}
.editorial-section-icon svg { width: 1.35rem; height: 1.35rem; }
.editorial-section-icon:is([data-visual-slot="home-facts"], [data-visual-slot="home-how"], [data-visual-slot="home-faq"]) {
  color: var(--editorial-ochre-ink);
}
.editorial-section-heading > .editorial-section-icon,
.editorial-section-heading > .editorial-photo { margin-bottom: .75rem; }
.editorial-section-heading > h2 + .editorial-section-icon,
.editorial-section-heading > h2 + .editorial-photo { margin-block: .8rem 0; }
.editorial-section-heading > .editorial-photo { max-width: 15rem; }
.editorial-hero-grid > .editorial-photo {
  width: min(82%, 22rem);
  justify-self: end;
}

.editorial-facts {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  column-gap: .8rem;
  padding-inline: clamp(.85rem, 2.2vw, 1.8rem);
  border-block: 1px solid var(--editorial-rule);
  border-block-start-color: var(--editorial-ochre);
  background: linear-gradient(100deg, var(--editorial-ochre-wash), var(--editorial-paper));
  box-shadow: var(--editorial-paper-shadow);
}
.editorial-facts > .editorial-section-icon { margin-top: 1rem; }
.editorial-facts > .editorial-photo { width: 7.5rem; margin-block: .9rem; }
.editorial-facts dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem 1rem;
  margin: 0;
  padding-block: 1rem;
}
.editorial-facts dl > div:last-child { grid-column: 1 / -1; }
.editorial-facts dl > div { min-width: 0; padding-block: .25rem; }
.editorial-facts dt {
  display: flex;
  align-items: center;
  gap: .4rem;
  color: var(--editorial-muted);
  font-size: .79rem;
}
.editorial-facts dt::before {
  content: "";
  flex: 0 0 .32rem;
  height: .32rem;
  background: var(--editorial-ochre);
  border-radius: 50%;
}
.editorial-facts dd {
  margin-top: .13rem;
  color: var(--editorial-ink);
  font: 650 clamp(1.02rem, 2.6vw, 1.3rem)/1.35 var(--editorial-serif);
  overflow-wrap: anywhere;
}
.editorial-facts dl > div:last-child dd { font-size: clamp(.95rem, 2vw, 1.13rem); }

.editorial-section { scroll-margin-top: 1.1rem; }
.editorial-section > .layout {
  border-bottom: 1px solid var(--editorial-rule);
  padding-block: clamp(2.6rem, 7vw, 6.4rem);
}
.editorial-pair, .editorial-steps { display: grid; gap: 1.4rem; }
.editorial-home h2 {
  color: var(--editorial-ink);
  font: 650 clamp(1.84rem, 4.1vw, 3.55rem)/1.17 var(--editorial-serif);
  letter-spacing: -.038em;
}
.editorial-prose,
.heritage-section[aria-labelledby="association-heading"] {
  min-width: 0;
  padding: clamp(1.15rem, 3.25vw, 2.25rem);
  border: 1px solid var(--editorial-rule);
  border-block-start-color: var(--editorial-olive);
  background: var(--editorial-paper);
  box-shadow: inset 0 1px rgb(255 255 255 / .55), var(--editorial-paper-shadow);
}
.editorial-about > .editorial-prose,
.heritage-section[aria-labelledby="association-heading"] {
  background: linear-gradient(125deg, var(--editorial-olive-wash), var(--editorial-paper) 138%);
}
.editorial-prose > h2::after,
.editorial-steps > .editorial-section-heading > h2::after,
.heritage-section > .editorial-section-heading > h2::after {
  content: "";
  display: block;
  width: 2rem;
  height: 2px;
  margin-top: .55rem;
  background: var(--editorial-olive);
  transform-origin: left center;
}
.editorial-steps > .editorial-section-heading > h2::after { background: var(--editorial-ochre); }
.editorial-prose > p:not(.announcement) {
  max-width: 32em;
  margin-top: .86rem;
  color: var(--editorial-muted);
  line-height: 1.85;
}
.editorial-prose > .editorial-link,
.editorial-prose > .row { margin-top: .6rem; }
.editorial-about .editorial-prose { grid-row: 1; }
.editorial-about > .editorial-photo { width: min(77%, 17.7rem); }
.editorial-visit > .editorial-photo { width: min(78%, 18.8rem); justify-self: end; }
.editorial-home .announcement {
  max-width: 31rem;
  margin-top: .75rem;
  border: 0;
  border-top: 1px solid var(--editorial-rule);
  padding: .7rem 0 0;
  color: var(--editorial-muted);
  background: none;
  font-size: .85rem;
}
.editorial-home .announcement strong {
  margin-bottom: .19em;
  color: var(--editorial-ink);
  font-weight: 650;
}

.editorial-home .timeline {
  grid-template-columns: minmax(0, 1fr);
  margin-top: 0;
  gap: 0;
}
.editorial-home .timeline li {
  position: relative;
  grid-template-columns: minmax(0, 1fr);
  border-color: var(--editorial-rule);
  padding: 1rem .8rem 1rem 3.65rem;
  background: rgb(252 249 243 / .43);
}
.editorial-home .timeline li:first-child { border-top-color: var(--editorial-ochre); }
.editorial-home .timeline li:last-child { border-bottom: 1px solid var(--editorial-rule); }
.editorial-home .timeline li::before {
  position: absolute;
  inset: 1rem auto auto .78rem;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid var(--editorial-rule);
  border-radius: 50%;
  background: var(--editorial-paper);
  color: var(--editorial-accent);
  font: 600 .95rem/1 var(--editorial-latin);
}
.editorial-home .timeline h3 { font: 650 1.2rem/1.32 var(--editorial-serif); }
.editorial-home .timeline p { color: var(--editorial-muted); }

.editorial-home .outline-links {
  max-width: 22rem;
  gap: 0;
  margin-top: .45rem;
}
.editorial-home .outline-links a { color: var(--editorial-ink); font-weight: 620; }
.editorial-home .outline-links a:hover { color: var(--editorial-accent); }

.editorial-home .faq { margin: 0; gap: 0; border-top: 1px solid var(--editorial-rule); }
.editorial-home .faq details {
  border: 0;
  border-bottom: 1px solid var(--editorial-rule);
  padding: 0;
  background: rgb(252 249 243 / .43);
}
.editorial-home .faq details[open] { background: var(--editorial-ochre-wash); }
.editorial-home .faq summary {
  display: list-item;
  min-height: 3.35rem;
  padding: .65rem .85rem;
  font-weight: 650;
}
.editorial-home .faq summary::marker { color: var(--editorial-accent); }
.editorial-home .faq summary::-webkit-details-marker { color: var(--editorial-accent); }
.editorial-home .faq details > p { color: var(--editorial-muted); margin: 0; padding: 0 .85rem .72rem; }
.editorial-home .faq summary:focus-visible { outline-offset: -3px; }

.editorial-close { background: var(--editorial-paper); }
.editorial-close > .layout {
  display: grid;
  align-items: center;
  gap: 1rem;
  padding-block: clamp(2.35rem, 5vw, 4.5rem);
}
.editorial-close h2 { font-size: clamp(1.55rem, 3.7vw, 2.9rem); }

body[data-page="heritage"] {
  color: var(--editorial-ink);
  background: var(--editorial-ivory);
}

.heritage-page .page-heading h1 {
  color: var(--editorial-ink);
  font: 650 clamp(2rem, 6vw, 4.75rem)/1.1 var(--editorial-serif);
}
.heritage-page .crumb { color: var(--editorial-accent); }
.heritage-section {
  display: grid;
  gap: .7rem 2.5rem;
  border-top: 1px solid var(--editorial-rule);
  padding-block: clamp(1.55rem, 4.7vw, 4rem);
}
.heritage-section h2 { font: 650 clamp(1.35rem, 3.3vw, 2.4rem)/1.25 var(--editorial-serif); }
.heritage-section h3 { font: 650 clamp(1.14rem, 2.5vw, 1.55rem)/1.3 var(--editorial-serif); }
.heritage-copy { max-width: 38em; color: var(--editorial-muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.heritage-section[aria-labelledby="archive-heading"] { border-block-start-color: var(--editorial-olive); }
.heritage-section > .editorial-section-heading > .editorial-photo { max-width: 14.5rem; }
.heritage-records { display: grid; gap: .65rem; margin: 0; padding: 0; list-style: none; }
.heritage-records li,
.heritage-section[aria-labelledby="archive-heading"] > .heritage-copy {
  align-self: start;
  padding: clamp(.8rem, 2.4vw, 1.2rem);
  border: 1px solid var(--editorial-rule);
  background: var(--editorial-paper);
}
.heritage-period { padding-bottom: .42rem; color: var(--editorial-accent); font-size: .82rem; }
.heritage-records .heritage-copy { margin-top: .4rem; }
.heritage-photos { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: 1.1rem; }
.heritage-photos figure { margin: 0; }
.heritage-photos .work-photo { width: min(100%, 21rem); }
.heritage-photos .work-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.heritage-photos figcaption { margin-top: .38rem; color: var(--editorial-muted); font-size: .85rem; overflow-wrap: anywhere; }

@media (max-width: 450px) {
  .editorial-facts:has(> .editorial-photo) {
    grid-template-columns: minmax(0, 1fr);
  }
  .editorial-facts > .editorial-photo { margin-bottom: 0; }
}

@media (min-width: 720px) {
  .editorial-hero-grid,
  .editorial-pair,
  .editorial-steps,
  .editorial-close > .layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: clamp(1.8rem, 7vw, 7rem);
  }
  .editorial-hero-grid { grid-template-columns: minmax(0, 1.28fr) minmax(0, .87fr); }
  .editorial-event-title { font-size: clamp(2.6rem, 4.85vw, 4.65rem); }
  .editorial-title-line { display: flex; align-items: baseline; flex-wrap: wrap; gap: .2rem .6rem; }
  .editorial-hero-grid > .editorial-photo { width: min(100%, 22rem); }
  .editorial-facts dl { grid-template-columns: .78fr .88fr 1.72fr; padding-block: 1.3rem; }
  .editorial-facts { align-items: center; gap: 1rem; }
  .editorial-facts > .editorial-section-icon { margin-top: 0; }
  .editorial-facts dl > div:last-child { grid-column: auto; }
  .editorial-facts dl > div + div { padding-left: 1.25rem; border-left: 1px solid var(--editorial-rule); }
  .editorial-pair { align-items: center; }
  .editorial-about { grid-template-columns: minmax(0, .78fr) minmax(0, 1.17fr); }
  .editorial-about .editorial-prose { grid-row: auto; }
  .editorial-about > .editorial-photo { width: min(100%, 19.5rem); justify-self: start; }
  .editorial-steps { grid-template-columns: minmax(0, .72fr) minmax(0, 1.32fr); }
  .editorial-visit > .editorial-photo { width: min(100%, 20.75rem); }
  .editorial-close .row { justify-content: end; }
  .heritage-section { grid-template-columns: minmax(13rem, .8fr) minmax(0, 1.65fr); }
}

@media (min-width: 1100px) {
  .editorial-event-title { display: flex; align-items: baseline; flex-wrap: wrap; column-gap: 1.1rem; }
  .editorial-title-line { column-gap: .85rem; }
}

.editorial-prose:focus-within,
.heritage-section[aria-labelledby="association-heading"]:focus-within { border-color: var(--editorial-olive); }
.heritage-records li:focus-within {
  border-color: var(--editorial-olive);
  background: var(--editorial-olive-wash);
}
.editorial-home .faq summary:active { color: var(--editorial-accent); }
:is(#main, #auth-dialog, #report-dialog) .action:active:not(:disabled) {
  border-color: var(--editorial-accent-deep);
  background: var(--editorial-accent-deep);
  color: var(--editorial-paper);
}

@media (hover: hover) and (pointer: fine) {
  .editorial-prose:hover,
  .heritage-section[aria-labelledby="association-heading"]:hover { border-color: var(--editorial-olive); }
  .editorial-facts dl > div:hover dd { color: var(--editorial-accent); }
  .editorial-home .timeline li:hover,
  .editorial-home .faq details:hover { background-color: var(--editorial-ochre-wash); }
  .editorial-home .timeline li:hover::before { border-color: var(--editorial-ochre); }
  .heritage-records li:hover {
    border-color: var(--editorial-olive);
    background: var(--editorial-olive-wash);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .editorial-prose, .editorial-photo img, .heritage-section, .heritage-records li,
  :is(#main, #auth-dialog, #report-dialog) .action, #main .card {
    transition: box-shadow .24s var(--editorial-ease), transform .24s var(--editorial-ease),
                border-color .24s var(--editorial-ease), background-color .2s ease-out;
  }
  .editorial-home .timeline li,
  .editorial-home .faq details { transition: background-color .18s ease-out; }
  .editorial-prose > h2::after,
  .editorial-steps > .editorial-section-heading > h2::after,
  .heritage-section > .editorial-section-heading > h2::after,
  .editorial-link > span[aria-hidden] { transition: transform .24s var(--editorial-ease); }
  .editorial-link:focus-visible > span[aria-hidden] { transform: translate(.19rem, -.14rem); }
  .editorial-link[href="#how"]:focus-visible > span[aria-hidden] { transform: translateY(.18rem); }
  .editorial-home .faq details[open] > p { animation: editorial-unfold .18s var(--editorial-ease) both; }
  :is(#main, #auth-dialog, #report-dialog) .action:active:not(:disabled) { transform: translateY(1px); }

  @keyframes editorial-unfold {
    from { opacity: .45; transform: translateY(-.18rem); }
    to { opacity: 1; transform: translateY(0); }
  }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .editorial-prose:hover, .heritage-records li:hover, #main .card:hover {
    transform: translateY(-.18rem);
    box-shadow: var(--editorial-paper-lift);
  }
  .editorial-photo:hover img {
    transform: translateY(-.22rem) scale(1.012);
    box-shadow: var(--editorial-paper-lift);
  }
  .editorial-prose:hover > h2::after,
  .editorial-section:hover .editorial-steps > .editorial-section-heading > h2::after,
  .heritage-section:hover > .editorial-section-heading > h2::after { transform: scaleX(1.9); }
  .editorial-link:hover > span[aria-hidden] { transform: translate(.19rem, -.14rem); }
  .editorial-link[href="#how"]:hover > span[aria-hidden] { transform: translateY(.18rem); }
}
