/* Quote universe: all five entries remain native browser text. Each row gets
   one strong left-to-right character-light sweep lasting about three seconds,
   followed by an independently timed two-second row gap; a separately timed
   three-second pause closes every cycle. */
.wisdom-quotes-grid-overlay {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 1;
  object-fit: fill;
  pointer-events: none;
  user-select: none;
  shape-rendering: geometricPrecision;
}

.wisdom-quotes-grid-overlay__lines {
  fill: none;
  stroke: #c1842d;
  stroke-width: 1.35;
  stroke-linecap: round;
  opacity: 0.82;
}

.wisdom-private-feature-page[data-quote-typewriter-active="true"]
  .wisdom-quotes-grid-overlay {
  visibility: hidden;
  opacity: 0;
}

.wisdom-quotes-row-layer {
  overflow: hidden;
}

.wisdom-quotes-row-layer > p:is(
  [data-quote-row="1"],
  [data-quote-row="2"],
  [data-quote-row="3"],
  [data-quote-row="4"],
  [data-quote-row="5"]
) {
  z-index: 1;
  pointer-events: auto;
  cursor: pointer;
  outline: none;
  right: 15%;
  left: 15%;
  width: auto;
  max-width: none;
  overflow: visible;
  user-select: text;
  -webkit-user-select: text;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
  font-size: 1.22cqw;
  letter-spacing: .055em;
  line-height: 1.45;
  text-overflow: clip;
  text-shadow: none;
  white-space: pre;
  filter: none;
  transform: none;
  animation: none;
}

.wisdom-quote-live-text__shine,
.wisdom-quote-live-text__character {
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
}

.wisdom-quote-live-text__shine {
  display: flex;
  width: 100%;
  align-items: center;
  white-space: inherit;
}

.wisdom-quote-live-text__body {
  min-width: 0;
}

.wisdom-quote-live-text__attribution {
  flex: 0 0 auto;
  margin-left: auto;
  padding-left: 1.15em;
  text-align: right;
  white-space: nowrap;
}

.wisdom-quote-live-text__character {
  display: inline;
}

.wisdom-quote-live-text[data-quote-shining="true"]
  .wisdom-quote-live-text__character {
  animation: wisdom-quote-character-light-sweep 700ms ease-in-out
    var(--quote-shine-delay, 0ms) 1 both;
  will-change: color, filter, text-shadow;
}

@keyframes wisdom-quote-character-light-sweep {
  0%, 100% {
    color: #3a2a1d;
    filter: brightness(1);
    text-shadow: none;
  }

  36% {
    color: #fffdf0;
    filter: brightness(1.9);
    text-shadow:
      0 0 0.08em #fff,
      0 0 0.24em rgba(255, 251, 205, 1),
      0 0 0.5em rgba(255, 206, 72, 1),
      0 0 0.82em rgba(255, 136, 24, 0.9);
  }
}

