@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@100..900&display=swap');
:root {
  --paper: #fbf8ef;
  --deep: #2c2c2c;
  --ink: #333333;
  --muted: #555555;
  --rule: #c9cbb9;
  --accent: #986338;
  --head: 45px;
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 1.1em;
  line-height: 1.65;
}

* {
  box-sizing: border-box
}

html {
  scroll-padding-top: var(--head)
}

body,
h1,
h2,
h3,
h4,
p,
figure,
ol,
dl,
dd {
  margin: 0
}

body {
  min-width: 0
}

button,
summary,
a {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation
}

button,
select {
  font: inherit
}

button,
a,
summary {
  color: inherit
}

a {
  text-decoration: none
}

button:not(:disabled),
summary {
  cursor: pointer
}

button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid #ffb640;
  outline-offset: 4px
}

button {
  border: 0;
  background: none
}

svg {
  width: 1.25em;
  height: 1.25em;
  flex: none
}

[hidden] {
  display: none !important
}

.skip,
.sr {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  white-space: nowrap
}

.skip:focus {
  clip-path: none;
  position: fixed;
  top: 12px;
  left: 12px;
  width: auto;
  height: auto;
  padding: 10px 18px;
  background: white;
  z-index: 90
}

/* Responsive masthead and entrance portraits. */
.mast {
  position: absolute;
  inset: 0 0 auto;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: clamp(1rem, 1.8vw, 2rem);
  padding: clamp(18px, 2.25vh, 34px) 6vw;
  color: #fff;
  background: transparent;
}

