
* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--text-main);
  background: var(--bg-color);
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  line-height: 1.85;
  letter-spacing: var(--body-track);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.page {
  position: relative;
  overflow-x: hidden;
  overflow-y: visible;
  min-height: 100vh;
}

.container {
  width: min(var(--container), calc(100% - 48px));
  margin: 0 auto;
}

.emboss-text {
  font-weight: bolder;
  font-family: "Noto Serif TC", serif;
  color: #2a1505;
  paint-order: stroke fill;
  -webkit-background-clip: text;
  background-clip: text;
  filter:
    drop-shadow(1px 1px 0px #bbb)
    drop-shadow(2px 2px 0px #999)
    drop-shadow(3px 3px 4px rgba(0,0,0,.35))
    drop-shadow(-1px -1px 0px rgba(255,255,255,1));
}

.emboss-png {
  color: transparent;
  background: linear-gradient(155deg,
    #d0d0d0 0%, #f8f8f8 28%,
    #888    50%, #e0e0e0 72%, #aaa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter:
    drop-shadow(1px 1px 0px #bbb)
    drop-shadow(2px 2px 0px #999)
    drop-shadow(3px 3px 4px rgba(237, 235, 235, 0.35))
    drop-shadow(-1px -1px 0px rgba(255,255,255,0.3))
    drop-shadow(-2px -2px 0px rgba(255,255,255,0.3))
    drop-shadow(-1px -1px 0px rgba(255,255,255,1));
}

.section-kicker {
  margin: 0 0 10px;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent-gold);
}

.section-title {
  text-align: center;
  font-family: "Noto Serif TC", serif;
  font-size: 28px;
  font-weight: 600;
  margin: 0 0 34px;
  letter-spacing: var(--title-track);
  color: var(--primary-jade);
}

.section-subtitle {
  text-align: center;
  color: var(--ink-55);
  font-size: 14px;
  margin: -22px 0 45px;
}

.icon-swaying {
  transform-origin: bottom center;
  animation: smoothSway 5s ease-in-out infinite;
}

.page a[href]:where(
  :not(.btn):not(.btn-more):not(.action-btn):not(.back-link):not(.nav-item):not(.social):not(.store-badge):not(.filter-btn):not(.media-card):not(.wisdom-item):not(.wisdom-hub-title-link):not(.hub-section-title-link):not(.hub-icon-tile):not(.resource-item):not(.footer-text-link):not(.footer-quick-link):not(.tag):not(.error-cta):not(.register-btn):not(.magazine-btn):not(.hero-event-card):not(.path-card):not(.series-card):not(.cta-btn):not(.pathway-card):not(.grid-item):not(.playlist-item):not(.share-btn):not(.control-btn):not(.subscribe-btn):not(.series-list-link):not(.ap-series-sidebar-link):not(.popular-item):not(.video-card):not(.side-nav-brand):not(.mobile-nav-brand):not(.link-highlight):not(.footer-bottom a):not(.footer-contact-lines a)
) {
  transition: color 0.22s ease, transform 0.22s ease, opacity 0.22s ease;
}

.page a[href]:where(
  :not(.btn):not(.btn-more):not(.action-btn):not(.back-link):not(.nav-item):not(.social):not(.store-badge):not(.filter-btn):not(.media-card):not(.wisdom-item):not(.wisdom-hub-title-link):not(.hub-section-title-link):not(.hub-icon-tile):not(.resource-item):not(.footer-text-link):not(.footer-quick-link):not(.tag):not(.error-cta):not(.register-btn):not(.magazine-btn):not(.hero-event-card):not(.path-card):not(.series-card):not(.cta-btn):not(.pathway-card):not(.grid-item):not(.playlist-item):not(.share-btn):not(.control-btn):not(.subscribe-btn):not(.series-list-link):not(.ap-series-sidebar-link):not(.popular-item):not(.video-card):not(.side-nav-brand):not(.mobile-nav-brand):not(.link-highlight):not(.footer-bottom a):not(.footer-contact-lines a)
):hover {
  color: var(--primary-jade, #1c4a3c);
}

.page a[href]:where(
  :not(.btn):not(.btn-more):not(.action-btn):not(.back-link):not(.nav-item):not(.social):not(.store-badge):not(.breadcrumb a):not(.footer-brand):not(.filter-btn):not(.media-card):not(.wisdom-item):not(.wisdom-hub-title-link):not(.hub-section-title-link):not(.hub-icon-tile):not(.resource-item):not(.footer-text-link):not(.footer-quick-link):not(.tag):not(.error-cta):not(.register-btn):not(.magazine-btn):not(.hero-event-card):not(.path-card):not(.series-card):not(.cta-btn):not(.pathway-card):not(.grid-item):not(.playlist-item):not(.share-btn):not(.control-btn):not(.subscribe-btn):not(.series-list-link):not(.ap-series-sidebar-link):not(.popular-item):not(.video-card):not(.side-nav-brand):not(.mobile-nav-brand):not(.link-highlight):not(.footer-bottom a):not(.footer-contact-lines a)
):hover {
  transform: translateX(2px);
}

.page a.tag {
  text-decoration: none;
  display: inline-block;
}

.page a.tag:hover,
.page a.tag:focus-visible {
  background: var(--primary-jade, #1c4a3c);
  color: #fff;
  border-color: var(--primary-jade, #1c4a3c);
}

.page a.tag:active {
  background: #153d32;
  color: #fff;
  border-color: #153d32;
}

.prose-doc a,
.description-text a,
.article-page .right p a,
.deck a {
  transition: color 0.2s ease, border-color 0.2s ease;
}

.prose-doc a:hover,
.description-text a:hover,
.article-page .right p a:hover,
.deck a:hover {
  transform: none;
}

@keyframes smoothSway {
  0% {
      transform: rotate(0deg) scaleY(1);
  }
  25% {
      transform: rotate(5deg) scaleY(1.02); 
  }
  50% {
      transform: rotate(0deg) scaleY(1);
  }
  75% {
      transform: rotate(-4deg) scaleY(1.01);
  }
  100% {
      transform: rotate(0deg) scaleY(1);
  }
}

.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 20000;
  padding: 12px 20px;
  background: var(--primary-jade, #1c4a3c);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 8px 0;
  transform: translateY(-120%);
  transition: transform 0.2s ease;
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  outline: none;
  box-shadow: var(--focus, 0 0 0 3px rgba(184, 134, 11, 0.35));
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.a11y-live-region {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.page :focus {
  outline: none;
}

.page a:focus-visible,
.page button:focus-visible,
.page input:focus-visible,
.page select:focus-visible,
.page textarea:focus-visible,
.page summary:focus-visible,
.page [tabindex]:not([tabindex="-1"]):focus-visible {
  outline: none;
  box-shadow: var(--focus, 0 0 0 3px rgba(184, 134, 11, 0.35));
}

@media (prefers-reduced-motion: reduce) {
  .icon-swaying {
    animation: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
