:root {
  --ink: #1d1a16;
  --ink-soft: #4a443c;
  --paper: #f3eee6;
  --paper-deep: #e6dfd3;
  --wall: #cfc6b8;
  --seal: #d7301f;
  --seal-deep: #a82416;
  --gold: #ecd08f;
  --line: rgba(29, 26, 22, .16);
  --serif: "EB Garamond", "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  --wrap: 1120px;

  /* type scale: every size in the site is one of these steps */
  --t-label: .78125rem;                                   /* 12.5  small caps-like labels */
  --t-xs: .84375rem;                                      /* 13.5 */
  --t-sm: .90625rem;                                      /* 14.5  meta, captions */
  --t-md: .96875rem;                                      /* 15.5  secondary text */
  --t-lg: 1.03125rem;                                     /* 16.5 */
  --t-body: clamp(1.03125rem, .99rem + .2vw, 1.09375rem); /* 16.5 -> 17.5 */
  --t-h5: clamp(1.125rem, 1.09rem + .15vw, 1.1875rem);    /* 18 -> 19 */
  --t-h4: clamp(1.25rem, 1.18rem + .3vw, 1.375rem);       /* 20 -> 22 */
  --t-h3: clamp(1.375rem, 1.28rem + .45vw, 1.5625rem);    /* 22 -> 25 */
  --t-h2: clamp(1.625rem, 1.45rem + .8vw, 1.9375rem);     /* 26 -> 31 */
  --sec: clamp(64px, 7.4vw, 108px);                       /* vertical rhythm of full-width sections */
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--t-body);
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
  font-optical-sizing: auto;
  font-variant-numeric: lining-nums;
  /* CJK typesetting: no punctuation at line starts, tight adjacent punctuation, a hair of space between Han and Latin */
  line-break: strict;
  overflow-wrap: break-word;
  text-spacing-trim: trim-start;
  text-autospace: normal;
  hanging-punctuation: allow-end;
}
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
h1, h2, h3, h4 { text-wrap: balance; }
p, li, dd { text-wrap: pretty; }
p { text-justify: inter-character; }
time, .events time, .member__contact, .event-page__when dd, .footer address { font-variant-numeric: lining-nums tabular-nums; }
::selection { background: var(--seal); color: #fff; }
:focus-visible { outline: 2px solid var(--seal); outline-offset: 3px; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }
[lang="en"] { letter-spacing: .01em; }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 14px 32px;
  transition: background .35s, box-shadow .35s, padding .35s;
}
.nav--solid, .nav--open {
  background: rgba(243, 238, 230, .96);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 var(--line);
  padding-block: 8px;
}
.nav__brand { display: flex; align-items: center; gap: 12px; text-decoration: none; opacity: 0; transition: opacity .35s; }
.nav--solid .nav__brand, .nav--open .nav__brand { opacity: 1; }
.nav__name { font-weight: 700; font-size: var(--t-body); line-height: 1.25; letter-spacing: .08em; }
.nav__name small { display: block; font-weight: 400; font-size: var(--t-label); letter-spacing: .02em; color: var(--ink-soft); }
.nav__menu { display: flex; align-items: center; gap: 4px; }
.nav__menu a {
  position: relative; padding: 8px 12px; text-decoration: none;
  font-size: var(--t-md); font-weight: 500; letter-spacing: .1em; white-space: nowrap;
}
.nav__menu a::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 3px; height: 2px;
  background: var(--seal); transform: scaleX(0); transform-origin: left; transition: transform .3s;
}
.nav__menu a:hover::after, .nav__menu a:focus-visible::after { transform: scaleX(1); }
/* language toggle: both languages side by side, the current one filled */
.nav__langs { display: inline-flex; margin-left: 12px; border: 1px solid var(--ink); }
.nav__menu .nav__lang { padding: 3px 10px; font-size: var(--t-xs); letter-spacing: .1em; transition: background .2s, color .2s; }
.nav__menu .nav__lang + .nav__lang { border-left: 1px solid var(--ink); }
.nav__menu .nav__lang::after { display: none; }
.nav__menu .nav__lang:hover { background: rgba(29, 26, 22, .08); }
.nav__menu .nav__lang.is-current { background: var(--ink); color: var(--paper); }
.nav__toggle { display: none; }