.wordmark {
  flex: none;
  color: #fff;
  font-family: inherit;
  font-size: clamp(52px, 7vw, 108px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: .005em;
  white-space: nowrap;
  text-shadow: 0 1px 3px #16231ce0, 0 2px 12px #16231c99;
}

.wide-menu,
.header-tools,
.mobile-menu summary {
  display: flex;
  align-items: center
}

.wide-menu {
  margin-left: auto;
  gap: clamp(.9rem, 1.4vw, 28px)
}

.wide-menu a,
.mobile-menu summary {
  color: #fff;
  white-space: nowrap;
  line-height: 1.45;
  font-weight: 500;
  letter-spacing: .06em;
  text-shadow: 0 1px 6px #000c;
}

.wide-menu a svg,
.mobile-menu a svg,
.catalog-menu a svg {
  width: .83em;
  height: .83em
}

.mast a:not(.wordmark):hover,
.mast a:not(.wordmark)[aria-current],
.mobile-menu summary:hover {
  color: #f2d68c
}

.mast.is-scrolled {
  position: fixed;
  height: var(--head);
  padding: 0 6vw;
  background: rgba(20, 20, 20, .92);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 18px #0003;
}

.mast.is-scrolled .wordmark {
  font-size: 22px;
  letter-spacing: .04em;
  font-weight: 600;
  text-shadow: none
  
}

.mast.is-scrolled .wide-menu a {
  font-size: .9rem;
  text-shadow: none
}

.mobile-menu {
  display: none
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: .5em;
  border-radius: 3px;
  font-weight: 700
}

.line:hover {
  background: #285947
}

main {
  overflow: clip
}

.opening,
.exhibit {
  position: relative;
  isolation: isolate
}

.entrance-view,
.painting {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 555px;
  isolation: isolate;
  overflow: hidden;
  color: white
}

.entrance-view {
  display: grid;
  align-items: center;
  background: #547a51
}

.gate,
.gate-tint,
.painting-image,
.painting-film,
.painting::after {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%
}

.gate,
.painting-image,
.painting-film {
  object-fit: cover
}

.gate-scene {
  position: absolute;
  inset: 0;
  z-index: -3;
  pointer-events: none
}

.gate {
  object-position: 51% 53%;
  transform-origin: 50% 55%
}

.gate-tint {
  z-index: -2
}

.entrance-layout {
  position: relative;
  width: 100%;
  height: 100%
}

.catalog {
  position: absolute;
  left: 6.5%;
  top: 48%;
  transform: translateY(-50%);
  z-index: 2;
  width: clamp(320px, 38vw, 660px);
  border: 1px solid #f3e2b799;
  padding: clamp(1.8rem, 4.5vw, 3.8rem);
  background: #f5daafe8;
  color: #634200;
  border-radius: 2em;
}

.faculty {
  --plate-bottom: clamp(54px, 11svh, 120px);
  position: absolute;
  right: 2.5%;
  bottom: 0;
  width: 44%;
  height: 79%;
  text-align: center;
}

.faculty-pictures,
.prof {
  width: 100%;
  height: 100%
}

.prof img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: 50% bottom;
  transform-origin: 50% bottom;
  filter: drop-shadow(1px 0 3px #24352932);
  pointer-events: none;
}

.prof figcaption {
  position: absolute;
  bottom: var(--plate-bottom);
  right: 0;
  display: grid;
  justify-items: center;
  width: clamp(240px, 21.5vw, 440px);
  padding: clamp(.65rem, 1.1vw, 1.25rem) .65rem;
  color: #293f34;
  line-height: 1.45;
  background: #fbf6e8f7;
  border: 1px solid #b4a78b;
  box-shadow: 0 1px 0 2px #fff8 inset, 0 3px 12px #392b1e27;
}

.prof figcaption:before {
  content: "";
  position: absolute;
  top: -1px;
  left: 39%;
  width: 22%;
  height: 2px;
  background: #b45d38
}

.prof figcaption strong {
  font-size: clamp(1.35rem, 1.9vw, 2.45rem);
  line-height: 1.3
}

.prof figcaption small {
  font-size: .72em;
  font-weight: 550
}

.prof figcaption>span {
  color: #4b584b;
  font-size: clamp(1rem, 1.22vw, 1.5rem)
}

.prof.enter {
  animation: portrait-arrives .45s ease-out
}

@keyframes portrait-arrives {
  from {
    opacity: 0
  }

  to {
    opacity: 1
  }
}

.faculty-controls {
  position: absolute;
  right: 0;
  bottom: var(--plate-bottom);
  transform: translateY(100%);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #223a31f2;
  color: #fff8e5;
  border: 1px solid #e5d7b880;
  border-top: 0;
}

.faculty-controls button {
  display: grid;
  place-items: center;
  color: inherit;
  min-width: 43px;
  height: 38px;
  padding: 0
}

.faculty-controls button:hover {
  background: #ffffff25
}

.faculty-controls button svg {
  width: 17px;
  height: 17px
}

.motion .catalog {
  transform: translate3d(calc(-1vw * var(--gate-progress)), calc(-50% - 4svh * var(--gate-progress)), 0)
}

.motion .prof img {
  transform: translateX(calc(.8vw * var(--gate-progress))) scale(calc(1 + .045 * var(--gate-progress)))
}

.catalog-caption {
  display: flex;
  align-items: center;
  gap: .65rem;
  letter-spacing: .18em;
  font-weight: 650
}

.catalog-caption .mini-book {
  line-height: 0
}

.catalog-caption .mini-book svg {
  width: 1.17em
}

.catalog-caption i {
  width: 2.5rem;
  border-top: 1px solid currentColor
}

h1 {
  font-size: clamp(2.7rem, 4.26vw, 4.45rem);
  line-height: 1.11;
  letter-spacing: .005em;
  font-weight: 780;
  margin: 1rem 0rem
}

h1 span {
  display: block;
  font-weight: 600;
  font-size: .72em;
  line-height: 1.27
}

h1 em {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: 1.22em;
  letter-spacing: .015em
}

.catalog>p {
  letter-spacing: .02em
}

.catalog-menu {
  border-top: 1px solid #63420055;
  margin-top: clamp(1.1rem, 2vw, 2rem);
  padding-top: .55rem
}

@media (min-width:741px) {
  .catalog-menu {
    display: grid;
    grid-template-columns: minmax(max-content, .8fr) minmax(0, 1.2fr);
    gap: .15rem clamp(.5rem, 1.2vw, 1.25rem);
  }
}

.catalog-menu a {
  display: flex;
  align-items: center;
  gap: .35em;
  min-height: 32px;
  line-height: 1.25;
  font-weight: 650;
  padding: .22rem 0;
}

.catalog-menu a svg {
  flex: none;
  width: .95em;
  height: .95em;
  padding: .1em;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.catalog-menu a:hover,
.catalog-menu a:focus-visible {
  color: #462a00;
  text-decoration: underline;
  text-underline-offset: .18em
}

.catalog-menu a:focus-visible {
  outline-color: #634200
}

.faculty-controls span {
  font-family: Georgia, serif;
  letter-spacing: .09em;
  min-width: 48px
}

.faculty-controls button[data-play] {
  border-left: 1px solid #fff4
}

.scroll-cue {
  position: absolute;
  left: 4.1vw;
  bottom: 3vh;
  display: flex;
  gap: .55rem;
  align-items: center;
  color: white;
  font-weight: 650;
  text-shadow: 0 1px 6px #101b0f
}

.scroll-cue svg {
  border: 1px solid #fff9;
  border-radius: 100px;
  width: 27px;
  height: 37px;
  padding: 5px
}

.painting {
  position: sticky;
  top: var(--head);
  height: calc(100vh - var(--head));
  height: calc(100svh - var(--head));
  min-height: 0;
  display: flex;
  align-items: center;
  background: #697657;
  z-index: 0;
}

.painting picture {
  display: contents
}

.painting-film {
  pointer-events: none;
  opacity: 0
}

.painting-film.on-canvas {
  opacity: 1
}

.painting-image,
.painting-film {
  object-position: var(--focus-x, 55%) var(--focus-y, 34%);
  z-index: -2
}

.painting::after {
  content: "";
  background: linear-gradient(90deg, #1b211bd9 0%, #28291f98 29%, #37342a22 62%, transparent 79%), linear-gradient(0deg, #17191065, transparent 18%);
  z-index: -1
}

/* Anchor every gallery heading to its painting, independent of the description length. */
.paint-copy {
  position: relative;
  align-self: flex-start;
  top: clamp(2rem, 11.5svh, 8.5rem);
  margin-left: max(7vw, calc((100vw - 1440px)/2));
  max-width: 58%;
}

.room-kicker,
.artist {
  display: flex;
  align-items: center;
  gap: .72rem;
  font-size: 1rem;
  letter-spacing: .14em
}

.room-kicker i,
.artist i {
  width: 2.3rem;
  height: 1px;
  background: currentColor
}

.room-kicker {
  color: #ffead0
}

.paint-copy h2 {
  font-size: clamp(3.1rem, 6.55vw, 7.5rem);
  line-height: 1.15;
  letter-spacing: .01em;
  margin: 1.1rem 0 1.55rem;
  font-weight: 790;
  color: #fffaf1
}

.paint-copy h2 .title-main {
  display: block;
  font-weight: inherit
}

.paint-copy h2 span {
  display: block;
  font-size: .46em;
  font-weight: 590;
  line-height: 1.55;
  letter-spacing: .04em
}

.paint-desc {
  max-width: 30rem;
  color: #fff9ef;
  font-weight: 500
}

.artist {
  position: absolute;
  right: 4vw;
  bottom: 4vh;
  font-weight: 650;
  background: #13271ebf;
  padding: .35rem .65rem;
  letter-spacing: .04em
}

.artist i {
  width: 1.05rem
}

/* The artwork stays on the wall while the following paper scrolls over it. */
.exhibit>.content,
.exhibit>.test-area {
  position: relative;
  z-index: 1
}

.exhibit>.paper {
  background: rgba(255, 233, 218, 0.9)
}

.exhibit>.course-body {
  width: 95%;
  margin-inline: auto;
  padding-inline: clamp(1.2rem, 8vw, 5rem);
  background: #ffffffeb;
  border-radius: 2em;
}

.exhibit>.content {
  margin-top: clamp(52px, 12svh, 136px)
}

.motion .opening {
  --gate-progress: 0;
  height: 158vh;
  height: 158svh
}

.motion .entrance-view {
  position: sticky;
  top: 0
}

.motion .gate {
  transform: translate3d(0, calc(-2.4svh * var(--gate-progress)), 0) scale(calc(1 + .12 * var(--gate-progress)));
}

.motion #lectures>.content {
  margin-top: clamp(120px, 30svh, 300px)
}

.lecture-subject,
.lecture-room,
.lecture-desk {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%
}

.lecture-subject {
  z-index: -2;
  transform-origin: var(--focus-x, 74%) 80%
}

.lecture-desk {
  z-index: -2;
  visibility: hidden;
  pointer-events: none
}

.lecture-room {
  object-fit: cover;
  object-position: var(--focus-x, 55%) var(--focus-y, 34%);
  z-index: -3;
  visibility: hidden
}

.motion #lectures .painting {
  --approach: 1
}

.motion .lecture-subject {
  transform: scale(calc(1 + .035 * var(--approach)))
}

.motion .depth-ready .lecture-room,
.motion .depth-ready .lecture-desk {
  visibility: visible;
  transform: translate3d(0, calc(-3.4% * var(--approach)), 0) scale(calc(1 + .09 * var(--approach)));
}

.motion .depth-ready .lecture-desk {
  background: var(--room-art) var(--focus-x, 55%) var(--focus-y, 34%) / cover no-repeat;
  -webkit-mask: var(--desk-matte) var(--focus-x, 55%) var(--focus-y, 34%) / cover no-repeat;
  mask: var(--desk-matte) var(--focus-x, 55%) var(--focus-y, 34%) / cover no-repeat;
}

.motion .depth-ready .lecture-subject {
  -webkit-mask: var(--portrait-matte) var(--focus-x, 55%) var(--focus-y, 34%) / cover no-repeat;
  mask: var(--portrait-matte) var(--focus-x, 55%) var(--focus-y, 34%) / cover no-repeat;
  transform: translate3d(0, calc(3.8% * var(--approach)), 0) scale(calc(1 + .018 * var(--approach)));
}

.motion .painting::after {
  opacity: 0;
  transition: opacity .68s ease-out .22s
}

.motion .painting.is-present::after {
  opacity: 1
}

.motion .painting .paint-copy>p,
.motion .painting .artist,
.motion .painting h2>* {
  opacity: 0;
  transform: translateY(20px)
}

.motion .painting.is-present .paint-copy>p,
.motion .painting.is-present .artist,
.motion .painting.is-present h2>* {
  opacity: 1;
  transform: none;
  transition: opacity .55s ease-out, transform .68s cubic-bezier(.16, 1, .3, 1);
}

.motion .painting.is-present .room-kicker {
  transition-delay: .25s
}

.motion .painting.is-present h2>span {
  transition-delay: .43s
}

.motion .painting.is-present h2>.title-main {
  transition-delay: .63s
}

.motion .painting.is-present .paint-desc,
.motion .painting.is-present .artist {
  transition-delay: .8s
}

.content,
.test-area {
  position: relative
}

.sheet {
  width: 85%;
  margin: 0 auto;
  padding: clamp(3rem, 6.5vw, 6.5rem) 0
}

.heading-row {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1.7rem
}

.content :is(h3, h4),
.test-intro h2,
.subject summary strong {
  color: var(--deep)
}

.heading-row h3 {
  font-size: clamp(1.7rem, 3vw, 3.15rem);
  font-weight:800;
  line-height: 1.28;
      color: #fede0c;
    text-shadow: 0 0.15em 0px #652609, 0.01em -0.03em 0 #652609, 0.08em 0.005em 0 #652609, 0em 0.08em 0 #652609, 0.05em 0.08em 0 #652609, 0px -0.05em 0 #652609, -0.06em -0.05em 0 #652609, -0.08em 0.08em 0 #652609, -0.09em 0 0 #652609;

}
.heading-row h3 span {
  color: #fff;
}
.heading-row h3 img {
  width:45%;
}
.heading-row>span,
.category {
  color: var(--muted);
  white-space: nowrap
}

.talk-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.7rem, 12vw, 5rem)
}

