html {
  --navTopicHeight: 52px;
  --navBgColor: #2c4e76;
  --navBtnColor: ivory;
  --navTxtColor: #0c0a68;
  --navBtnHover: #070644;
  --navTxtHover: ivory;
  --T1BgColor: #0c0c1b;
  --T99BgColor: #2c4e76;
  --h1Color: rgb(255, 255, 255);
  --pColor: ivory;
  --bookHover: #138dbe;
}

#T1:before {
  background: var(--T1BgColor);
}

#T99:before {
  background: var(--T99BgColor);
}

body {
  overflow-x: hidden;
}

/* 選單 */

.nav-topic li {
  scroll-snap-align: unset;
}

.cteeLogo {
  display: block;
  width: clamp(120px, 20vw, 160px);
  margin-bottom: 1em;
}

.topic-cover__header {
  padding: 0 1em 3%;
  height: 70vh;
  display: grid;
  align-content: end;
  position: relative;
  box-sizing: border-box;
  user-select: none;
}

.fixedBg:before {
  --scanLineColor: #0005;
  content: "";
  position: absolute;
  display: block;
  inset: 0;
  margin: auto;
  background: linear-gradient(to top, transparent 1px, var(--scanLineColor) 1px);
  background-size: 100% 2px;
}

.hero {
  color: var(--navTxtHover);
  height: fit-content;
  align-self: center;
  padding: 2em 1em 1em;
  box-sizing: border-box;
  width: clamp(320px, 100%, 760px);
  margin-inline: auto;
  background: #0007;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 0.25rem;
}

@media (max-width: 849px) {
  .topic-cover__header {
    padding-block: 1em;
    height: unset;
  }
}

.cover-title {
  width: fit-content;
  margin-inline: auto;
}

.hero > a {
  display: block;
}

.hero h1 {
  display: inline-block;
  padding-block: 0.3rem;
  font:
    800 clamp(1.8em, 4.2vw, 3em) / 1.2 Montserrat,
    "Noto Sans TC" !important;
  color: var(--h1Color);
  text-align: center;
}

.hero span {
  display: inline-block;
  font-weight: 700;
  margin-left: 1rem;
}

.cover-title p {
  color: var(--pColor);
  font-family: "Noto Serif TC", Serif;
  text-align: center;
  position: relative;
}

.cover-title p:before,
.cover-title p:after {
  content: "";
  position: absolute;
  inset: 0 calc(50% + 7em) 0 0;
  margin: auto;
  background: var(--pColor);
  height: 1px;
}
.cover-title p:after {
  inset: 0 0 0 calc(50% + 6.5em);
}

.cover-title ~ p {
  width: 85%;
  margin-inline: auto;
  font-size: 0.88em;
  color: var(--pColor);
}

/* 內容各區塊 */

.box-title {
  color: var(--pColor);
  text-align: left;
  font: 600 1.3em/1 "Noto Sans TC";
  position: relative;
  width: fit-content;
  padding-left: 1em;
}

.box-title:before {
  position: absolute;
  content: "";
  width: 0;
  height: 0;
  inset: 0 auto 0 0;
  margin: auto;
  border: 0.5em solid;
  border-color: transparent transparent transparent var(--pColor);
}

.group-box {
  padding-inline: 1em;
  max-width: 1220px;
}

.col--4 {
  align-items: stretch;
  gap: 1rem;
}

.book__card {
  display: grid;
  grid-template-rows: 280px auto auto;
  align-items: center;
  background: #fff;
  border-radius: 0.25em;
  padding: 1em;
  gap: 0.2em;
  position: relative;
  overflow: hidden;
}

.book__card:before,
.book__card:after {
  content: "";
  background: var(--bookHover);
  width: 100%;
  height: 0;
  position: absolute;
  transition: height 500ms ease-out;
}

.book__card:before {
  top: 0;
}

.book__card:after {
  bottom: 0;
}

.book__card:hover:before {
  border-radius: 0.25em 0.25em 0 0;
  height: 8px;
  transition: height 500ms ease-out;
}

.book__card:hover:after {
  border-radius: 0 0 0.25em 0.25em;
  height: 8px;
  transition: height 500ms ease-out;
}

.book__card:hover img {
  transform: scale(1.15);
  transition: transform 500ms ease-out 30ms;
}

.book__card img {
  align-self: center;
  max-height: 250px;
  width: auto;
  max-width: 200px;
  margin-inline: auto;
  transition: transform 500ms ease-out 30ms;
}

.book-title {
  text-align: center;
  align-self: start;
}

.book-title a {
  color: var(--navTxtColor);
  /* color: #138dbe; */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  height: 3em;
}

.book-title a:hover {
  text-decoration: none;
}

.note {
  grid-column: 1/-1;
  color: var(--navTxtHover);
  font-size: 0.78em;
  text-align: center;
  margin-block: 1rem;
}

.note a {
  color: var(--bookHover);
}

#T99 h3 {
  color: var(--navTxtHover);
}

#T99 h3:before {
  border-color: transparent transparent transparent var(--navTxtHover);
}

#T99 ul,
#T99 li {
  list-style: none;
  margin: 0;
  padding: 0;
}

#T99 ul {
  gap: 1em;
  margin-top: 1em;
}

#T99 img {
  border-radius: 0.25rem;
  transition: transform 500ms ease-out 30ms;
}

#T99 img:hover {
  transform: scale(1.08);
  transition: transform 500ms ease-out 30ms;
}