/* ---------- hero (kept) ---------- */
.hero {
  position: sticky; top: 0; z-index: 0; height: 100svh; overflow: hidden;
  display: flex; align-items: center; background: var(--wall);
}
.hero__bg {
  position: absolute; inset: 0; will-change: filter;
  background: var(--img-hero, none) center / cover no-repeat;
  animation: settle 2.4s cubic-bezier(.2, .7, .2, 1) both;
}
.hero__inner { position: relative; will-change: transform, opacity; }
.sheet { position: relative; z-index: 2; background: var(--paper); box-shadow: 0 -30px 60px -20px rgba(0, 0, 0, .45); }
.footer { position: relative; z-index: 2; }
@keyframes settle { from { scale: 1.12; } }
.hero__inner { width: 100%; max-width: 1360px; margin: 0 auto; padding: 0 5vw 8vh; }
.hero__logo { width: min(640px, 86vw); margin-left: -22px; animation: rise 1.1s .15s both cubic-bezier(.2, .7, .2, 1); }
.hero__spot {
  display: inline-flex; align-items: center; gap: 14px; margin-top: 8px;
  padding: 9px 18px 9px 9px; text-decoration: none;
  background: rgba(243, 238, 230, .82); backdrop-filter: blur(4px);
  border-left: 3px solid var(--seal);
  font-size: var(--t-lg); letter-spacing: .08em;
  animation: rise 1.1s .45s both cubic-bezier(.2, .7, .2, 1);
  transition: background .3s;
}
.hero__spot:hover { background: var(--paper); }
.hero__spot-tag { background: var(--seal); color: #fff; padding: 1px 9px; font-size: var(--t-xs); letter-spacing: .2em; }
.arrow { transition: transform .3s; }
a:hover > .arrow, a:hover > span[aria-hidden] { transform: translateX(4px); display: inline-block; }
@media (orientation: landscape) { .hero__logo { width: min(640px, 48vw); } }
.hero__down { position: absolute; left: 50%; bottom: 26px; width: 44px; height: 44px; translate: -50% 0; display: grid; place-items: center; }
.hero__down span { width: 13px; height: 13px; border: solid rgba(255, 255, 255, .85); border-width: 0 2px 2px 0; rotate: 45deg; animation: bob 2.2s infinite; }
@keyframes bob { 50% { transform: translate(4px, 4px); } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

/* ---------- section heading ---------- */
.kicker {
  display: flex; align-items: baseline; gap: 14px; margin: 0 0 34px;
  font-size: var(--t-md); font-weight: 700; letter-spacing: .32em;
}
.kicker::before { content: ""; width: 9px; height: 9px; background: var(--seal); flex: none; translate: 0 -1px; }
.kicker span { font-weight: 400; font-style: italic; font-size: var(--t-lg); letter-spacing: .04em; opacity: .65; }
.kicker--light { color: #fff; }

.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 0 0 34px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.sec-head .kicker { margin: 0; }
.history .sec-head, .projects .sec-head { border-color: rgba(255, 255, 255, .22); }
.sec-link {
  display: inline-flex; align-items: center; gap: 12px; flex: none; text-decoration: none;
  font-size: var(--t-sm); letter-spacing: .22em; color: var(--ink-soft); transition: color .3s;
}
.sec-link i {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid currentColor; font-style: normal; font-size: var(--t-md); letter-spacing: 0;
  transition: background .3s, color .3s, border-color .3s, transform .3s;
}
.sec-link:hover { color: var(--ink); }
.sec-link:hover i { background: var(--seal); border-color: var(--seal); color: #fff; transform: translateX(3px); }
.sec-link--light { color: rgba(255, 255, 255, .78); }
.sec-link--light:hover { color: #fff; }
.visiting .sec-link:hover i { background: var(--paper); border-color: var(--paper); color: var(--seal-deep); }

/* ---------- history (kept) ---------- */
.history {
  color: #fff; padding: 110px 28px 120px;
  position: relative; overflow: hidden; background: #2a2927;
}
.history .plx { background: linear-gradient(rgba(14, 13, 12, .74), rgba(14, 13, 12, .74)), var(--block-img, var(--img-a, none)) center / cover no-repeat; }  /* a long text is read over this picture: the veil is deep */
.plx { position: absolute; inset: -90px 0; will-change: transform; }
.history__inner, .projects .wrap { position: relative; }
.js .clause { opacity: .3; transition: opacity .7s ease; }
.js .clause.is-lit { opacity: 1; }
.history__inner { max-width: 860px; margin: 0 auto; }
.history p { margin: 0; font-size: var(--t-h5); line-height: 2.05; text-align: justify; text-shadow: 0 1px 12px rgba(0, 0, 0, .5); }
.history__lead { margin-top: 34px !important; padding-top: 30px; border-top: 1px solid rgba(255, 255, 255, .28); }
.history__lead a { color: var(--gold); font-weight: 700; text-decoration: none; border-bottom: 1px solid transparent; transition: border-color .3s; }
.history__lead a:hover { border-color: var(--gold); }

/* ---------- projects (kept) ---------- */
.projects {
  padding: 100px 0 110px;
  position: relative; overflow: hidden; background: #5a4a40;
}
.projects .plx { background: linear-gradient(rgba(24, 18, 14, .5), rgba(24, 18, 14, .5)), var(--block-img, var(--img-b, none)) center / cover no-repeat; }
.rail__foot { position: relative; display: flex; justify-content: flex-end; }
.rail__ctl { display: flex; gap: 10px; }
.rail__ctl button {
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .55);
  background: rgba(20, 16, 13, .35); backdrop-filter: blur(6px); color: #fff;
  font: 20px/1 var(--serif); cursor: pointer; transition: background .3s, color .3s, opacity .3s;
}
.rail__ctl button:hover:not(:disabled) { background: var(--paper); color: var(--ink); }
.rail__ctl button:disabled { opacity: .3; cursor: default; }
.rail {
  --gutter: max(28px, calc((100vw - var(--wrap)) / 2 + 28px));
  position: relative; display: flex; gap: 32px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
  padding: 6px var(--gutter) 30px; scroll-padding-inline: var(--gutter);
  scrollbar-width: none; cursor: grab;
}
.rail::-webkit-scrollbar { display: none; }
.rail.is-dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.rail.is-dragging a { pointer-events: none; }
.rail .project { flex: 0 0 min(680px, 84vw); scroll-snap-align: start; }
.project { background: var(--paper); display: flex; flex-direction: column; box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .6); }
.project__img { display: block; overflow: hidden; aspect-ratio: 16 / 9; }
.project__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
.project:hover .project__img img { transform: scale(1.04); }
.project__body { padding: 28px 32px 32px; display: flex; flex-direction: column; flex: 1; }
.project h3 { margin: 0; font-size: var(--t-h3); letter-spacing: .1em; }
.project__en { margin: 0 0 14px; font-style: italic; color: var(--seal-deep); font-size: var(--t-body); }
.project p:not(.project__en) { margin: 0 0 22px; font-size: var(--t-md); line-height: 1.95; text-align: justify; color: var(--ink-soft); }
.project .more { margin-top: auto; }

.more {
  display: inline-flex; gap: 8px; align-self: flex-start; text-decoration: none;
  font-size: var(--t-md); letter-spacing: .08em; padding-bottom: 2px;
  border-bottom: 1px solid var(--seal); color: var(--seal-deep);
}
.more--light { color: var(--gold); border-color: var(--gold); }

/* ---------- events + news (added) ---------- */
.feed { padding: var(--sec) 0; }
.feed__grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 72px; }
.events, .news { list-style: none; margin: 0; padding: 0; }
.events li { display: grid; grid-template-columns: 74px 1fr; gap: 22px; padding: 20px 0; border-top: 1px solid var(--line); }
.events li:first-child, .news li:first-child { border-top: 0; padding-top: 4px; }
.events h3 a { text-decoration: none; background: linear-gradient(var(--seal), var(--seal)) 0 100% / 0 1px no-repeat; transition: background-size .35s; }
.events h3 a:hover { background-size: 100% 1px; }
.events time { text-align: center; line-height: 1.1; color: var(--seal-deep); font-size: var(--t-sm); letter-spacing: .1em; }
.events time b { font-size: var(--t-md); font-weight: 500; }
.events time i { display: block; font-style: normal; font-size: 38px; font-weight: 500; color: var(--ink); letter-spacing: 0; }
.events h3 { margin: 0 0 2px; font-size: var(--t-h5); line-height: 1.55; letter-spacing: .04em; }
.events p { margin: 0 0 6px; font-size: var(--t-md); color: var(--ink-soft); }
.tag { font-size: var(--t-label); letter-spacing: .2em; border: 1px solid var(--line); padding: 1px calc(8px - .2em) 1px 8px; color: var(--ink-soft); }  /* trailing letter-space does not count as padding */
.news li { display: grid; gap: 2px; padding: 17px 0; border-top: 1px solid var(--line); }
.news time { font-size: var(--t-sm); color: var(--seal-deep); letter-spacing: .08em; }
.news a { text-decoration: none; font-size: var(--t-body); line-height: 1.6; background: linear-gradient(var(--seal), var(--seal)) 0 100% / 0 1px no-repeat; transition: background-size .35s; }
.news a:hover { background-size: 100% 1px; }

/* ---------- visiting scholars (added) ---------- */
.visiting { background: var(--seal-deep); color: #fff; padding: var(--sec) 0; position: relative; overflow: hidden; }
.visiting::after {
  content: ""; position: absolute; right: -40px; bottom: -70px; width: 300px; height: 520px;
  background: var(--img-mark, none) center / contain no-repeat; filter: brightness(0); opacity: .13;
}
.visiting__grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 64px; position: relative; z-index: 1; }
.visiting__title { margin: 0; font-size: clamp(28px, 3.4vw, 42px); font-weight: 700; line-height: 1.5; letter-spacing: .12em; }
.visiting__body p { margin: 0 0 24px; font-size: var(--t-body); opacity: .92; text-align: justify; }
.visiting dl { margin: 0 0 32px; }
.visiting dl div { display: grid; grid-template-columns: 110px 1fr; padding: 11px 0; border-top: 1px solid rgba(255, 255, 255, .25); }
.visiting dl div:last-child { border-bottom: 1px solid rgba(255, 255, 255, .25); }
.visiting dt { letter-spacing: .2em; font-size: var(--t-md); color: var(--gold); }
.visiting dd { margin: 0; font-size: var(--t-lg); }
.btn {
  display: inline-flex; gap: 10px; margin-right: 26px; padding: 11px 26px;
  background: var(--paper); color: var(--ink); text-decoration: none; letter-spacing: .16em; font-weight: 700; font-size: var(--t-md);
  transition: background .3s, color .3s;
}
.btn:hover { background: var(--ink); color: var(--paper); }

/* ---------- footer (kept + extended) ---------- */
.footer { background: var(--ink); color: rgba(243, 238, 230, .82); padding: 64px 0 26px; font-size: var(--t-md); }
.footer__grid { display: grid; grid-template-columns: 1.3fr 1.3fr .8fr; gap: 48px; align-items: start; }
.footer__brand { display: flex; gap: 16px; align-items: flex-start; }
.footer__brand strong { display: block; color: #fff; font-size: var(--t-h5); letter-spacing: .1em; line-height: 1.6; }
.footer__brand span { font-style: italic; font-size: var(--t-sm); opacity: .7; }
.footer address { font-style: normal; line-height: 2; }
.footer__links { display: grid; gap: 6px; }
.footer__links a { text-decoration: none; opacity: .82; }
.footer__links a:hover { opacity: 1; color: var(--gold); }
.footer__parent { display: block; margin-top: 4px; }
.hero__title { margin: 0; font: inherit; line-height: 0; }  /* the logo is the page's heading */
.footer__copy { margin: 48px 0 0; padding: 20px 20px 0; border-top: 1px solid rgba(255, 255, 255, .12); text-align: center; font-size: var(--t-xs); opacity: .55; }

.js [data-reveal] { opacity: 0; transform: translate3d(0, 34px, 0); transition: opacity .9s cubic-bezier(.2, .7, .2, 1), transform .9s cubic-bezier(.2, .7, .2, 1); }
.js [data-reveal="zoom"] { transform: translate3d(0, 40px, 0) scale(.95); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.visiting .kicker::before { background: var(--gold); }

:focus-visible { outline: 2px solid var(--seal); outline-offset: 3px; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .nav { padding-inline: 18px; }
  .nav__brand { opacity: 1; }
  .nav { background: rgba(243, 238, 230, .96); box-shadow: 0 1px 0 var(--line); padding-block: 8px; }
  .nav__toggle {
    display: block; font: inherit; font-size: var(--t-sm); letter-spacing: .2em;
    background: none; border: 1px solid var(--ink); color: var(--ink); padding: 5px 14px; cursor: pointer;
  }
  .nav__menu {
    position: absolute; top: 100%; left: 0; right: 0; display: none; flex-direction: column; align-items: stretch;
    background: var(--paper); padding: 8px 18px 20px; box-shadow: 0 12px 24px -12px rgba(0, 0, 0, .3);
  }
  .nav--open .nav__menu { display: flex; }
  .nav__menu a { padding: 13px 4px; border-bottom: 1px solid var(--line); font-size: var(--t-body); }
  .nav__menu a::after { display: none; }
  .nav__langs { margin: 16px 0 0; align-self: flex-start; }
  .nav__menu .nav__lang { padding: 6px 16px; border-bottom: 0; }
}
@media (max-width: 820px) {
  body { font-size: var(--t-lg); }
  .wrap { padding: 0 20px; }
  .nav__name small { display: none; }
  .hero { align-items: flex-start; }
  .hero__bg { background-position: 24% center; }
  .hero__inner { padding-top: 22vh; }
  .hero__logo { margin-left: -10px; }
  .feed__grid, .visiting__grid, .footer__grid { grid-template-columns: 1fr; }
  .history { padding: 72px 20px 80px; }
  .history p { font-size: var(--t-lg); text-align: left; }
  .projects, .feed, .visiting { padding-block: 68px; }
  .feed__grid { gap: 60px; }
  .visiting__grid { gap: 30px; }
  .project__body { padding: 22px 22px 26px; }
  .rail { --gutter: 20px; gap: 18px; }
  .btn { margin-bottom: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js [data-reveal], .js .clause { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* text fallback when no logo banner is uploaded */
.hero__title { margin: 0; font-size: clamp(34px, 5vw, 64px); letter-spacing: .14em; line-height: 1.3; animation: rise 1.1s .15s both cubic-bezier(.2, .7, .2, 1); }
.hero__title small { display: block; font-size: .3em; font-weight: 500; letter-spacing: .2em; margin-bottom: .6em; }
.hero__title span { display: block; font-size: .4em; font-weight: 400; font-style: italic; letter-spacing: .03em; margin-top: .3em; }

/* ---------- free text block (home) ---------- */
.textblock { padding: var(--sec) 0; }
.textblock--dark { background: var(--ink); color: var(--paper); }
.textblock--accent { background: var(--seal-deep); color: #fff; }
.textblock__grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 64px; }
.textblock__title { margin: 0; font-size: clamp(26px, 3vw, 38px); letter-spacing: .12em; line-height: 1.5; }
.textblock__title span { display: block; margin-top: 6px; font-size: .5em; font-weight: 400; font-style: italic; letter-spacing: .03em; opacity: .7; }
.textblock__body p { margin: 0 0 1.1em; text-align: justify; }
.textblock__body ul { padding-left: 1.2em; margin: 0 0 1.1em; }
.textblock__body .btn { margin-top: 10px; }
.textblock--light .btn { background: var(--ink); color: var(--paper); }
.textblock--light .btn:hover { background: var(--seal-deep); }
.textblock .steps li { border-color: currentColor; }
@media (max-width: 820px) { .textblock__grid { grid-template-columns: 1fr; gap: 22px; } }

/* ---------- layout blocks: variants + new layouts ---------- */
.project h3 a { text-decoration: none; }
.visiting--dark { background: var(--ink); }
.visiting--light { background: var(--paper-deep); color: var(--ink); }
.visiting--light dl div { border-color: var(--line); }
.visiting--light dt { color: var(--seal-deep); }
.visiting--light .btn { background: var(--ink); color: var(--paper); }
.visiting--light::after { filter: none; opacity: .08; }
.mediablock { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.mediablock--right .mediablock__img { order: 2; }
.mediablock__img { overflow: hidden; box-shadow: 0 24px 50px -28px rgba(0, 0, 0, .55); }
.mediablock__img img { width: 100%; }
.mediablock .textblock__title { margin-bottom: 22px; }
.statsblock { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 36px 28px; }
.statsblock div { display: grid; gap: 4px; padding-top: 18px; border-top: 1px solid currentColor; }
.statsblock b { font-size: clamp(38px, 5vw, 60px); font-weight: 500; line-height: 1.1; }
.statsblock span { font-size: var(--t-sm); letter-spacing: .16em; opacity: .75; }
.textblock--dark .statsblock b, .textblock--accent .statsblock b { color: var(--gold); }
@media (max-width: 820px) { .mediablock { grid-template-columns: 1fr; gap: 26px; } .mediablock--right .mediablock__img { order: 0; } }

/* ---------- announcements (several, link optional) ---------- */
.hero__spots { display: grid; gap: 8px; justify-items: start; margin-top: 8px; }
.hero__spots .hero__spot { margin: 0; }
.hero__spot--plain { padding-right: 18px; cursor: default; }
.hero__spot--plain:hover { background: rgba(243, 238, 230, .82); }
.hero__spots .hero__spot:nth-child(2) { animation-delay: .6s; }
.hero__spots .hero__spot:nth-child(n+3) { animation-delay: .75s; }

/* ---------- list block: heading left, one list right ---------- */
.listblock__grid { display: grid; grid-template-columns: 1fr 1.9fr; gap: 72px; align-items: start; }
.listblock__head { position: sticky; top: 112px; }
.listblock__intro { margin: 18px 0 0; color: inherit; opacity: .78; }
.listblock__head .sec-link { margin-top: 28px; }
.listblock__rows > :first-child > li:first-child { border-top: 0; padding-top: 4px; }
@media (max-width: 820px) { .listblock__grid { grid-template-columns: 1fr; gap: 26px; } .listblock__head { position: static; } }
/* ---------- columns block ---------- */
.feed--dark { background: var(--ink); color: var(--paper); }
.feed--accent { background: var(--seal-deep); color: #fff; }
.feed--dark .sec-head, .feed--accent .sec-head, .feed--dark li, .feed--accent li { border-color: rgba(255, 255, 255, .2); }
.feed--dark time, .feed--accent time, .feed--dark .events time i, .feed--accent .events time i { color: var(--gold); }
.feed--dark small, .feed--accent small, .feed--dark .events p, .feed--accent .events p, .feed--dark .tag, .feed--accent .tag { color: inherit; opacity: .75; }
.feed__grid--1 { grid-template-columns: minmax(0, 760px); }
.feed__grid--3 { grid-template-columns: repeat(3, 1fr); gap: 48px; }
.news__title { font-size: var(--t-body); line-height: 1.6; }
.news__title a { text-decoration: none; background: linear-gradient(var(--seal), var(--seal)) 0 100% / 0 1px no-repeat; transition: background-size .35s; }
.news__title a:hover { background-size: 100% 1px; }
.news small { font-size: var(--t-sm); color: var(--ink-soft); }
@media (max-width: 1080px) { .feed__grid--3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 820px) { .feed__grid--3 { grid-template-columns: 1fr; } }

/* ---------- logo mark sizing (uploaded image, any dimensions) ---------- */
.nav__brand img { height: 38px; width: auto; flex: none; }
.footer__brand img { height: 52px; width: auto; flex: none; }
.nav__brand { min-width: 0; }
.nav__name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav__toggle { white-space: nowrap; flex: none; }
@media (max-width: 820px) {
  .nav__brand img { height: 32px; }
  .nav__name { font-size: var(--t-md); letter-spacing: .04em; }
}

/* ---------- mobile / portrait refinements ---------- */
@media (max-width: 820px) {
  .sec-head { flex-wrap: wrap; row-gap: 10px; }
  .kicker { letter-spacing: .22em; }
  .hero__spot { font-size: var(--t-md); letter-spacing: .04em; gap: 10px; max-width: 100%; }
  .hero__spot > span:nth-child(2) { min-width: 0; }
  .events li { grid-template-columns: 58px 1fr; gap: 16px; }
  .events time i { font-size: var(--t-h2); }
  .events h3 { font-size: var(--t-body); }
  .visiting__title { font-size: var(--t-h2); }
  .visiting dl div { grid-template-columns: 92px 1fr; }
  .btn { padding: 11px 22px; }
  .footer { padding-top: 48px; }
  .footer__grid { gap: 30px; }
  .footer__links a { padding: 4px 0; }
  .rail .project { flex-basis: 86vw; }
  .statsblock { grid-template-columns: repeat(2, 1fr); gap: 26px 20px; }
}
/* tall, narrow screens: keep the logo block in the upper third, over the plain wall */
@media (max-width: 820px) and (orientation: portrait) {
  .hero__inner { padding-top: 20svh; }
  .hero__logo { width: min(520px, 92vw); margin-left: -8px; }
}
/* portrait tablets: two-up lists still fit */
@media (min-width: 640px) and (max-width: 820px) {
  .feed__grid--2 { grid-template-columns: 1fr 1fr; gap: 40px; }
}

/* Full-page captures (print-to-image, very tall windows): keep the hero a sane height. */
@media (min-height: 3000px) { .hero { height: 850px; position: relative; } }

/* ---------- step list (shared by pages and blocks) ---------- */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: 0; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 56px 1fr; gap: 18px; padding: 18px 0; border-top: 1px solid var(--rule, var(--line)); }
.steps li:last-child { border-bottom: 1px solid var(--rule, var(--line)); }
.steps li::before { content: counter(step, cjk-ideographic); font-size: var(--t-h3); line-height: 1.3; color: var(--mark, var(--seal-deep)); }
.steps strong { display: block; letter-spacing: .1em; }
.steps span { font-size: var(--t-md); opacity: .8; }
.textblock__body .steps, .textblock__body ul { margin-bottom: 1.4em; }

/* ---------- tone system: every block declares its tone; colours follow from it ---------- */
[data-tone="dark"], [data-tone="accent"], [data-tone="image"] { --rule: rgba(255, 255, 255, .22); --mark: var(--gold); --soft: rgba(255, 255, 255, .72); }
[data-tone="light"] { --rule: var(--line); --mark: var(--seal-deep); --soft: var(--ink-soft); }
[data-tone] .kicker::before { background: var(--seal); }
[data-tone="accent"] .kicker::before { background: var(--gold); }
[data-tone] .sec-head, [data-tone] .events li, [data-tone] .news li { border-color: var(--rule); }
[data-tone] .news small, [data-tone] .events p, [data-tone] .news time, [data-tone] .events time { color: var(--soft); }
[data-tone] .news time, [data-tone] .events time, [data-tone] .events time i { color: var(--mark); }
[data-tone="light"] .events time i { color: var(--ink); }
[data-tone] .tag { border-color: var(--rule); color: var(--soft); opacity: 1; }
[data-tone="dark"] .news__title a, [data-tone="accent"] .news__title a, [data-tone="dark"] .events h3 a, [data-tone="accent"] .events h3 a { background-image: linear-gradient(var(--gold), var(--gold)); }
[data-tone="dark"] .sec-link, [data-tone="accent"] .sec-link { color: rgba(255, 255, 255, .78); }
[data-tone="dark"] .sec-link:hover, [data-tone="accent"] .sec-link:hover { color: #fff; }
[data-tone="accent"] .sec-link:hover i { background: var(--paper); border-color: var(--paper); color: var(--seal-deep); }
[data-tone="dark"] .empty, [data-tone="accent"] .empty { color: var(--soft); }
/* two neighbours of the same tone need a seam, or they read as one block */
[data-tone="light"] + [data-tone="light"], [data-tone="dark"] + [data-tone="dark"], [data-tone="accent"] + [data-tone="accent"] { border-top: 1px solid var(--rule); }
.visiting--light .kicker::before { background: var(--seal); }

/* ---------- columns block heading ---------- */
.blocktitle { margin: 0 0 46px; font-size: clamp(26px, 3vw, 38px); letter-spacing: .12em; line-height: 1.5; }
.blocktitle span { display: block; margin-top: 4px; font-size: .5em; font-weight: 400; font-style: italic; letter-spacing: .03em; opacity: .7; }
.feed { padding: var(--sec) 0; }
@media (max-width: 820px) { .blocktitle { margin-bottom: 30px; } }

.project__role { margin: -6px 0 12px !important; font-size: var(--t-md) !important; color: var(--seal-deep) !important; letter-spacing: .04em; text-align: left !important; }
.project__body > :last-child { margin-bottom: 0; }

/* short pages: keep the footer at the bottom of the window */
body { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; }

/* ---------- long text preview on narrow screens ---------- */
.longtext.is-collapsible:not(.is-open) { max-height: 400px; overflow: hidden; -webkit-mask-image: linear-gradient(#000 62%, transparent); mask-image: linear-gradient(#000 62%, transparent); }
.longtext__more { margin-top: 18px; padding: 9px 22px; font: inherit; font-size: var(--t-sm); letter-spacing: .18em; color: #fff; background: none; border: 1px solid rgba(255, 255, 255, .6); cursor: pointer; transition: background .3s, color .3s; }
.longtext__more:hover { background: #fff; color: var(--ink); }
.longtext__more[hidden] { display: none; }
.longtext.is-collapsible:not(.is-open) .clause { opacity: 1; }

/* ---------- portrait tablets: two-up list headers stay on one line and align ---------- */
@media (min-width: 640px) and (max-width: 1080px) {
  .feed .sec-head { flex-wrap: nowrap; }
  .feed .kicker { letter-spacing: .18em; white-space: nowrap; }
  .feed .kicker span { display: none; }
  .feed .sec-link { letter-spacing: .1em; gap: 8px; white-space: nowrap; }
}

/* event rows: time and place on their own line */
.events p.event__where { margin-top: -2px; font-size: var(--t-sm); letter-spacing: .04em; }
.events p.event__where::before { content: ""; display: inline-block; width: 14px; height: 1px; margin-right: 10px; vertical-align: middle; background: var(--seal); }
/* an event row looks the same wherever it is listed (home, events page, a block on any page), so its rules live here */
.events h3 small { display: block; margin-top: 2px; font-size: var(--t-md); font-weight: 400; font-style: italic; letter-spacing: .01em; line-height: 1.5; color: var(--seal-deep); }
.tags { display: inline-flex; flex-wrap: wrap; gap: 6px; }
/* tags and the details link share one row, centred on each other; on narrow screens the link takes the next line */
.event__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; margin-top: 8px; }
.event__more { display: inline-flex; align-items: center; font-size: var(--t-xs); letter-spacing: .12em; color: var(--ink-soft); text-decoration: none; white-space: nowrap; }
.event__more i { font-style: normal; margin-left: 6px; display: inline-block; transition: transform .3s; color: var(--seal); }
.event__more:hover { color: var(--seal-deep); }
.event__more:hover i { transform: translateX(4px); }
.event__aff { display: block; font-size: var(--t-sm); color: var(--ink-soft); }
.feed--dark .event__more, .feed--accent .event__more, .feed--dark .event__aff, .feed--accent .event__aff { color: inherit; opacity: .75; }
@media (max-width: 900px) {
  .event__more { flex-basis: 100%; margin-top: 2px; }
}
.hero__spot-tag { white-space: nowrap; flex: none; align-self: flex-start; }  /* a long announcement must not squeeze the tag into a column */
.page-head__lead, .listblock__intro { text-wrap: balance; }