.video-slot {
  background: #e5ddc8;
  position: relative;
  aspect-ratio: 16/9;
  border: 1px solid #beb49a;
  overflow: hidden
}

.video-slot img,
.video-slot iframe {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
  display: block
}

.video-slot span {
  position: absolute;
  bottom: 12px;
  left: 12px;
  padding: .28rem .75rem;
  background: #1b3229dd;
  color: #fff9e9
}

.lecture-play {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  display: grid;
  place-items: center;
  background: transparent;
  cursor: pointer;
}

.lecture-play::before,
.lecture-play::after {
  content: "";
  grid-area: 1 / 1
}

.lecture-play::before {
  width: 3.3rem;
  height: 2.3rem;
  border-radius: .65rem;
  background: #bd211b
}

.lecture-play::after {
  margin-left: .16rem;
  border-style: solid;
  border-width: .48rem 0 .48rem .8rem;
  border-color: transparent transparent transparent #fff;
}

.lecture-play:focus-visible {
  outline: 3px solid white;
  outline-offset: -5px
}

@keyframes lecture-entry {
  from {
    opacity: 0;
    transform: translateY(24px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

@media screen and (prefers-reduced-motion:no-preference) {
  .video-slot[data-entrance="waiting"]:not(:focus-within) {
    opacity: 0
  }

  .video-slot[data-entrance="shown"] {
    animation: lecture-entry .65s cubic-bezier(.22, .72, .28, 1) var(--entry-delay, 0s) backwards;
  }
}

@media(min-width:741px) {
  .talk-huang .video-slot {
    --entry-delay: .12s
  }
}

.talk {
  container-type: inline-size
}

.talk-meta {
  margin: clamp(1.15rem, 5cqi, 2rem) 0 clamp(.6rem, 2cqi, .85rem);
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .25rem .75rem;
  color: var(--muted);
}

.talk-meta b {
  color: var(--accent);
  font-size: clamp(1.65rem, 5.6cqi, 2.25rem);
  line-height: 1.25
}

.talk-meta span {
  font-size: 1rem;
  white-space: nowrap
}

.talk h4,
.offer-grid h4 {
  font-size: clamp(1.2rem, 1.5vw, 1.6rem);
  line-height: 1.38;
  font-weight: 600
}

.talk h4 {
  font-size: clamp(1.3rem, 4.55cqi, 1.9rem)
}

.talk ol {
  padding-left: 1.6em;
  margin: 1rem 0 0
}

.talk li {
  padding-left: .2em;
  margin: .26rem 0
}

li::marker {
  color: #8a5039
}

.action-row {
  display: flex;
  justify-content: center;
  align-items: start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2.7rem
}

.button {
  padding: 1rem 2rem;
  min-height: 48px;
  line-height: 1.5;
  max-width: 100%;
  text-align: center
}

.line {
  color: #fff;
  background: #0c7156;
  font-size: 1.6em;
  border-radius: 2em
}

.line-label {
  min-width: 0;
  text-wrap: balance
}

.line-label>span {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere
}

@media(max-width:480px) {
  .line {
  color: #fff;
  background: #0c7156;
  font-size: 1.15em;
  border-radius: 2em
}
  .button.line {
    gap: .25em
  }

  .button.line svg {
    width: 1em;
    height: 1em
  }
}

@media(max-width:360px) {
  .button.line svg {
    display: none
  }
}

.test-area {
  background: #f5f5ef;
  border-block: 1px solid #c6cec3
}

.test-layout {
  width: 96%;
  margin-inline: auto;
  display: grid;
  gap: clamp(1rem, 2vw, 2rem);
}

.test-intro {
  padding-inline: clamp(.5rem, 2vw, 2rem);
}

.category {
  color: var(--accent);
  font-weight: 700;
  letter-spacing: .08em;
  margin-bottom: .65rem
}

.test-intro .category {
  white-space: normal
}

.test-intro h2 {
  font-size: clamp(1.7rem, 3.15vw, 3.5rem);
  line-height: 1.22
}

.test-intro h2 span,
.test-intro .category span {
  display: inline-block
}

.city-picker {
  margin-top: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: .45rem
}

.city-picker button {
  min-width: 5rem
}

.city-picker button,
.city-controls button {
  border: 1px solid #a3b1a7;
  color: var(--deep);
  min-height: 44px;
  border-radius: 2px;
  padding: .45rem .65rem;
}

.city-picker button[aria-pressed="true"] {
  background: var(--deep);
  border-color: var(--deep);
  color: white;
  font-weight: 700
}

.city-picker button:hover:not([aria-pressed="true"]),
.city-controls button:hover {
  background: #dde7dc
}

.city-carousel {
  min-width: 0
}

.city-track {
  --city-count: 3;
  position: relative;
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  border: 1px solid #aab6aa;
}

.city-track:focus-visible {
  outline: 3px solid #c67638;
  outline-offset: 3px
}

.city-track.is-ready {
  scrollbar-width: none
}

.city-track.is-ready::-webkit-scrollbar {
  display: none
}

.city-slide {
  --stock: #e7edde;
  --stamp: #476b50;
  position: relative;
  isolation: isolate;
  flex: 0 0 calc(100% / var(--city-count));
  min-width: 0;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: clamp(20rem, 31vw, 32rem);
  padding: clamp(1.25rem, 2.5vw, 2.65rem);
  background: var(--stock);
  border-inline-end: 1px solid #aab6aa;
}

.city-slide[data-test="new-taipei"] {
  --stock: #e3ecee;
  --stamp: #456a73
}

.city-slide[data-test="taoyuan"] {
  --stock: #f4e4d8;
  --stamp: #8a5343
}

.city-slide[data-test="taichung"] {
  --stock: #efe9d7;
  --stamp: #79643d
}

.city-slide[data-test="tainan"] {
  --stock: #f1e4e2;
  --stamp: #84595c
}

.city-slide[data-test="kaohsiung"] {
  --stock: #dfece6;
  --stamp: #336d60
}

.city-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  align-self: stretch;
  color: var(--stamp)
}

.city-card-top svg {
  height: 1.65rem;
  width: 1.45rem
}

.city-card-top span {
  font: 500 1rem/1.3 Georgia, serif;
  font-variant-numeric: lining-nums tabular-nums;
  letter-spacing: .1em
}

.city-slide h3 {
  margin-top: clamp(1.1rem, 2.3vw, 2.35rem);
  font-size: clamp(2.45rem, 4vw, 4.8rem);
  line-height: 1.15;
  color: var(--deep)
}

.city-subtitle {
  margin: .35rem 0 1rem;
  color: var(--muted)
}

.city-guide {
  position: absolute;
  z-index: -1;
  bottom: 0;
  right: clamp(1rem, 3vw, 3.75rem);
  width: min(31%, 10.8rem);
  height: auto;
  display: block;
}

.city-entry {
  margin-top: auto;
  padding-top: .75rem;
  border-top: 1px solid var(--stamp);
  color: var(--stamp)
}

.city-entry a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: .25em
}

.city-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-top: .7rem
}

