.section.rich-text {
  --rt-accent: var(--color-primary, #ffcd02);
  --rt-accent-soft: color-mix(in srgb, var(--rt-accent) 18%, transparent);
  --rt-accent-wash: color-mix(in srgb, var(--rt-accent) 12%, #ffffff);
  --rt-accent-text: color-mix(in srgb, var(--rt-accent) 70%, #1b1b1b);
  background:
    radial-gradient(640px 320px at 10% 0%, color-mix(in srgb, var(--rt-accent) 8%, transparent), transparent 70%),
    #f6f7fb;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.section.rich-text .container {
  max-width: var(--container);
}

.section.rich-text .rich-text__header {
  max-width: 70ch;
  margin: 0 auto 36px;
  text-align: center;
}

.section.rich-text .rich-text__title {
  margin: 0 0 12px;
  font-size: clamp(1.9rem, 1.3rem + 1.6vw, 2.6rem);
  color: #0f172a;
}

.section.rich-text .rich-text__intro {
  margin: 0;
  color: #475569;
  font-size: 1.05rem;
  line-height: 1.7;
}

.section.rich-text .rich-text {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

.section.rich-text .rich-text > *:first-child {
  margin-top: 0;
}

.section.rich-text .rich-text__longform {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  align-items: start;
}

.section.rich-text.rich-text--toc-wide .rich-text__longform {
  grid-template-columns: minmax(400px, 440px) minmax(0, 1fr);
}

.section.rich-text .rich-text__toc {
  position: sticky;
  top: 120px;
  align-self: start;
  padding: 20px 18px;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), #ffffff 55%),
    radial-gradient(220px 120px at 15% 0%, rgba(15, 23, 42, 0.04), transparent 70%);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow:
    0 24px 48px rgba(15, 23, 42, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.section.rich-text .rich-text__toc-title {
  margin: 0 0 14px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(15, 23, 42, 0.7);
}

.section.rich-text .rich-text__toc-list {
  display: grid;
  gap: 12px;
}

.section.rich-text .rich-text__toc-item {
  display: block;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  color: #0f172a;
  font-weight: 650;
  background: rgba(15, 23, 42, 0.015);
  text-align: left;
  cursor: pointer;
  position: relative;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.section.rich-text .rich-text__toc-item:hover,
.section.rich-text .rich-text__toc-item:focus-visible,
.section.rich-text .rich-text__toc-item.is-active {
  border-color: rgba(15, 23, 42, 0.12);
  background: var(--rt-accent-wash);
  color: var(--rt-accent-text);
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
}

.section.rich-text .rich-text__content {
  background: #ffffff;
  border-radius: 24px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  padding: 32px 36px;
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.08);
  max-width: 860px;
  width: 100%;
  justify-self: start;
}

.section.rich-text .rich-text__panel {
  display: none;
  padding-bottom: 28px;
  margin-bottom: 28px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.section.rich-text .rich-text__panel.is-active {
  display: block;
}

.section.rich-text .rich-text__panel:last-child {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: 0;
}

.section.rich-text .rich-text__panel h2 {
  margin: 0 0 24px;
  padding-left: 12px;
  border-left: 4px solid var(--rt-accent);
  font-size: clamp(1.6rem, 1.1rem + 1.1vw, 2.1rem);
}

.section.rich-text .rich-text__panel h3 {
  margin-top: 18px;
  font-size: clamp(1.1rem, 1rem + 0.4vw, 1.35rem);
  color: #111827;
}

.section.rich-text .rich-text p {
  max-width: 74ch;
  line-height: 1.7;
}

.section.rich-text .rich-text ul,
.section.rich-text .rich-text ol {
  padding: 14px 18px;
  margin: 0 0 var(--space-5);
  display: grid;
  gap: 10px;
  background: rgba(15, 23, 42, 0.02);
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  list-style: none;
}

.section.rich-text .rich-text li {
  line-height: 1.6;
  position: relative;
  padding-left: 18px;
}

.section.rich-text .rich-text ul li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.7em;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--rt-accent-text);
}

.section.rich-text .rich-text ol {
  counter-reset: richtext-ol;
}

.section.rich-text .rich-text ol li {
  counter-increment: richtext-ol;
}

.section.rich-text .rich-text ol li::before {
  content: counter(richtext-ol) ".";
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 700;
  color: var(--rt-accent-text);
}

.section.rich-text .rich-text a {
  color: var(--color-accent);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.section.rich-text .rich-text a:hover,
.section.rich-text .rich-text a:focus-visible {
  color: #2f9d78;
}