.wisdom-quotes-row-layer[data-quote-typewriter-active="true"] > p {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.wisdom-private-feature-page[data-quote-typewriter-active="true"]
  .wisdom-quotes-verification-copy {
  visibility: hidden;
  opacity: 0;
}

.wisdom-quote-typewriter {
  position: absolute;
  z-index: 8;
  top: 10.6%;
  right: 13.5%;
  left: 13.5%;
  display: grid;
  height: 35.6%;
  margin: 0;
  overflow: hidden;
  place-items: center;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  box-shadow: none;
  color: #3a2518;
  cursor: pointer;
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", STSong,
    serif;
  font-size: min(3.08cqw, 6.15cqh);
  font-weight: 650;
  letter-spacing: 0.055em;
  line-break: strict;
  line-height: 1.38;
  pointer-events: auto;
  text-align: left;
  text-rendering: geometricPrecision;
  white-space: break-spaces;
  word-break: normal;
  overflow-wrap: anywhere;
}

.wisdom-quote-typewriter__stage {
  display: grid;
  width: 100%;
  max-width: 100%;
  max-height: 100%;
  overflow: hidden;
}

.wisdom-quote-typewriter__measure,
.wisdom-quote-typewriter__typed {
  grid-area: 1 / 1;
  width: 100%;
}

.wisdom-quote-typewriter__measure,
.wisdom-quote-typewriter__typed {
  display: block;
}

.wisdom-quote-typewriter__measure {
  visibility: hidden;
  pointer-events: none;
}

.wisdom-quote-typewriter__body {
  display: block;
}

.wisdom-quote-typewriter__attribution {
  display: flex;
  width: 100%;
  justify-content: flex-end;
  margin-left: auto;
  margin-top: 0.42em;
  font-size: 0.68em;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.25;
  text-align: right;
  white-space: nowrap;
}

.wisdom-quote-typewriter__attribution-slot {
  display: inline-grid;
  margin-left: auto;
  justify-self: end;
  text-align: right;
}

.wisdom-quote-typewriter__attribution-reserve,
.wisdom-quote-typewriter__attribution-progress {
  grid-area: 1 / 1;
  text-align: right;
}

.wisdom-quote-typewriter__attribution-reserve {
  visibility: hidden;
  pointer-events: none;
}

.wisdom-quote-typewriter__caret {
  display: inline-block;
  width: 0.08em;
  height: 1.08em;
  margin-left: 0.08em;
  background: #a33b21;
  box-shadow: 0 0 0.18em rgba(181, 93, 42, 0.5);
  vertical-align: -0.12em;
  animation: wisdom-quote-typewriter-caret 720ms steps(1, end) infinite;
}

.wisdom-quote-typewriter:focus-visible {
  border-radius: 0.22cqw;
  box-shadow:
    0 0 0 0.1cqw rgba(166, 103, 26, 0.72),
    0 0 0.72cqw rgba(255, 224, 139, 0.48);
}

@keyframes wisdom-quote-typewriter-caret {
  0%, 48% {
    opacity: 1;
  }
  49%, 100% {
    opacity: 0;
  }
}

/* Hard guard: the five quote entries may only contain browser text. */
.wisdom-quotes-row-layer :is(img, picture, canvas, svg) {
  display: none !important;
}

.wisdom-quotes-row-layer > p,
.wisdom-quotes-row-layer > p > * {
  background-image: none !important;
}

.wisdom-quotes-row-layer > p:is(
  [data-quote-row="1"],
  [data-quote-row="2"],
  [data-quote-row="3"],
  [data-quote-row="4"],
  [data-quote-row="5"]
)::after {
  content: none;
  display: none;
  animation: none;
}

.wisdom-quotes-row-layer:has(> p:is(:hover, :focus-visible)) > p:is(
  [data-quote-row="1"],
  [data-quote-row="2"],
  [data-quote-row="3"],
  [data-quote-row="4"],
  [data-quote-row="5"]
) {
  z-index: 12;
}

.wisdom-quotes-row-layer > p:is(
  [data-quote-row="1"],
  [data-quote-row="2"],
  [data-quote-row="3"],
  [data-quote-row="4"],
  [data-quote-row="5"]
):focus-visible {
  border-radius: .18cqw;
  box-shadow: 0 0 0 .1cqw rgba(166, 103, 26, .7), 0 0 .6cqw rgba(255, 224, 139, .45);
}

@media (prefers-reduced-motion: reduce) {
  .wisdom-quote-live-text__character,
  .wisdom-quote-typewriter__caret {
    animation: none !important;
  }
}

/* The original background copy is now real web text so it remains crisp and
   responsive instead of being baked into the image. */
.wisdom-quotes-verification-copy {
  position: absolute;
  z-index: 3;
  top: 76.2%;
  right: 13.4%;
  left: 13.4%;
  margin: 0;
  color: #181611;
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", STSong, serif;
  font-size: 1.55cqw;
  font-weight: 620;
  line-height: 1.42;
  letter-spacing: .015em;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
}

.wisdom-quotes-verification-copy strong {
  color: #c7231c;
  font-weight: 820;
}

/* The arrow is part of the background artwork. This transparent button keeps
   its original appearance while giving the painted control an exact hit area. */
.wisdom-quotes-next-trigger {
  position: absolute;
  z-index: 4;
  top: 48%;
  left: 81.2%;
  width: 4.25%;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 50%;
  outline: none;
  background: transparent;
  cursor: pointer;
}

.wisdom-quotes-next-trigger:focus-visible {
  outline: .12cqw solid rgba(154, 91, 17, .82);
  outline-offset: .18cqw;
}