.city-step {
  display: flex;
  gap: .4rem
}

.test-layout>.text-link {
  grid-column: 1/-1;
  justify-self: start
}

.test-steps {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .5rem 1.25rem;
  padding-top: .75rem;
  border-top: 1px solid #c6cec3;
  font-size: max(16px, .84rem);
  line-height: 1.55;
}

.test-steps h3 {
  color: var(--deep);
  font-size: 1em
}

.test-steps ol {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .35em 1.1em;
  padding: 0;
  color: var(--muted);
}

.test-steps li {
  margin-inline-start: 1.45em
}

.test-steps li::marker {
  color: var(--deep);
  font-weight: 700
}

@media(max-width:1024px) {
  .test-steps ol {
    grid-template-columns: repeat(2, minmax(0, 1fr))
  }
}

@media(max-width:639px) {
  .test-steps {
    grid-template-columns: 1fr;
    margin-inline: 5%
  }

  .test-steps ol {
    grid-template-columns: 1fr
  }
}

@media(min-width:640px) and (max-width:1024px) {
  .test-layout {
    width: 98%
  }

  .city-track {
    --city-count: 2
  }
}

@media(max-width:639px) {
  .test-layout {
    width: 100%;
    gap: 1rem
  }

  .test-intro {
    padding-inline: 5%
  }

  .test-intro h2 {
    font-size: clamp(1.45rem, 4.7vw, 1.95rem)
  }

  .city-picker {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin-top: .9rem;
    gap: .4rem
  }

  .city-picker button {
    min-width: 0
  }

  .city-track {
    --city-count: 1;
    border-inline: 0
  }

  .city-slide {
    min-height: clamp(16rem, 66vw, 23rem);
    border-inline-end: 0
  }

  .city-guide {
    width: min(30%, 8rem)
  }

  .city-controls {
    margin: .55rem 5% 0
  }

  .test-layout>.text-link {
    margin-inline: 5%
  }
}

.text-link {
  color: var(--deep);
  display: inline-flex;
  align-items: center;
  gap: .3em;
  text-decoration: underline;
  text-underline-offset: .25em;
  font-weight: 650
}

.text-link:hover {
  color: var(--accent)
}

.text-link svg {
  width: 1em
}

.offers-body {
  background: #f8eddb
}

.offer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-block: 1px solid #c7bca5
}

.offer-grid article {
  padding: 1.7rem 2rem;
  margin: 1rem 0;
  border-left: 1px solid #c7bca5
}

.offer-grid article:first-child {
  border-left: 0;
  padding-left: 0
}

.offer-grid h4 {
  font-size: 1.25rem
}

.offer-grid article.course-bonus {
  display: block;
  padding-inline: clamp(.65rem, 1.8vw, 2rem)
}

.bonus-topics {
  font-size: clamp(16px, 1.4vw, 1rem);
  line-height: 1.55;
  margin-top: .5rem
}

.bonus-total {
  color: var(--accent);
  font-size: 1.35rem;
  line-height: 1.35;
  margin: .5rem 0 .2rem
}

.course-bonus small {
  color: var(--muted);
  font-size: .85rem
}

@media(max-width:740px) {
  .offer-grid article.course-bonus {
    padding-inline: 0
  }
}

.price {
  color: var(--accent);
  font-size: 1.35rem;
  line-height: 1.1;
  font-weight: 650;
  margin: .8rem 0
}

.price em {
  font: italic 500 clamp(4.4rem, 7vw, 7rem)/1 Georgia, serif;
  margin-right: .22em
}

.purchase {
  display: grid;
  text-align: center;
  gap: .25rem
}

.purchase small {
  color: #626155;
  font-size: 1rem
}

.pending {
  border: 1px solid #aaa998;
  color: #66665a
}

.course-body>.sheet {
  width: 100%
}

.course-body .heading-row h3>span {
  display: inline-block
}

.course-features {
  padding-bottom: 0
}

.course-features .heading-row {
  margin-bottom: clamp(1rem, 1.8vw, 1.75rem)
}

.feature-list {
  --columns: 3;
  display: grid;
  grid-template-columns: repeat(var(--columns), minmax(0, 1fr));
  gap: clamp(.7rem, 1.2vw, 1.2rem);
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature {
  --tilt: -3deg;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: start;
  align-items: start;
  gap: .45rem 1rem;
  min-width: 0;
  padding: clamp(1rem, 1.6vw, 1.85rem);
  border-radius: 1rem;
  background: #ffeded;
}

.feature:nth-child(3n + 2) {
  --tilt: 3deg
}

.feature:nth-child(3n) {
  --tilt: -2deg
}

.feature-face {
  display: block;
  width: clamp(2.65rem, 3.75vw, 3.9rem);
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  transform: rotate(var(--tilt));
  transform-origin: 50% 85%;
}

.feature-number {
  color: #f1a486;
  font: italic 500 clamp(1.1rem, 1.5vw, 1.45rem)/1.2 Georgia, serif;
  font-variant-numeric: lining-nums tabular-nums;
}

.feature h4,
.feature p {
  grid-column: 1/-1
}

.feature h4 {
  font-size:clamp(1.15rem, 1.25vw, 1.35rem);
  line-height: 1.35;
  margin: 0;
  color: #b17e2c;
  font-weight: 500;
}

.feature h4 span {
  display: inline-block;
  max-width: 100%
}

.feature p {
  color: var(--ink);
  line-height: 1.65
}

@media(min-width:640px) and (max-width:959px) {
  .feature-list {
    --columns: 2
  }
}

@media(max-width:639px) {
  .feature-list {
    --columns: 1
  }

  .feature {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "face title number" "copy copy copy";
    align-items: center;
    gap: .45rem .5rem;
    padding: 1rem clamp(.7rem, 2.8vw, 1rem);
  }

  .feature-face {
    grid-area: face;
    width: 2.45rem
  }

  .feature-number {
    grid-area: number;
    align-self: start
  }

  .feature h4 {
    grid-area: title;
    font-size: 1.1rem;
    margin: 0
  }

  .feature p {
    grid-area: copy
  }
}

@media screen and (prefers-reduced-motion:no-preference) {
  .feature[data-entrance="shown"] .feature-face {
    animation: feature-nod .45s ease-out both
  }
}

@keyframes feature-nod {
  from {
    transform: translateY(3px) rotate(calc(var(--tilt) - 5deg))
  }

  65% {
    transform: translateY(-1px) rotate(calc(var(--tilt) + 2deg))
  }

  to {
    transform: rotate(var(--tilt))
  }
}

.course-syllabus {
  display: grid;
  align-items: start;
  gap: 1.2rem;
  padding-top: clamp(2.5rem, 5vw, 5rem);
}

.syllabus-intro,
.syllabus-results {
  min-width: 0
}


.course-syllabus .syllabus-title {
  margin: 0 0 .65rem
}

.subject-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin: 1rem 0 .65rem
}

.subject-filters button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  min-height: 44px;
  padding: .3rem .8rem;
  border: 1px solid #adbdb1;
  border-radius: 2em;
  background: white;
  color: var(--deep);
  white-space: nowrap;
}

.subject-filters button[aria-pressed="true"] {
  background: var(--deep);
  border-color: var(--deep);
  color: white
}

.subject-filters button span {
  font-variant-numeric: tabular-nums;
  font-size: .85em
}

.subject-filters button:hover:not([aria-pressed="true"]) {
  background: #fff7e5
}

.filter-count:empty {
  display: none
}

.syllabus-results {
  --columns: minmax(0, 1fr) 5.25rem 3.35rem 1.12rem;
  --column-gap: clamp(.5rem, 1vw, 1rem);
  --card-pad: clamp(.75rem, 1.6vw, 1.5rem);
}

