.entry-content .study-guide {
  --study-accent: var(--wp--preset--color--key-color, #2d5f9a);
  --study-ink: #26384c;
  --study-muted: #4b5c72;
  --study-paper: #f3f8ff;
  --study-line: #d4e0ee;
  box-sizing: border-box;
  clear: both;
  margin: .9rem 0 1.75rem;
  padding: clamp(.75rem, 2.5vw, 1.1rem);
  border: 1px solid var(--study-line);
  border-inline-start: 3px solid var(--study-accent);
  border-radius: 6px;
  background: var(--study-paper);
  color: var(--study-ink);
  line-height: 1.5;
  scroll-margin-top: var(--sgo-heading-offset, 7rem);
}

.entry-content .study-guide--english {
  --study-accent: var(--wp--preset--color--key-color, #287363);
  --study-ink: #233c33;
  --study-muted: #4b6056;
  --study-paper: #faf7ef;
  --study-line: #d9e4d9;
}

.entry-content .study-guide__header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .2rem .8rem;
  margin-bottom: .65rem;
}

.entry-content .study-guide__title,
.entry-content .study-guide__legacy-title h2 {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--study-ink);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5;
}

.entry-content .study-guide__context {
  margin: 0;
  color: var(--study-muted);
  font-size: .82rem;
  overflow-wrap: anywhere;
}

.entry-content .study-guide :is(.study-guide__cards, .study-guide__footer) {
  margin: 0;
  padding: 0;
  list-style: none;
}

.entry-content .study-guide :is(.study-guide__cards, .study-guide__footer) > li {
  display: flex;
  min-width: 0;
  margin: 0;
  padding: 0;
}

.entry-content .study-guide__cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12.5rem), 1fr));
  gap: .4rem;
}

.entry-content .study-guide__cards--forms {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 5.35rem), 1fr));
}

.entry-content .study-guide__cards a {
  display: flex;
  position: relative;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  min-height: 44px;
  box-sizing: border-box;
  padding: .45rem 1.55rem .45rem .68rem;
  border: 1px solid var(--study-line);
  border-radius: 5px;
  background: #fff;
  color: var(--study-ink);
  font-size: .88rem;
  font-weight: 650;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.entry-content .study-guide__cards a::after {
  content: "";
  position: absolute;
  inset-inline-end: .65rem;
  inset-block-start: calc(50% - .2rem);
  width: .34rem;
  height: .34rem;
  border: solid var(--study-accent);
  border-width: 1.5px 1.5px 0 0;
  transform: rotate(45deg);
}

.entry-content .study-guide__cards--forms a {
  align-items: center;
  padding: .42rem .24rem;
  text-align: center;
}

.entry-content .study-guide__cards--forms a::after { display: none; }
.entry-content .study-guide__cards small {
  color: var(--study-accent);
  font-size: .75rem;
  line-height: 1.4;
}

.entry-content .study-guide__cards a:hover {
  border-color: var(--study-accent);
  color: var(--study-accent);
  text-decoration: underline;
  text-underline-offset: .16em;
}

.entry-content .study-guide__more {
  margin-top: .65rem;
  border-top: 1px solid var(--study-line);
}

.entry-content .study-guide__more > summary,
.entry-content .study-guide__outline > summary {
  padding: .65rem .2rem;
  color: var(--study-ink);
  cursor: pointer;
  font-size: .85rem;
  font-weight: 700;
}

.entry-content .study-guide__footer {
  display: flex;
  flex-wrap: wrap;
  gap: .1rem .9rem;
  margin-top: .35rem !important;
}

.entry-content .study-guide__footer a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  color: var(--study-accent);
  font-size: .82rem;
  text-decoration: underline;
  text-underline-offset: .16em;
  overflow-wrap: anywhere;
}

.entry-content .study-guide :is(a,summary):focus-visible,
.entry-content .study-guide__outline :is(a,summary):focus-visible {
  outline: 2px solid var(--wp--preset--color--key-color, #2d5f9a);
  outline-offset: 2px;
}

.entry-content .study-guide__outline {
  --study-ink: #2b3741;
  margin: .75rem 0;
  padding: 0 .8rem;
  border: 1px solid #d9e1e9;
  border-radius: 6px;
}

.entry-content .study-guide__outline > ol { margin: 0 0 .8rem 1.5rem; }
.entry-content .study-guide__outline .study-guide__outline-child { margin-inline-start: .8rem; }
.entry-content [id^="study-section-"] { scroll-margin-top: var(--sgo-heading-offset, 7rem); }

@media (max-width: 480px) {
  .entry-content .study-guide__cards { grid-template-columns: minmax(0, 1fr); }
  .entry-content .study-guide__cards--forms { grid-template-columns: repeat(auto-fit, minmax(min(100%, 4.8rem), 1fr)); }
  .entry-content .study-guide__footer a { min-height: 44px; }
}

@media print {
  .entry-content :is(.study-guide, .study-guide__outline) { display: none; }
}
