/*
 * ROW Academy guide body — article text, the contents card (sticky on desktop,
 * a fixed "Contents" bar under the navbar on tablet and phone), the share
 * buttons and the FAQ accordion. components/frontend/AcademyGuide.tsx and
 * AcademyGuideClient.tsx. The quiz keeps its own file (quiz.css, Batch B).
 *
 * Ported from live's guide template stylesheet (.fs-toc_*, .guide-content_*,
 * .share-block_*, .course-faqs_*, .accordion_*) and the page's `cmstable` rules;
 * measured at 1440/1024/768/390 (tmp/academy/d/live/guide-*.json).
 * Academy-only; scoped under .raven-academy.
 */

.raven-academy .fs-toc_example {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  grid-template-rows: auto;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 6rem;
}

.raven-academy .fs-toc_rich-text {
  min-width: 0;
}

/* Article text (live `.fs-toc_richtext`, a Webflow rich text block). */
.raven-academy .fs-toc_richtext {
  /* Pasted body CSS is scoped here (academy-guide-css.ts): nothing in it can stack above the page around the body (R818-54). */
  position: relative;
  isolation: isolate;
  color: var(--academy-ink);
  font-size: 1rem;
  line-height: 1.5rem;
}
/*
 * A guide's body (the only body that takes pasted CSS) clips what it draws, so nothing pasted reaches
 * outside it, a shadow or an outline included (R818-112). Lessons and the Gold and Security templates
 * take no pasted CSS and are left as they were. The clip margin keeps focus rings at the edge whole;
 * clipping does not change margins, so a first heading keeps its top margin.
 */
.raven-academy.section_guide-content:not(.academy-lesson) .fs-toc_richtext {
  overflow: clip;
  overflow-clip-margin: 4px;
}
.raven-academy .fs-toc_richtext::after {
  content: "";
  display: table;
  clear: both;
}
/*
 * Live's Finsweet list wraps every heading's section in its own block, so a body that opens with a
 * heading keeps the heading's top margin (24px on an H2; owner QA, 9 guides); text before the first
 * heading stays the body's first child (margin 0, as Webflow's rich text).
 */