.subject-columns,
.subject summary {
  display: grid;
  grid-template-columns: var(--columns);
  align-items: center;
  column-gap: var(--column-gap);
  padding-inline: var(--card-pad);
}

.subject-columns {
  margin-bottom: .45rem;
  border: 1px solid transparent;
  color: var(--muted);
  font-weight:400;
}

.subject-columns span:nth-child(3),
.subject-total {
  text-align: right
}

.subjects {
  display: grid;
  gap: .55rem
}

.subject {
  border: 2px solid #ffc681;
  border-radius: .85rem;
  background: #ffffff
}

.subject[open] {
  border-color:#e9b576;
  background: #fffaf0
}

.subject summary {
  cursor: pointer;
  list-style: none;
  padding-block: 1.5rem;
  border-radius: inherit;
  min-height: 54px;
}

summary::-webkit-details-marker {
  display: none
}

.subject summary:hover {
  background: #fff1d5;
}

.subject summary strong {
  font-size: 1.12rem;
  font-weight: 600;
  color: #1a8145;
}

.subject-teacher,
.subject-total {
  white-space: nowrap
}

.subject-teacher {
  color: var(--muted)
}

.subject-total {
  color: var(--deep)
}

.lesson-count {
  font-size: 1.35em;
  line-height: 1;
  font-weight: 700;
  color: var(--deep);
  font-variant-numeric: tabular-nums
}

.subject-toggle {
  position: relative;
  justify-self: center;
  width: .86rem;
  height: .86rem;
  color: var(--deep)
}

.subject-toggle::before,
.subject-toggle::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  background: currentColor
}

.subject-toggle::before {
  width: 100%;
  height: 2px
}

.subject-toggle::after {
  width: 2px;
  height: 100%
}

.subject[open] .subject-toggle::after {
  display: none
}

.schedule {
  margin-inline: var(--card-pad);
  border-top: 1px solid #cfab87;
  padding: .85rem 0 1.15rem
}

@media (min-width:1100px) {
  .course-syllabus {
    grid-template-columns: minmax(11rem, .85fr) minmax(0, 2.15fr);
    gap: clamp(1.5rem, 3vw, 3rem)
  }

  .syllabus-intro {
    position: sticky;
    top: calc(var(--head) + 1rem)
  }
}

@media (max-width:700px) {
  .subject-columns {
    display: none
  }

  .subject summary {
    grid-template-columns: auto minmax(0, 1fr) 1.12rem;
    grid-template-areas: "name name toggle" "teacher total toggle";
    row-gap: .3rem
  }

  .subject summary strong {
    grid-area: name
  }

  .subject-teacher {
    grid-area: teacher
  }

  .subject-total {
    grid-area: total;
    text-align: left
  }

  .subject-toggle {
    grid-area: toggle
  }
}

.schedule ol {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0
}

.schedule li {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: baseline;
  column-gap: clamp(.5rem, 1vw, .9rem)
}

.schedule li+li {
  margin-top: .45rem
}

.lesson-index {
  color: #1aa696;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-size: 108%;
}

.story-body {
  background: #10363a;
  color: #fffaf0
}

.story-sheet {
  width: 100%;
  overflow: hidden
}

.story-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 90%;
  margin: 0 auto clamp(1.4rem, 3vw, 3rem);
}

.story-body .story-heading h3 {
  color: #fffaf0;
  font-size: clamp(1.7rem, 3vw, 3.15rem);
  line-height: 1.25
}

.story-heading .story-hint {
  margin: .55rem 0 0;
  color: #c4d9d7;
  font-size: .9rem
}

.story-controls {
  display: flex;
  gap: .4rem;
  align-items: center;
  flex-shrink: 0
}

.story-controls button {
  min-width: 46px;
  min-height: 46px;
  padding: .3rem .6rem;
  border: 1px solid #9bb6b6;
  border-radius: 2rem;
  color: white;
  font: inherit;
  background: transparent;
}

.story-controls button:hover,
.story-controls button:focus-visible {
  background: #285357
}

.stories {
  --gutter: clamp(1rem, 3vw, 3.25rem);
  --gap: clamp(.8rem, 1.5vw, 1.7rem);
  display: flex;
  align-items: flex-start;
  gap: var(--gap);
  padding: .4rem var(--gutter) 1.4rem;
  position: relative;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-color: #9eb8b7 #184549;
}

.stories:focus-visible {
  outline: 2px solid #ffcf7b;
  outline-offset: -3px
}

.stories.is-ready {
  scrollbar-width: none
}

.stories.is-ready::-webkit-scrollbar {
  display: none
}

.story {
  --card: #fff1d6;
  --copy: var(--ink);
  --identity: var(--deep);
  --offset: 1.2rem;
  box-sizing: border-box;
  flex: 0 0 clamp(19rem, 30vw, 31rem);
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 2vw, 1.8rem);
  margin-top: var(--offset);
  padding: clamp(1.1rem, 2vw, 2.4rem);
  color: var(--copy);
  background: var(--card);
  border: 1px solid #fffa;
  border-radius: .2rem;
}

.story-teal {
  --card: #177679;
  --copy: #fff;
  --identity: #fff9ed;
  --offset: 2.9rem
}

.story-peach {
  --card: #f1a486;
  --offset: 0rem
}

.story-blue {
  --card: #cfe7f0;
  --offset: 2.1rem
}

.story-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: .5rem;
  color: var(--identity)
}

.story-top img {
  justify-self: end;
  display: block;
  width: clamp(3.65rem, 6vw, 5.5rem);
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  border: 2px solid #fff;
  border-radius: .65rem;
  background: #fff3e6;
}

.story-no {
  font-size: clamp(1.5rem, 2.2vw, 2.4rem);
  font-weight: 850;
  line-height: 1;
  font-variant-numeric: tabular-nums
}

.story-series {
  font: 650 .75rem/1.2 ui-monospace, monospace;
  letter-spacing: .13em
}

.story blockquote {
    margin: 0;
    line-height: 1.8;
    text-align: center;
    letter-spacing: 1px;
    font-size: 1.1em;
}

.story blockquote p {
  margin: 0
}

.story-quote {
  display: block;
  text-align: center;
  height: .6em;
  margin: .12em auto .25em;
  font: 700 3.6rem/.9 Georgia, serif;
  opacity: .28
}

.story-who {
  margin-top: auto;
  padding-top: .85rem;
  border-top: 1px solid currentColor;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .35rem .8rem;
  color: var(--identity);
}

.story-who span {
  font-size: clamp(1.12rem, 1.25vw, 1.65rem);
  font-weight: 650;
  line-height: 1.35
}

.story .story-who h4 {
  font-size: clamp(1.45rem, 1.5vw, 2rem);
  line-height: 1.2;
  color: inherit;
  white-space: nowrap
}

@media(max-width:700px) {
  .story-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: .75rem
  }

  .stories {
    --gutter: 5vw
  }

  .story {
    flex-basis: 85vw;
    margin-top: 0
  }

  .story blockquote p {
    text-align: start
  }
}

@media print {
  .story-controls {
    display: none
  }

  .stories {
    display: block;
    overflow: visible
  }

  .stories [data-story-copy] {
    display: none
  }

  .story {
    break-inside: avoid;
    margin: .5rem 0
  }
}

.branch-footer {
  padding: clamp(2rem, 3.45vw, 3.5rem) 5vw;
  background: #1aa696;
  color: white;
  font-size: 16px;
  line-height: 1.65;
}

.branch-footer ul {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  list-style: none;
  padding: 0;
  margin: 1em 0;
  text-align: center;
}

.branch-footer li {
  font-size: 1.35em
}

