/* Resources layout – brand-aligned typography and colors (developers-style) */

/* Hero: darker gray background, smaller vertical padding (like cdata-marketing developers) */
.resources-hero-section {
  background-color: var(--brand-balance);
  padding-top: var(--v-padding-s, 2rem);
  padding-bottom: var(--v-padding-s, 2rem);
}

.resources-hero-title {
  font-size: var(--display-m);
  font-weight: 600;
  color: #231e20;
  margin-top: 0;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.resources-hero-desc {
  font-size: var(--title-s);
  color: #231e20;
  margin-bottom: 0;
  opacity: 0.85;
}

/* Content area – match mft/ and site type scale (display-m, title-s, body-l) */
.resource-doc {
  color: var(--text-fill-1);
  font-family: var(--font-body, "DM Sans", sans-serif);
  font-size: var(--body-l);
  line-height: 1.6;
}

/* In-page anchor offset so fixed header doesn’t cover target */
.resource-doc [id] {
  scroll-margin-top: 100px;
}

.resource-doc h1 {
  font-size: var(--display-m);
  font-weight: 600;
  color: var(--text-fill-1);
  margin-top: 3rem;
  margin-bottom: 1.25rem;
  line-height: 1.2;
}

.resource-doc h2 {
  font-size: var(--display-s);
  font-weight: 600;
  color: var(--text-fill-1);
  margin-top: 2.25rem;
  margin-bottom: 0.875rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--surface-fill-3);
  line-height: 1.3;
}

.resource-doc h2:first-child {
  margin-top: 0;
}

.resource-doc h3,
.resource-doc h4 {
  font-size: var(--headline-m, var(--title-s));
  font-weight: 600;
  color: var(--text-fill-1);
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}

.resource-doc h5 {
  font-size: var(--title-s);
  font-weight: 500;
  color: var(--text-fill-1);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.resource-doc p {
  font-size: var(--body-l);
  color: var(--text-fill-1);
  margin-bottom: 1.125rem;
  line-height: 1.6;
}

.resource-doc a {
  color: var(--brand-resolve);
  text-decoration: none;
}

.resource-doc a:hover {
  text-decoration: underline;
}

.resource-doc ul {
  margin: 1.125rem 0 1.5rem 1.5rem;
  padding-left: 1.25em;
  font-size: var(--body-l);
}

.resource-doc ul li {
  margin-bottom: 0.4em;
  color: var(--text-fill-1);
  line-height: 1.6;
}

.resource-doc ul li ul {
  margin-top: 0.4em;
  margin-bottom: 0.4em;
}

.resource-doc ol {
  margin: 1.125rem 0 1.5rem 1.5rem;
  padding-left: 1.5em;
  font-size: var(--body-l);
}

.resource-doc ol li {
  margin-bottom: 0.4em;
  color: var(--text-fill-1);
  line-height: 1.6;
}

.resource-doc hr {
  margin: 1.5rem 0;
  border: 0;
  border-top: 1px solid var(--surface-fill-3);
}

.resource-doc sup {
  font-size: 0.75em;
}

/* Left sidebar – developers-style (sidebar-sticky, table-of-contents) */
.resources_content .sidebar-title {
  cursor: pointer;
}

.resources_content .sidebar-sticky {
  position: sticky;
  top: 95px;
  margin-bottom: 1.5rem;
  max-height: 600px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.resources_content #table-of-contents ul,
.resources_content #table-of-contents li {
  padding: 0;
  margin: 0;
  list-style: none;
}

.resources_content #table-of-contents .toc-h2 > a {
  padding-left: 1.5rem;
}

.resources_content #table-of-contents .toc-h3 > a,
.resources_content #table-of-contents .toc-h5 > a,
.resources_content #table-of-contents .toc-h6 > a {
  padding-left: 40px;
  padding-top: 0.3rem;
  padding-bottom: 0.3rem;
  padding-right: 0;
}

.resources_content #table-of-contents .toc-h4 > a {
  padding-left: 60px;
  padding-top: 0.2rem;
  padding-bottom: 0.2rem;
  padding-right: 0;
  font-size: 93%;
  line-height: 1.5;
}

.resources_content #table-of-contents a {
  text-decoration: none;
  overflow: initial;
  display: block;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  color: var(--text-fill-3, #505050);
  background: none;
  border-left: 3px solid var(--surface-fill-3, #e5e5e5);
  white-space: normal;
}

.resources_content #table-of-contents a:hover {
  border-left-color: var(--surface-fill-4, #ccc);
  color: var(--text-fill-1, #231e20);
}

.resources_content #table-of-contents a.active {
  border-left-color: var(--brand-resolve, #00A0FF);
  color: var(--brand-resolve, #00A0FF);
  font-weight: 500;
}

.resources_content #table-of-contents .toc-h3 > a.active,
.resources_content #table-of-contents .toc-h4 > a.active {
  border-left-color: #b9b9b9;
}

/* Only the direct link of the active item (current page or scrollspy target), not its subnodes */
.resources_content #table-of-contents li.active > a {
  color: var(--brand-resolve, #00A0FF);
  font-weight: 700;
}

/* Breadcrumbs */
.resources_content .breadcrumbs a.selected {
  color: var(--text-fill-2);
}

/* Legacy CTA / nav-pills (if still used on other resource pages) */
.cta {
  margin-top: 40px;
  text-align: center;
  padding: 50px;
  width: 100%;
  height: auto;
}

.nav-pills > li.active > a {
  background-color: var(--brand-resolve);
}

.nav-pills > li.active > a:hover {
  opacity: 0.9;
}