.raven-academy .fs-toc_richtext > :first-child:not(h1, h2, h3, h4, h5, h6) { margin-top: 0; }
.raven-academy .fs-toc_richtext p { margin: 0 0 1rem; }
.raven-academy .fs-toc_richtext h1,
.raven-academy .fs-toc_richtext h2,
.raven-academy .fs-toc_richtext h3,
.raven-academy .fs-toc_richtext h4,
.raven-academy .fs-toc_richtext h5,
.raven-academy .fs-toc_richtext h6 {
  font-family: Inter, Arial, sans-serif;
  color: var(--academy-ink);
  font-weight: 800;
  letter-spacing: normal;
  /* Live: Finsweet TOC fs-toc-offsettop="20rem". */
  scroll-margin-top: 20rem;
}
.raven-academy .fs-toc_richtext h1 { margin: 1.5rem 0 1rem; font-size: 2.125rem; line-height: 1.25; }
.raven-academy .fs-toc_richtext h2 { margin: 1.5rem 0 1rem; font-size: 1.75rem; line-height: 1.25; letter-spacing: -0.03rem; }
.raven-academy .fs-toc_richtext h3 { margin: 0 0 1rem; font-size: 1.5rem; line-height: 1.25; letter-spacing: -0.025rem; }
.raven-academy .fs-toc_richtext h4 { margin: 0 0 1rem; font-size: 1.25rem; line-height: 1.25; }
.raven-academy .fs-toc_richtext h5 { margin: 0 0 1rem; font-size: 1rem; line-height: 1.25; }
.raven-academy .fs-toc_richtext h6 { margin: 1rem 0 0; font-size: 1rem; line-height: 1.25; }
.raven-academy .fs-toc_richtext ul { margin: 1rem 0; padding-inline-start: 1.25rem; overflow: hidden; }
.raven-academy .fs-toc_richtext ol { margin: 1rem 0; padding-inline-start: 1.5rem; overflow: hidden; }
.raven-academy .fs-toc_richtext li { margin: 0; }
.raven-academy .fs-toc_richtext ul li { list-style: disc; }
.raven-academy .fs-toc_richtext ol li { list-style: decimal; }
.raven-academy .fs-toc_richtext a { color: var(--academy-ink); text-decoration: underline; }
.raven-academy .fs-toc_richtext strong { font-weight: 700; }
.raven-academy .fs-toc_richtext blockquote {
  margin: 0 0 1rem;
  padding: 0.75rem 1.25rem;
  border-inline-start: 5px solid #e2e2e2;
  font-size: 1.125rem;
  /* Webflow's base blockquote rule (live: 18px on 22px; 2026-11-15 preview review). */
  line-height: 1.375rem;
}
.raven-academy .fs-toc_richtext img {
  margin: 1.5rem 0;
  border-radius: 1.5rem;
}
.raven-academy .fs-toc_richtext figure {
  position: relative;
  max-width: 60%;
  margin: 0 0 1.5rem;
  border-radius: 1.5rem;
  overflow: hidden;
}
.raven-academy .fs-toc_richtext figure img { width: 100%; }
/* Webflow wraps the picture in an inline-block div, so a fullwidth figure shows it at its own width (max the column); Raven's cleaner drops the div. */
.raven-academy .fs-toc_richtext figure.w-richtext-align-fullwidth > img { width: auto; max-width: 100%; }
.raven-academy .fs-toc_richtext figure div { color: transparent; font-size: 0; }
.raven-academy .fs-toc_richtext figure > div { display: inline-block; max-width: 100%; }
.raven-academy .fs-toc_richtext figure.w-richtext-align-center { clear: both; margin-left: auto; margin-right: auto; display: table; }
.raven-academy .fs-toc_richtext figure.w-richtext-align-normal { clear: both; display: table; }
.raven-academy .fs-toc_richtext figure.w-richtext-align-fullwidth {
  clear: both;
  display: block;
  width: 100%;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.raven-academy .fs-toc_richtext figure.w-richtext-align-fullwidth > div { display: inline-block; padding-bottom: inherit; }
.raven-academy .fs-toc_richtext figure.w-richtext-figure-type-video { width: 60%; height: 0; }
.raven-academy .fs-toc_richtext figure.w-richtext-figure-type-video.w-richtext-align-fullwidth { width: 100%; }
.raven-academy .fs-toc_richtext figure.w-richtext-figure-type-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; }
.raven-academy .fs-toc_richtext figcaption { margin-top: 5px; text-align: center; }

/* Tables: Webflow's base rules for every table, and the page's own rules for class "cmstable". */
.raven-academy .fs-toc_richtext table { border-collapse: collapse; border-spacing: 0; }
.raven-academy .fs-toc_richtext td,
.raven-academy .fs-toc_richtext th { padding: 0; }
/* A header cell is drawn as the browser draws it on live (no rule there; 2026-11-15 preview review):
   centred, unless its table sets its own alignment (pasted tables' style="text-align: left"). */