.branch-footer a:hover,
.branch-footer a:focus-visible {
  text-decoration: underline;
  text-underline-offset: .2em
}

.branch-footer .dataUpdated {
  margin: 2.25em 0 0;
  padding-top: 1em;
  border-top: 1px solid rgb(255 255 255 / 30%);
  font-size: 14px;
  letter-spacing: .04em;
  text-align: center;
  color: rgb(255 255 255 / 85%);
}

.branch-footer time {
  white-space: nowrap
}

@media(max-width:740px) {
  .branch-footer ul {
    grid-template-columns: repeat(3, minmax(0, 1fr))
  }

  .branch-footer li {
    font-size: 1em
  }

  .branch-footer a {
    display: grid;
    place-items: center;
    min-height: 44px
  }
}

@media(max-width:520px) {
  .branch-footer ul {
    grid-template-columns: repeat(2, minmax(0, 1fr))
  }
}

@media(min-width:741px) {
  .talk-huang {
    margin-top: clamp(3rem, 6vw, 7.5rem)
  }
}

@media(min-width:741px) and (max-width:1000px) and (orientation:portrait) {
  .painting {
    --focus-x: 68%
  }
}

@media(max-width:740px) {
  .scroll-cue {
    left: 5vw;
    bottom: 3svh
  }

  .heading-row {
    align-items: start
  }

  .heading-row>span {
    white-space: normal
  }

  #lecture-list .heading-row {
    display: grid;
    gap: .3rem
  }

  #lecture-list .heading-row h3 {
    text-wrap: balance
  }

  #lecture-list .heading-row>span {
    white-space: nowrap
  }

  .talk-grid {
    grid-template-columns: 1fr
  }

  .offer-grid {
    grid-template-columns: 1fr
  }

  .offer-grid article,
  .offer-grid article:first-child {
    display: grid;
    align-items: center;
    grid-template-columns: 1fr auto;
    column-gap: .5rem;
    row-gap: .1rem;
    margin: 0;
    padding: 1rem 0;
    border: 0;
    border-bottom: 1px solid #ccc1ab
  }

  .offer-grid article:last-child {
    border-bottom: 0
  }

  .price {
    grid-column: 2;
    grid-row: 1/3;
    margin: 0
  }

  .price em {
    font-size: 3.8rem
  }

  .offer-grid h4 {
    font-size: 1.1rem
  }
}

@media(prefers-reduced-motion:reduce) {

  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important
  }
}

@media print {

  .mast,
  .scroll-cue,
  .faculty-controls,
  .subject-filters,
  .mobile-menu,
  .painting-film,
  .lecture-desk {
    display: none !important
  }

  .motion .opening {
    height: auto
  }

  .paint-copy {
    top: 0
  }

  .painting,
  .entrance-view,
  .motion .entrance-view {
    position: relative;
    top: auto;
    min-height: 44vh;
    height: auto
  }

  .exhibit>.content,
  .motion #lectures>.content {
    margin-top: 0
  }

  .motion .painting :is(.paint-copy > p, .artist, h2 > *),
  .motion .painting::after {
    opacity: 1;
    transform: none
  }

  .motion .depth-ready .lecture-subject {
    mask: none;
    -webkit-mask: none;
    transform: none
  }
}

