/* Chapter covers and reflection cards for the academy topic pages. */
.academy-topic {
  color: #f7e8d7;
  background: radial-gradient(ellipse at 50% 16%, #2b0e19, #10070d 70%);
}

.academy-topic #nav [aria-current="page"] {
  color: #f5d2a0;
  text-decoration-color: #b36e57;
  text-underline-offset: .42em;
}

.academy-topic .topic-page {
  max-width: 76rem;
  padding: clamp(1.4rem, 4vw, 3.25rem) clamp(1rem, 5%, 4rem) clamp(2rem, 6vw, 4rem);
}

.academy-topic .topic-page > section {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 1.8rem);
  padding: 0;
  border: 0;
}

.academy-topic .chapter-heading {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(1.15rem, 4vw, 3rem);
  border: 1px solid #a77a565f;
  background:
    repeating-linear-gradient(169deg, transparent 0 41px, #efbd8b13 42px 43px, transparent 44px 85px),
    linear-gradient(113deg, #270b16 5%, #4f1528 52%, #731b33);
  box-shadow: inset 0 0 48px #17081061;
}

.academy-topic .chapter-heading::after {
  content: attr(data-suit);
  position: absolute;
  z-index: -1;
  top: 50%;
  right: 4%;
  color: #f6c58f23;
  font: clamp(7rem, 22vw, 17rem)/1 Georgia, serif;
  transform: translateY(-49%) rotate(13deg);
}

.academy-topic .chapter-heading .suit {
  color: #f3c893;
  line-height: 1;
  margin: 0;
  font-size: 1.5rem;
}

.academy-topic .chapter-heading h1 {
  max-width: 17ch;
  font-size: clamp(2rem, 5.4vw, 4.5rem);
  margin: .24em 0 .28em;
}

.academy-topic .chapter-heading p {
  max-width: 57ch;
  margin: 0;
  color: #f0d4ca;
}

.academy-topic .expand {
  margin-top: 1.2rem;
  padding: .55rem .85rem;
  border: 1px solid #e4b884a6;
  color: #ffdfb6;
  background: #2b0b178c;
  font: 600 .85rem/1.4 system-ui, sans-serif;
}

.academy-topic .entries {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
}

.academy-topic .entries details {
  overflow: hidden;
  border: 1px solid #91644f83;
  border-radius: .25rem;
  background: #26101b;
}

.academy-topic .entries summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  min-height: 3.35rem;
  list-style: none;
  padding: .65rem clamp(.8rem, 2vw, 1.25rem);
  color: #f7e5d7;
  background: linear-gradient(110deg, #401421, #26101a 85%);
  font: 400 clamp(1rem, 2vw, 1.24rem)/1.3 Georgia, serif;
}

.academy-topic .entries summary::-webkit-details-marker { display: none; }

.academy-topic .entries summary::after {
  content: "";
  flex: none;
  width: .46rem;
  height: .46rem;
  margin: 0 .18rem .18rem 0;
  border-right: 1px solid #eac08b;
  border-bottom: 1px solid #eac08b;
  transform: rotate(45deg);
}

.academy-topic .entries details[open] summary::after {
  transform: translateY(.23rem) rotate(225deg);
}

.academy-topic .entries summary:hover,
.academy-topic .entries details[open] summary {
  background: linear-gradient(110deg, #62192d, #3a1423 85%);
}

.academy-topic .entries summary:focus-visible {
  outline: 2px solid #f3c893;
  outline-offset: -3px;
}

.academy-topic .entries .entry,
.academy-topic .topic-reading {
  display: flow-root;
  padding: .65rem clamp(1rem, 3vw, 1.5rem);
  color: #361d25;
  background: #fbf0e1;
}

.academy-topic .entries .entry h2,
.academy-topic .topic-reading h2 {
  color: #711d36;
  font-size: clamp(1.3rem, 2.6vw, 1.85rem);
  margin: .5em 0;
}

.academy-topic .work-sample-link {
  display: inline-block;
  padding-block: .35rem;
  color: #711d36;
  font-weight: 700;
}

.academy-topic .topic-reading { border-inline-start: 3px solid #a55d63; }

@media (max-width: 44rem) {
  .academy-topic .entries { grid-template-columns: minmax(0, 1fr); }
}

/* The same palette frames the tabs inside Anne’s portfolio. */
.member-topics {
  padding: clamp(.9rem, 4vw, 2.5rem);
  background: linear-gradient(155deg, #421523, #241019 70%);
}

.member-topics nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .4rem;
  padding: 0;
  border: 0;
}

.member-topics nav a {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .65rem .55rem;
  color: #f0d9ca;
  border: 1px solid #a2775e80;
  background: #2a0e19;
  font-size: .87rem;
}

.member-topics nav a > span { color: #e5b780; }

.member-topics nav a {
  position: relative;
  overflow: hidden;
}

.topic-sweep {
  display: none;
}

@media (prefers-reduced-motion: no-preference) {
  .member-topics nav a > .topic-sweep {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-inline-end: 14%;
    pointer-events: none;
    background: linear-gradient(100deg, transparent 24%, #a22643a6 76%, #e2aa78a6);
    font: 1.25rem/1 Georgia, serif;
    animation: topic-card-sweep .27s cubic-bezier(.2, .75, .25, 1) both;
  }

  @keyframes topic-card-sweep {
    from { opacity: 0; transform: translateX(-100%) skewX(-20deg); }
    35% { opacity: 1; }
    to { opacity: 0; transform: translateX(100%) skewX(-20deg); }
  }
}

.member-topics nav a:is(:hover, [aria-selected="true"]) {
  color: #fff1dc;
  border-color: #deab74;
  background: #661b32;
}

.member-topics .chapter {
  max-width: none;
  margin-top: .85rem;
  padding: clamp(1rem, 4vw, 2rem);
  border-inline-start: 3px solid #a55d63;
  background: #fbf0e1;
}

.member-topics .chapter p { max-width: 75ch; }
.member-topics .chapter :is(p, li, blockquote, figcaption) {
  text-align: justify;
}
.member-topics .chapter > h2:first-child { margin-top: 0; }
.member-topics .chapter > :last-child,
.member-topics aside p { margin-bottom: 0; }
.member-topics aside { padding: .75rem 1rem; background: #f1e0ce; }

@media (max-width: 48rem) {
  .member-topics nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