.raven-academy .fs-toc_richtext th { font-weight: 700; text-align: center; }
.raven-academy .fs-toc_richtext table[style*="text-align"] th { text-align: inherit; }
.raven-academy .fs-toc_richtext table.cmstable {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #ccc;
  border-bottom: none;
  border-radius: 16px;
  overflow: hidden;
}
.raven-academy .fs-toc_richtext .cmstable td,
.raven-academy .fs-toc_richtext .cmstable th {
  padding: 12px 16px;
  border-right: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
}
.raven-academy .fs-toc_richtext .cmstable td { font-weight: normal; }
.raven-academy .fs-toc_richtext .cmstable th { font-weight: bold; }
.raven-academy .fs-toc_richtext .cmstable thead tr { background-color: #ebecef; }
.raven-academy .fs-toc_richtext .cmstable th:last-child,
.raven-academy .fs-toc_richtext .cmstable td:last-child { border-right: none; }
@media (max-width: 768px) {
  .raven-academy .fs-toc_richtext table.cmstable { display: block; overflow-x: auto; white-space: nowrap; }
  .raven-academy .fs-toc_richtext .cmstable td { min-width: 200px; max-width: 200px; overflow-wrap: break-word; word-wrap: break-word; white-space: normal; }
}
.raven-academy .academy-guide-pasted-styles { display: none; }
/* Code block (live: Webflow's w-code-block, whose inline look the cleaner drops; QA-D-2). Box and text
   colour as live; the per-token syntax colours are not carried. */
.raven-academy .fs-toc_richtext pre { display: block; font-family: monospace; overflow-x: auto; background: #2b2b2b; color: #f8f8f2; padding: 0.5em; }
.raven-academy .fs-toc_richtext pre code { font-family: monospace; white-space: pre-wrap; }

/* Pasted tables: live wraps each in its own scrolling box (div.table-container, dropped by the cleaner
   and put back as .academy-table-scroll), so only the table scrolls sideways on a phone (QA-D-5). */
.raven-academy .fs-toc_richtext .academy-table-scroll { max-width: 100%; overflow-x: auto; }

/* ── Sidebar: contents card and share buttons ───────────────────────────── */

.raven-academy .fs-toc_sidebar {
  position: sticky;
  top: 8rem;
  display: flex;
  flex-direction: column;
  flex: none;
  justify-content: flex-start;
  align-items: stretch;
  gap: 1.25rem;
}

.raven-academy .guide-content_toc-wrap.is-desktop {
  display: flex;
  flex-flow: column;
  gap: 1.5rem;
  padding: 2rem;
  border: 1px solid #00000014;
  border-radius: 1.5rem;
}

.raven-academy .fs-toc_link-content {
  display: grid;
  grid-template-columns: 1fr;
}
.raven-academy .fs-toc_link-wrapper { overflow: hidden; }
/*
 * Live: sub-heading wrappers indent 0.75rem per level (Batch E lessons pass flat H3s; guides pass
 * live's nested H2 to H6 list, AcademyGuideClient TocNode, owner QA 2026-11-13).
 */
.raven-academy .fs-toc_link-wrapper.is-h3,
.raven-academy .fs-toc_link-wrapper.is-h4,
.raven-academy .fs-toc_link-wrapper.is-h5,
.raven-academy .fs-toc_link-wrapper.is-h6 { padding-inline-start: 0.75rem; }
/* Live's sub-heading links (guides): 14px, the H3 with 0.025rem letter-spacing. */
.raven-academy .fs-toc_link.is-h3 { font-size: 0.875rem; letter-spacing: 0.025rem; }
.raven-academy .fs-toc_link.is-h4,
.raven-academy .fs-toc_link.is-h5,
.raven-academy .fs-toc_link.is-h6 { font-size: 0.875rem; }
/* The wrapper clips (live), so the focus ring is drawn inside the link (R818-22). */
.raven-academy .fs-toc_link:focus-visible { outline: 2px solid var(--academy-ink); outline-offset: -2px; }
.raven-academy .fs-toc_link {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 0.75rem;
  margin: 0.25rem 0 0.75rem;
  color: var(--academy-ink);
  text-decoration: none;
}
.raven-academy .fs-toc_link.w--current { color: #ff444f; }

.raven-academy .guide-content_social-wrap {
  display: flex;
  flex-flow: row;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  padding-left: 2rem;
  padding-right: 2rem;
}

.raven-academy .share-block_buttons {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 1.5rem;
}
.raven-academy .share-block_button {
  position: relative;
  display: block;
  width: 2rem;
  transition: transform 0.3s;
}
.raven-academy .share-block_button:hover { transform: scale(1.07); }
.raven-academy .share-block_button img { display: block; width: 2rem; height: 2rem; }
.raven-academy .share-block_message-block {
  position: absolute;
  inset: -1.5rem auto auto 0;
  padding: 0.125rem 0.375rem;
  border-radius: 0.5rem;
  background-color: #b1b4bc;
  color: var(--academy-ink);
  transform: scale(0);
  transform-origin: 35% 100%;
  transition: transform 0.2s;
  white-space: nowrap;
}
.raven-academy .share-block_message-block.is-shown { transform: scale(1); }
.raven-academy .share-block_message-decor {
  position: absolute;
  inset: auto auto -0.25rem 32%;
  width: 0.5rem;
  height: 0.25rem;
  border-top: 0.25rem solid #b1b4bc;
  border-right: 0.5rem solid transparent;
}

/* Tablet and phone bar (portalled to <body>, so not inside the section). */
.raven-academy.academy-guide-tocbar { display: none; }

/* ── FAQs ───────────────────────────────────────────────────────────────── */

.raven-academy .course-faqs_component { margin-top: 4rem; }
.raven-academy .course-faqs_text-wrap { text-align: start; }
.raven-academy .course-faqs_accordion-wrap { width: 100%; margin-top: 2rem; }
.raven-academy .course-faqs_item { border-top: 0.0625rem solid #00000014; }
.raven-academy .course-faqs_item:first-child { border-top-style: none; }

.raven-academy .accordion_toggle-block {
  position: relative;
  display: block;
  width: 100%;
  padding: 1.5rem 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: inherit;
  cursor: pointer;
}
.raven-academy .accordion_toggle-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.raven-academy .accordion_toggle-info {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 1.5rem;
  padding-inline-end: 1.5rem;
}
.raven-academy .accordion_toggle-heading {
  font-size: 1.125rem;
  line-height: 1.75rem;
  font-weight: 600;
}
.raven-academy .accordion_toggle-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.25rem;
  color: #000000b8;
  transition: transform 0.24s cubic-bezier(0.65, 0, 0.35, 1);
}
.raven-academy .accordion_dropdown.is-open .accordion_toggle-arrow { transform: rotate(180deg); }
.raven-academy .accordion_expanded-wrapper { padding: 0 0 2rem; }
.raven-academy .accordion_rich-text p { max-width: none; margin: 0; }
.raven-academy .accordion_rich-text a { color: var(--academy-ink); }

@media screen and (min-width: 1440px) {
  .raven-academy .fs-toc_example { gap: 7rem; }
}

@media screen and (max-width: 991px) {
  .raven-academy.section_guide-content { padding-top: 6rem; padding-bottom: 5rem; }
  .raven-academy .fs-toc_example { display: block; }
  .raven-academy .fs-toc_richtext img,
  .raven-academy .fs-toc_richtext figure { border-radius: 1rem; }
  .raven-academy .fs-toc_richtext h3 { font-size: 1.25rem; }
  .raven-academy .fs-toc_richtext h4 { font-size: 1rem; }
  .raven-academy .fs-toc_sidebar { position: relative; top: 0; width: 100%; margin-top: 4rem; }
  .raven-academy .guide-content_toc-wrap.is-desktop { display: none; }

  .raven-academy.academy-guide-tocbar {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    top: 4rem;
    z-index: 99;
  }
  .raven-academy.academy-guide-tocbar .guide-content_toc-wrap {
    width: 100%;
    /* A long list scrolls inside the bar instead of running off a short screen (R818-23). */
    max-height: calc(100dvh - 4rem);
    overflow-y: auto;
    background-color: #fff;
    box-shadow: 0 8px 16px 2px #181c2514;
  }
  .raven-academy.academy-guide-tocbar .guide-content_toc-heading-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 1.25rem 1rem 0.625rem;
    border: 0;
    border-bottom: 1px solid #00000014;
    background: none;
    color: inherit;
    font: inherit;
    text-align: inherit;
    cursor: pointer;
  }
  .raven-academy.academy-guide-tocbar .guide-content_toc-icon {
    display: block;
    width: 1rem;
    height: 0.6rem;
  }
  /* Live: the arrow keeps pointing down when the list is open, and the list has no top/bottom padding (QA-D-9). */
  .raven-academy.academy-guide-tocbar .fs-toc_link-content { padding: 0 1rem; }
  .raven-academy.academy-guide-tocbar .fs-toc_link { margin: 0.25rem 0 0.875rem; }
}

@media screen and (max-width: 767px) {
  .raven-academy.section_guide-content { padding-top: 3rem; padding-bottom: 3rem; }
  .raven-academy .guide-content_social-wrap { padding-top: 0; }
}

@media screen and (max-width: 479px) {
  .raven-academy.academy-guide-tocbar .guide-content_toc-heading-wrap { padding-top: 0.875rem; }
  .raven-academy.academy-guide-tocbar .guide-content_toc-icon { width: 0.875rem; }
  .raven-academy.academy-guide-tocbar .fs-toc_link-content { font-size: 0.875rem; }
  .raven-academy .course-faqs_accordion-wrap { margin-top: 1.5rem; }
}