@media (max-width:740px) {
  .painting {
    background: #263a2d
  }

  .painting {
    --focus-x: 80%;
    --focus-y: 30%
  }

  .painting[data-art=liu] {
    --focus-x: 76.5%
  }

  .painting[data-art=lin] {
    --focus-x: 85%
  }

  .painting[data-art=huang] {
    --focus-x: 74%
  }

  .painting[data-art=wu] {
    --focus-x: 82%
  }

  .painting::after {
    background: linear-gradient(180deg, transparent 27%, #17271e35 35%, #1c2b20b8 44%, #1b2b23cf 66%, #1b2b2390 100%)
  }
}

@media(prefers-reduced-motion:reduce) {
  .painting {
    position: relative;
    top: 0
  }

  .exhibit>.content {
    margin-top: 0
  }
}

@media(max-height:530px) {
  .exhibit>.content {
    margin-top: 0
  }

  .paint-copy h2 {
    font-size: clamp(2.3rem, 6.3vw, 4.5rem);
    margin: .2em 0
  }

  .paint-copy {
    padding-block: .75rem
  }
}

/* Keep the name and heading together, just below the portrait, on phones. */
@media screen and (max-width:740px),
screen and (orientation:landscape) and (max-width:950px) and (max-height:530px) {
  :root {
    --phone-page-height: var(--phone-portrait-height, 100svh)
  }

  .entrance-view {
    height: var(--phone-page-height, 100svh)
  }

  .painting {
    height: calc(var(--phone-page-height, 100svh) - var(--head))
  }

  .exhibit>.content {
    margin-top: 0
  }

  /* The following sheet travels over the pinned artwork using native scrolling. */
  @media (prefers-reduced-motion:no-preference) {
    .opening {
      margin-block-end: calc(0px - var(--phone-page-height))
    }

    .opening::after {
      content: "";
      display: block;
      height: var(--phone-page-height);
      pointer-events: none
    }

    .entrance-view {
      position: sticky;
      top: min(0px, calc(var(--phone-page-height) - var(--gate-min-height, 40rem)))
    }

    .opening+.test-area {
      z-index: 1
    }
  }

  .mast.is-scrolled {
    background: #171a18;
    backdrop-filter: none
  }

  .painting {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: clamp(.75rem, 40%, calc(100% - 13rem)) auto auto auto 1fr;
    align-items: center;
    column-gap: .65rem;
    padding-inline: 6%;
  }

  .painting .paint-copy {
    display: contents
  }

  .painting .room-kicker {
    grid-area: 2 / 1;
    gap: .35rem;
    font-size: max(14px, .78rem);
    letter-spacing: .05em;
  }

  .painting .room-kicker i {
    width: .9rem
  }

  .painting .artist {
    grid-area: 2 / 2;
    position: static;
    justify-self: start;
    margin: 0;
    padding: .15rem .45rem;
    font-size: max(14px, .82rem);
    line-height: 1.5;
    letter-spacing: .015em;
  }

  .painting .artist i {
    display: none
  }

  .painting h2 {
    grid-area: 3 / 1 / 4 / -1;
    font-size: clamp(2rem, 9.1vw, 3.5rem);
    margin: .32rem 0 .38rem;
    text-shadow: 0 1px 5px #14231dc9;
  }

  .painting h2 span {
    font-size: .55em
  }

  .painting .paint-desc {
    grid-area: 4 / 1 / 5 / -1;
    max-width: 27ch;
    font-size: 1rem;
    line-height: 1.55;
    text-shadow: 0 1px 4px #14231d;
  }

  /* Text stays readable as soon as the painting scrolls into view. */
  .motion .painting .paint-copy>p,
  .motion .painting .artist,
  .motion .painting h2>*,
  .motion .painting::after {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media screen and (max-width:360px) {
  .painting .room-kicker i {
    display: none
  }
}

@media screen and (orientation:landscape) and (max-width:950px) and (max-height:530px) {
  :root {
    --phone-page-height: var(--phone-landscape-height, 100svh);
    --gate-min-height: 440px
  }

  .painting {
    grid-template-rows: clamp(.5rem, 8%, 2rem) auto auto auto 1fr;
    padding-inline: 6% 40%;
  }

  .painting::after {
    background: linear-gradient(90deg, #1b2b23e0 0%, #1b2b23b5 39%, transparent 67%)
  }

  .painting h2 {
    font-size: clamp(1.8rem, 5vw, 2.65rem)
  }
}

@media(max-width:1100px) {
  .mast {
    padding-inline: 5vw
  }

  .wide-menu {
    display: none
  }

  .header-tools {
    margin-left: auto;
    gap: 1.15rem
  }

  .mobile-menu {
    display: block
  }

  .mobile-menu summary {
    gap: .32em;
    list-style: none;
    min-height: 44px
  }

  .mobile-menu nav {
    position: absolute;
    top: 100%;
    right: 5vw;
    min-width: 12rem;
    padding: .4rem .8rem;
    background: #171b18f5;
    box-shadow: 0 7px 25px #142e1f35;
    border-top: 2px solid #d9b557;
  }

  .mobile-menu nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 44px
  }

  .mobile-menu nav a+a {
    border-top: 1px solid #ffffff24
  }
}

@media(min-width:741px) and (max-height:800px) {
  .mast:not(.is-scrolled) {
    padding-block: 12px
  }

  .mast:not(.is-scrolled) .wordmark {
    font-size: clamp(42px, 5vw, 68px)
  }

  .catalog {
    padding-block: 1.8rem
  }
}

@media(min-width:741px) and (max-height:690px) {
  .catalog {
    top: 55%;
    padding: 1.1rem 1.6rem
  }

  .catalog h1 {
    font-size: clamp(2.4rem, 3.8vw, 3.5rem)
  }

  .catalog-menu {
    margin-top: .7rem
  }
}

@media(max-width:740px) {

  .mast,
  .mast.is-scrolled {
    padding-inline: 5vw
  }

  .mast:not(.is-scrolled) {
    padding-block: 18px
  }

  .wordmark {
    font-size: clamp(1.9rem, 8.2vw, 3.5rem)
  }

  .mast.is-scrolled .wordmark {
    font-size: 21px
  }

  .header-tools {
    gap: .8rem
  }

  .entrance-view {
    min-height: 600px
  }

  .entrance-layout {
    display: flex;
    flex-direction: column;
    padding-top: clamp(72px, 10.5svh, 100px)
  }

  .catalog {
    position: relative;
    inset: auto;
    margin-left: 4.5%;
    transform: none;
    width: min(85%, 430px);
    flex: none;
    padding: .95rem 1.1rem
  }

  .catalog-menu {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 1.4rem
  }

  .catalog-caption {
    gap: .45rem;
    letter-spacing: .06em
  }

  .catalog-caption i {
    width: 1.35rem
  }

  .catalog h1 {
    font-size: clamp(1.85rem, 6.4vw, 3.1rem);
    line-height: 1.16
  }

  .catalog h1 span {
    font-size: .74em
  }

  .catalog>p {
    line-height: 1.45;
    text-wrap: pretty
  }

  .catalog-menu {
    margin-top: .85rem;
    padding-top: .35rem
  }

  .catalog-menu a {
    min-height: 44px
  }

  .faculty {
    position: relative;
    align-self: flex-end;
    flex: 1;
    min-height: 0;
    width: 76%;
    right: 1.5%;
    height: auto;
    --plate-bottom: clamp(50px, 7.4svh, 77px)
  }

  .faculty-pictures {
    position: absolute;
    inset: 0
  }

  .prof img {
    object-position: 75% bottom
  }

  .prof figcaption {
    width: min(100%, clamp(175px, 49vw, 260px));
    padding: .45rem .35rem
  }

  .prof figcaption strong {
    font-size: 1.32rem
  }

  .prof figcaption>span {
    font-size: 1rem
  }

  .faculty-controls button {
    height: 42px;
    min-width: 42px
  }

  .motion .catalog {
    transform: translate3d(0, calc(-2svh * var(--gate-progress)), 0)
  }

  .scroll-cue {
    left: 4.5%;
    bottom: 3svh
  }
}

@media(min-width:741px) and (max-width:1100px) and (orientation:portrait) {
  .faculty {
    right: 1%;
    width: 36%
  }
}

@media(max-width:740px) and (orientation:portrait) {
  .faculty {
    width: 66%
  }

  .entrance-view {
    min-height: 40rem
  }

  .gate {
    object-position: 50% 68%;
    transform-origin: 50% 70%
  }
}

@media(max-width:420px) {
  .mast {
    gap: .4rem
  }

  .mast:not(.is-scrolled) .wordmark {
    font-size: clamp(1.4rem, 7.5vw, 1.7rem)
  }

  .header-tools {
    gap: .5rem;
    font-size: .9rem
  }
}

@media(max-width:370px) {
  .header-tools {
    gap: .6rem
  }

  .catalog {
    width: 90%
  }

  .catalog-caption i {
    display: none
  }
}

@media(orientation:landscape) and (max-height:530px) {
  .entrance-view {
    min-height: 440px
  }

  .mast:not(.is-scrolled) {
    padding-block: 4px
  }

  .mast:not(.is-scrolled) .wordmark {
    font-size: 36px
  }

  .entrance-layout {
    display: block;
    padding: 0
  }

  .catalog {
    position: absolute;
    margin: 0;
    top: 53%;
    left: 6%;
    width: 39%;
    max-width: 430px;
    padding: .8rem 1.1rem;
    transform: translateY(-50%)
  }

  .motion .catalog {
    transform: translate3d(0, calc(-50% - 1svh * var(--gate-progress)), 0)
  }

  .catalog h1 {
    font-size: 2rem;
    line-height: 1.08
  }

  .catalog-menu {
    margin-top: .4rem;
    padding-top: .2rem
  }

  .catalog-menu a {
    min-height: 28px
  }

  .faculty {
    position: absolute;
    right: 2%;
    height: 80%;
    width: 44%;
    --plate-bottom: 52px
  }

  .prof figcaption {
    width: min(100%, 215px);
    padding: .35rem
  }
}

@media print {
  .catalog {
    position: relative;
    inset: auto;
    transform: none !important
  }

  .entrance-layout {
    min-height: 25rem
  }
}

/* The entrance fades to white above the exam notes. */
.entrance-view .gate-tint {
  background: linear-gradient(to top, #fff 0%, rgba(255, 255, 255, .87) 4%, rgba(255, 255, 255, .32) 13%, transparent 27%);
}

.entrance-view .prof img {
  mask-image: linear-gradient(to top, transparent 0%, #000 13%)
}

.entrance-view .scroll-cue {
  color: var(--deep);
  text-shadow: 0 1px 4px #fff
}

.entrance-view .scroll-cue svg {
  border-color: #52685d
}

.exam-trends {
  background: #fff5ee;
  color: var(--ink)
}

.trend-layout {
  width: 85%;
  margin-inline: auto;
  padding-block: clamp(2rem, 4.8vw, 4.5rem);
  display: grid;
  grid-template-columns: minmax(0,.66fr) minmax(0,1.55fr);
  gap: clamp(2rem, 6vw, 6rem);
}

.trend-kicker {
  display: flex;
  align-items: center;
  gap: .6rem;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: .12em
}

.trend-kicker::before {
  content: "";
  width: 1.8rem;
  height: 2px;
  background: currentColor
}

.trend-intro h2 {
  font-size: clamp(2rem, 3.5vw, 3.55rem);
  line-height: 1.19;
  color: var(--deep);
  margin: .5rem 0 .85rem
}

.trend-intro>p:not(.trend-kicker) {
  max-width: 24em
}

.trend-source,
.cert-note a {
  text-decoration: underline;
  text-underline-offset: .2em;
  color: var(--deep)
}

.trend-source {
  display: inline-block;
  margin-top: .6rem;
  font-size: max(16px, .86rem)
}

.trend-compare {
  min-width: 0
}
#exam-trends h3 {
  font-size: clamp(1.2rem, 1.65vw, 1.55rem);
  color: var(--deep);
  margin-bottom: 3vh;
}

.cert-note {
  font-size: max(16px, .85rem);
  line-height: 1.55;
  color: var(--muted)
}

.cert-data {
  width: 100%;
  margin-top: .75rem;
  border-collapse: collapse;
  table-layout: fixed;
  line-height: 1.5
}

.cert-data th,
.cert-data td {
  text-align: left;
  vertical-align: top;
  padding: .48rem .65rem
}

.cert-data thead th {
  background: #ffeee0;
  font-size: max(16px, .88rem)
}

.cert-data thead th:first-child {
  width: 31%
}

.cert-data tbody {
  border-bottom: 1px solid #becac2
}

.cert-data tbody th {
  font-size: max(16px, .98rem);
  font-weight: 700;
  color: var(--deep)
}

.cert-data tbody small {
  display: block;
  font-size: max(16px, .82rem);
  font-weight: 400;
  color: var(--muted);
  margin-top: .18rem
}

.cert-data tbody tr+tr td {
  border-top: 1px solid #e5eae6
}

.cert-entry {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: baseline;
  gap: .2rem .75rem
}

.cert-award {
  white-space: nowrap;
  color: var(--deep);
  font-size: max(16px, .93rem)
}

.cert-award b {
  color: #ff6f6f
}

.cert-limit {
  font-size: max(16px, .82rem);
  color: var(--muted)
}

.cert-note {
  margin: .6rem 0 0
}

.cert-note a {
  white-space: nowrap
}

.trend-jumps {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1.15rem;
  margin-top: 1.05rem
}

.trend-jumps a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--deep);
  font-size: max(16px, .9rem);
  font-weight: 700;
  border-bottom: 2px solid var(--accent);
  text-decoration: none;
}

.trend-jumps a:hover,
.policy-sources a:hover {
  color: var(--accent)
}

#exam-bonus {
  scroll-margin-top: 1rem
}

.talk-watch {
  display: inline-block;
  margin: .4rem 0;
  color: var(--deep);
  font-size: max(16px, .9rem);
  text-decoration: underline;
  text-underline-offset: .2em
}

.trend-panel {
  min-width: 0;
  scroll-margin-top: 1rem
}

.trend-panel:focus:not(:focus-visible) {
  outline: none
}

.trend-compare {
  display: grid;
  gap: clamp(1.8rem, 4vw, 3.2rem)
}

.bonus-card,
.policy-story {
  min-width: 0;
  padding: 8vh 3vw;
  border-radius: 1em;
  background: #fff;
  border-block-start: 2px solid #ffeee0;
}

.bonus-card {
  display: flow-root
}

.policy-panels {
  display: grid;
  gap: clamp(1.2rem, 3vw, 2.6rem);
  isolation: isolate
}

.policy-story {
  position: relative;
  background: #fff;
  border-block-start-color: #ffd59b;
  scroll-margin-top: 1.2rem
}

.policy-story+.policy-story {
  background: #fff;
  border-block-start-color: #ffeacd;
}

.policy-story .policy-level {
  margin: 0 0 .45rem;
  color: #476b60;
  font-size: max(16px, .82rem);
  font-weight: 700
}

.policy-story+.policy-story .policy-level {
  color: #855033
}

.policy-story h4 {
  font-size: 1.1em;
  line-height: 1.45;
  margin: 0 0 1rem;
  padding-bottom: .8rem;
  border-bottom: 1px solid #dacabe;
  text-wrap: pretty;
  font-weight: 500;
}

.policy-story p,
.policy-cities {
  font-size: max(16px, .98rem);
  line-height: 1.72
}

.policy-cities {
  margin: 0
}

.policy-cities>div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .8rem;
  padding: 1vh 0 2vh;
  border-bottom: dashed 1px #ffddc4;
  align-items: baseline
}

