:root {
  --pst-purple: #6f22ed;
  --pst-dark-purple: #520fbd;
  --pst-deep-purple: #3d1185;
  --pst-citrus: #c6f125;
  --pst-powder-blue: #d5eef4;
  --pst-pale-violet: #d8c8f8;
  --pst-black: #222;
  --pst-white: #fff;
  --pst-gray: #6c757d;
  --pst-border: #e8e4f2;
  --pst-sidebar-width: 20rem;
  --pst-font: "Inclusive Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --pst-display: "Barlow", var(--pst-font);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--pst-white);
  color: var(--pst-black);
  font-family: var(--pst-font);
  font-size: 1rem;
  line-height: 1.5;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--pst-purple);
}

a:hover,
a:focus-visible {
  color: var(--pst-dark-purple);
}

.pst-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--pst-purple);
  color: var(--pst-white);
  padding: 0.75rem 1rem;
  z-index: 100;
}

.pst-skip:focus {
  left: 1rem;
  top: 1rem;
}

.pst {
  display: grid;
  grid-template-columns: var(--pst-sidebar-width) 1fr;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(213, 238, 244, 0.55) 0%, rgba(255, 255, 255, 0) 18rem),
    var(--pst-white);
}

/* When iframe-embedded, height follows content so the parent can resize. */
.pst--embedded {
  min-height: 0;
}

.pst--embedded .pst-sidebar {
  position: relative;
  top: auto;
  height: auto;
  align-self: stretch;
  max-height: none;
}

.pst-sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  overflow: auto;
  background: var(--pst-deep-purple);
  color: var(--pst-white);
  padding: 1.5rem 1rem 2rem;
}

.pst-sidebar__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--pst-citrus);
  font-weight: 600;
}

.pst-sidebar__title {
  margin: 0 0 1.5rem;
  font-family: var(--pst-display);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}

.pst-toc {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.pst-toc__section,
.pst-toc__step {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  border-radius: 0.5rem;
  padding: 0.75rem 0.85rem;
}

.pst-toc__section {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  font-weight: 600;
  line-height: 1.25;
}

.pst-toc__section-title {
  font-family: var(--pst-display);
  font-size: 1rem;
}

.pst-toc__section-count {
  font-size: 0.875rem;
  font-weight: 500;
  opacity: 0.85;
}

.pst-toc__step {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.45rem 0.85rem 0.45rem 1.15rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.35;
}

.pst-toc__step::before {
  content: "";
  flex: 0 0 auto;
  width: 0;
  height: 0;
  margin-top: 0.4rem;
  border-style: solid;
  border-width: 0.28rem 0 0.28rem 0.4rem;
  border-color: transparent transparent transparent currentColor;
  opacity: 0.9;
}

.pst-toc__step-label {
  flex: 1;
}

.pst-toc__section:hover,
.pst-toc__step:hover,
.pst-toc__section:focus-visible,
.pst-toc__step:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  outline: none;
}

.pst-toc__section.is-active {
  background: var(--pst-citrus);
  color: var(--pst-deep-purple);
  box-shadow: inset 4px 0 0 var(--pst-citrus);
  filter: brightness(1);
}

.pst-toc__section.is-active .pst-toc__section-count {
  opacity: 0.8;
}

.pst-toc__step.is-active {
  background: rgba(111, 34, 237, 0.45);
  color: var(--pst-white);
}

.pst-toc__step[hidden] {
  display: none;
}

.pst-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.pst-toolbar,
.pst-footer-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--pst-border);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  position: sticky;
  top: 0;
  z-index: 5;
}

.pst-footer-pager {
  position: static;
  border-bottom: 0;
  border-top: 1px solid var(--pst-border);
  margin-top: auto;
}

.pst-pager {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pst-pager__status {
  margin: 0;
  font-weight: 600;
  font-family: var(--pst-display);
  color: var(--pst-deep-purple);
  white-space: nowrap;
}

.pst-nav-btn {
  appearance: none;
  border: 2px solid var(--pst-purple);
  background: var(--pst-white);
  color: var(--pst-purple);
  font: inherit;
  font-weight: 600;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
}

.pst-nav-btn:hover,
.pst-nav-btn:focus-visible {
  background: var(--pst-purple);
  color: var(--pst-white);
  outline: none;
}

.pst-nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pst-nav-btn:disabled:hover {
  background: var(--pst-white);
  color: var(--pst-purple);
}

#pst-menu-toggle {
  display: none;
}

.pst-content {
  padding: 2rem 1.5rem 3rem;
  max-width: 52rem;
  width: 100%;
  margin: 0 auto;
}

.pst-content:focus {
  outline: none;
}

.book-section-content h1,
.book-section-content h2,
.book-section-content h3,
.book-section-content h4 {
  font-family: var(--pst-display);
  color: var(--pst-purple);
  line-height: 1.2;
  font-weight: 700;
}

.book-section-content h3 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  margin: 0 0 1.25rem;
}

.book-section-content p,
.book-section-content li {
  font-size: 1.0625rem;
}

.book-section-content blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 0.25rem solid var(--pst-citrus);
  background: var(--pst-powder-blue);
  border-radius: 0 0.75rem 0.75rem 0;
}

.book-section-content .video-iframe {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 0 0 1.5rem;
  background: var(--pst-pale-violet);
  border-radius: 0.75rem;
  overflow: hidden;
}

.book-section-content .video-iframe iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.book-section-content img.aligncenter,
.book-section-content .aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.pst-download,
.book-section-content a.download-toolkit,
.book-section-content .download-toolkit {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  background: var(--pst-purple);
  color: var(--pst-white) !important;
  text-decoration: none;
  font-weight: 600;
}

.pst-download:hover,
.book-section-content a.download-toolkit:hover {
  background: var(--pst-dark-purple);
}

.pst-download--primary {
  font-size: 1.0625rem;
  margin-bottom: 1.5rem;
}

.pst-download-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.pst-download-table th,
.pst-download-table td {
  text-align: left;
  padding: 0.85rem 0.75rem;
  border-bottom: 1px solid var(--pst-border);
  vertical-align: middle;
}

.pst-download-table th {
  font-family: var(--pst-display);
  color: var(--pst-deep-purple);
  font-size: 0.9375rem;
}

.toolkit-download-svg {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

@media (max-width: 900px) {
  .pst {
    grid-template-columns: 1fr;
  }

  .pst-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(22rem, 88vw);
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    z-index: 20;
    box-shadow: 0 0 0 100vmax rgba(34, 34, 34, 0.35);
  }

  .pst.is-nav-open .pst-sidebar {
    transform: translateX(0);
  }

  #pst-menu-toggle {
    display: inline-flex;
  }

  .pst-toolbar {
    flex-wrap: wrap;
  }

  .pst-pager {
    order: 3;
    width: 100%;
    justify-content: space-between;
  }
}

@media print {
  .pst-sidebar,
  .pst-toolbar,
  .pst-footer-pager,
  #pst-menu-toggle {
    display: none !important;
  }

  .pst {
    display: block;
    background: #fff;
  }

  .pst-content {
    max-width: none;
    padding: 0;
  }
}