.policy-cities>div+div {
  margin-top: .8rem
}

.policy-cities dt {
  font-weight: 500;
  color: #ff6f6f;
  white-space: nowrap;
}

.leave-changes {
  width: 100%;
  margin: .8rem 0;
  border-collapse: collapse;
  table-layout: fixed;
  background: #fffdfa;
  font-size: max(16px, .93rem);
  line-height: 1.55;
}

.leave-changes th,
.leave-changes td {
  padding: .55rem clamp(.35rem, 1.1vw, .85rem);
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid #ccd8ce;
  overflow-wrap: break-word;
}

.leave-changes thead th {
  background:#fff6cb;
}

.leave-changes th:first-child {
  width: 30%
}

.leave-changes th:nth-child(2) {
  width: 26%
}


.leave-changes tbody td:last-child {
  background:#fff3f3
}

.leave-changes td strong {
  white-space: nowrap
}

.leave-notes {
  padding-inline-start: 1.25em;
  margin: 1rem 0;
  font-size: max(16px, .93rem);
  line-height: 1.65
}

.leave-notes li+li,
.leave-details p+p {
  margin-top: .45rem
}

.leave-details {
  margin: 1rem 0;
  border-block: 1px solid #f3f3f3;
  padding: .48rem 0
}

.leave-details summary {
  cursor: pointer;
  font-weight: 600
}

.leave-details[open] summary {
  margin-bottom: .55rem
}

.policy-news strong {
  color: var(--deep)
}

.policy-sources {
  display: flex;
  flex-wrap: wrap;
  gap: .15rem 1rem;
  margin-top: .28rem
}

.policy-cities+.policy-sources {
  align-items: baseline;
  gap: .15rem .75rem;
  padding-inline-start: calc(3em + .8rem);
  margin-top: .85rem
}

.policy-sources a {
  color: var(--deep);
  font-size: max(16px, .84rem);
  text-decoration: underline;
  text-underline-offset: .2em
}

@media screen and (min-width:801px) and (min-height:580px) {
  .trend-intro {
    position: sticky;
    top: calc(var(--head) + 1.4rem);
    align-self: start
  }
}

@media (max-width:520px) {
  .policy-cities>div {
    display: block
  }

  .policy-cities dt {
    margin-bottom: .12rem
  }

  .policy-cities+.policy-sources {
    padding-inline-start: 0
  }

  .bonus-card {
    padding-inline: .6rem
  }
}

@media print {
  .trend-jumps {
    display: none
  }

  .policy-story h4 {
    break-after: avoid
  }
}

@media (max-width:800px) {
  .trend-layout {
    width: 90%;
    grid-template-columns: 1fr;
    gap: 1.4rem
  }

  .trend-intro h2 br {
    display: none
  }

  .trend-intro>p:not(.trend-kicker) {
    max-width: none
  }
}

@media (max-width:520px) {
  .entrance-view .gate-tint {
    background: linear-gradient(to top, #fff 0%, #ffffffbd 4%, transparent 16%)
  }

  .cert-data th,
  .cert-data td {
    padding: .45rem .3rem
  }

  .cert-entry {
    grid-template-columns: 1fr;
    gap: .08rem
  }

  .cert-data thead th:first-child {
    width: 34%
  }
}

@media print {
  .cert-data tbody {
    break-inside: avoid
  }
}

.page-path {
  background: var(--paper, #fbf8ef);
  color: var(--ink, #243c34);
  padding: .85rem 5%;
}

.page-path ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .4em;
}

.page-path li+li::before {
  content: "›";
  margin-inline-end: .4em;
}

.page-path a {
  text-decoration: underline;
}


#subject  {
  font-family: "Outfit", "Noto Sans TC",sans-serif;
}
.schedule p {
  text-align: center;
}
.schedule time  {
  color: #1aa696;
  font-weight: 600;
  font-size: 1.5em;
  padding-right: 1vw;
}
.schedule li {
  border-bottom: dashed 1px #ffb640;
  padding-bottom: 2vh;
}
.schedule li:nth-last-child(1) {
  border-bottom: dashed 0px #ffb640;
  padding-bottom: 2vh;
}