/* ============================================================================
   resources.css — boreal.vc Resources section (listing + reader pages).
   Recomposes the site's own tokens: Plus Jakarta Sans for small labels, Crimson Pro
   for titles and long copy, off-white paper, ink, forest, grey rules. No new colour,
   no cards: hairlines, one accent, pages laid on paper like sheets.
   ============================================================================ */
:root {
  --rs-ink: #011814;
  --rs-paper: #f9f7f1;
  --rs-paper-2: #f0efea;
  --rs-rule: #e5e6e6;
  --rs-rule-2: #dfdfdf;
  --rs-muted: #26403d;
  --rs-forest: #021c18;
  --rs-lime: #c7f29c;
  --rs-serif: 'Crimson Pro', Georgia, serif;
  --rs-sans: 'Plus Jakarta Sans', system-ui, sans-serif;
  --rs-nav-h: 70px;
}

/* ---- page frame (same skeleton as /our-team, on paper instead of forest) ---- */
.body-resources {
  background-color: var(--rs-paper);
  color: var(--rs-ink);
  display: flex;
  flex-flow: column;
  justify-content: flex-start;
  align-items: center;
  min-height: 100vh;
  transition: none;
}
.body-resources .main-content { width: 100%; }
.rs-section { width: 100%; }
.rs-wrap {
  width: 100%;
  max-width: 972px;
  margin: 0 auto;
  padding: 0 20px;
}
.rs-head { padding-top: calc(var(--rs-nav-h) + 56px); padding-bottom: 36px; border-bottom: 1px solid var(--rs-rule); }
.rs-list .rs-head { max-width: 720px; }

/* ---- type ---- */
.rs-eyebrow {
  font-family: var(--rs-serif);
  font-weight: 200;
  font-size: 18px;
  letter-spacing: .2em;
  line-height: 130%;
  color: var(--rs-ink);
  text-transform: uppercase;
  margin: 0 0 18px;
}
.rs-title {
  font-family: var(--rs-serif);
  font-weight: 200;
  font-size: min(max(28px, 3vw + .4rem), 40px);
  line-height: 110%;
  margin: 0 0 18px;
  color: var(--rs-ink);
}
.rs-intro, .rs-summary {
  font-family: var(--rs-serif);
  font-weight: 300;
  font-size: 21px;
  line-height: 135%;
  color: var(--rs-ink);
  margin: 0;
}
.rs-meta, .rs-stats, .rs-row-date, .rs-row-kind, .rs-row-stats, .rs-byline-text, .rs-crumb, .rs-back, .rs-langnote {
  font-family: var(--rs-sans);
  font-size: 13px;
  line-height: 140%;
  color: var(--rs-muted);
}
.rs-meta { text-transform: uppercase; letter-spacing: .12em; margin: 0 0 14px; }
.rs-stats { margin-top: 18px; }
.rs-section a { color: inherit; text-decoration: none; }

/* ---- featured document ---- */
.rs-featured {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 48px;
  align-items: start;
  padding: 48px 0 56px;
}
.rs-featured-cover { display: block; }
.rs-cover-img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(1, 24, 20, .08);
  box-shadow: 0 1px 2px rgba(1, 24, 20, .06), 0 18px 40px -12px rgba(1, 24, 20, .22);
  background: #fff;
  transition: transform .4s ease, box-shadow .4s ease;
}
.rs-featured-cover:hover .rs-cover-img { transform: translateY(-3px); box-shadow: 0 1px 2px rgba(1, 24, 20, .06), 0 24px 48px -12px rgba(1, 24, 20, .28); }
.rs-featured-title {
  font-family: var(--rs-serif);
  font-weight: 300;
  font-size: min(max(28px, 2.6vw + .6rem), 38px);
  line-height: 110%;
  margin: 0 0 12px;
}
.rs-featured-subtitle, .rs-doc-subtitle {
  font-family: var(--rs-serif);
  font-weight: 300;
  font-size: 22px;
  line-height: 125%;
  color: var(--rs-muted);
  margin: 0 0 20px;
}
.rs-featured .rs-summary { font-size: 19px; }
.rs-byline { display: flex; align-items: center; gap: 12px; margin-top: 26px; }
.rs-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; object-position: top; background: var(--rs-paper-2); }
.rs-byline-text { display: flex; flex-direction: column; color: var(--rs-ink); }
.rs-author-title { color: var(--rs-muted); }
.rs-readlink {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  font-family: var(--rs-sans);
  font-size: 16px;
  color: var(--rs-ink);
  text-decoration-color: var(--rs-lime);
}
.rs-readlink img { width: 22px; height: auto; transition: transform .3s ease; }
.rs-readlink:hover img { transform: translateX(6px); }
.rs-readlink:hover span { text-decoration: underline; text-decoration-color: var(--rs-lime); text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* ---- filters: the site's FUND 1 / FUND 2 tab look ---- */
.rs-filters { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 0 18px; border-bottom: 1px solid var(--rs-rule-2); }
.rs-filter {
  appearance: none; background: transparent; border: 0; cursor: pointer;
  font-family: var(--rs-sans); font-size: 14px; font-weight: 400; color: var(--rs-ink);
  padding: 9px 22px; border-radius: 999px; letter-spacing: .02em;
}
.rs-filter:hover { background: var(--rs-paper-2); }
.rs-filter.is-on { background: #c8c8c8; }

/* ---- index rows (hairlines, not cards) ---- */
.rs-index { list-style: none; margin: 0; padding: 0; }
.rs-row { margin: 0; padding: 0; border-bottom: 1px solid var(--rs-rule); }
.rs-row.is-hidden { display: none; }
.rs-row-link {
  display: grid;
  grid-template-columns: 44px 88px 120px minmax(0, 1fr) auto 28px;
  gap: 22px;
  align-items: center;
  padding: 20px 12px;
  margin: 0 -12px;
  transition: background-color .25s ease;
}
.rs-row-link:hover { background: var(--rs-paper-2); }
.rs-row-thumb { width: 44px; height: auto; display: block; border: 1px solid rgba(1, 24, 20, .1); background: #fff; }
.rs-row-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rs-row-title { font-family: var(--rs-serif); font-weight: 400; font-size: 23px; line-height: 120%; color: var(--rs-ink); }
.rs-row-sub { font-family: var(--rs-serif); font-weight: 300; font-size: 18px; line-height: 125%; color: var(--rs-muted); }
.rs-row-lang { font-family: var(--rs-sans); font-size: 11px; letter-spacing: .1em; color: var(--rs-muted); border: 1px solid var(--rs-rule-2); border-radius: 3px; padding: 1px 5px; margin-left: 8px; vertical-align: middle; }
.rs-row-stats { white-space: nowrap; text-align: right; }
.rs-row-arrow { font-family: var(--rs-sans); font-size: 20px; color: var(--rs-ink); text-align: right; transition: transform .3s ease; }
.rs-row-link:hover .rs-row-arrow { transform: translateX(5px); }
.rs-row-ext .rs-row-arrow { font-size: 17px; }
.rs-empty { font-family: var(--rs-serif); font-weight: 300; font-size: 21px; color: var(--rs-muted); padding: 40px 0; }
.rs-list .rs-index { margin-bottom: 72px; }

/* ---- reader page: document header ---- */
.rs-crumb { padding-top: calc(var(--rs-nav-h) + 44px); }
.rs-crumb a::before { content: '←'; margin-right: 8px; }
.rs-crumb a:hover, .rs-back a:hover { text-decoration: underline; text-decoration-color: var(--rs-lime); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.rs-doc-head { padding: 22px 0 40px; max-width: 760px; }
.rs-doc-title {
  font-family: var(--rs-serif);
  font-weight: 200;
  font-size: min(max(32px, 3.4vw + .4rem), 48px);
  line-height: 105%;
  margin: 0 0 14px;
  color: var(--rs-ink);
}
.rs-doc-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; margin-top: 8px; }
.rs-doc-foot .rs-stats { margin: 0; }
.rs-doc-foot .rs-stats a { text-decoration: underline; text-decoration-color: var(--rs-rule-2); text-underline-offset: 3px; }
.rs-doc-foot .rs-stats a:hover { text-decoration-color: var(--rs-lime); }
.rs-langnote { margin: 20px 0 0; padding: 10px 0 0; border-top: 1px solid var(--rs-rule); }

/* ---- the reader ---- */
.rs-band { width: 100%; background: var(--rs-paper-2); border-top: 1px solid var(--rs-rule); border-bottom: 1px solid var(--rs-rule); }
.rs-reader { position: relative; width: 100%; max-width: 1100px; margin: 0 auto; outline: none; }
.rs-toolbar {
  position: sticky;
  top: var(--rs-nav-h);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 18px;
  height: 46px;
  padding: 0 20px;
  background: rgba(249, 247, 241, .94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rs-rule);
  font-family: var(--rs-sans);
  font-size: 13px;
  color: var(--rs-ink);
}
.rs-tool-title { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--rs-muted); }
.rs-tool-pages { white-space: nowrap; font-variant-numeric: tabular-nums; }
.rs-tool-sep { margin: 0 5px; color: var(--rs-muted); }
.rs-tool-actions { display: flex; align-items: center; gap: 8px; }
.rs-btn {
  appearance: none; cursor: pointer; background: transparent;
  border: 1px solid rgba(1, 24, 20, .28); border-radius: 99999px;
  min-width: 28px; height: 28px; padding: 0 10px;
  font-family: var(--rs-sans); font-size: 13px; line-height: 1; color: var(--rs-ink);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background-color .2s ease, border-color .2s ease;
}
.rs-btn:hover { background: var(--rs-rule); border-color: var(--rs-ink); }
.rs-btn[disabled] { opacity: .4; cursor: default; }
.rs-btn-text { padding: 0 14px; }
.rs-pages { display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 30px 16px 56px; }
.rs-page {
  position: relative;
  background: #fff;
  box-shadow: 0 1px 2px rgba(1, 24, 20, .06), 0 10px 28px -8px rgba(1, 24, 20, .18);
  overflow: hidden;
  contain: content;
}
.rs-page canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.rs-page.is-loading::after {
  content: ''; position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px;
  border: 1px solid var(--rs-rule-2); border-top-color: var(--rs-ink); border-radius: 50%;
  animation: rs-spin 1s linear infinite;
}
@keyframes rs-spin { to { transform: rotate(360deg); } }
.rs-fallback { display: none; padding: 40px 20px; text-align: center; font-family: var(--rs-serif); font-weight: 300; font-size: 20px; }
.rs-fallback a { text-decoration: underline; text-decoration-color: var(--rs-lime); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.rs-reader.is-failed .rs-pages, .rs-reader.is-failed .rs-toolbar { display: none; }
.rs-reader.is-failed .rs-fallback { display: block; }
.rs-reader:fullscreen { overflow: auto; background: var(--rs-paper-2); max-width: none; }
.rs-reader:fullscreen .rs-toolbar { top: 0; }

/* text layer (adapted from pdf.js pdf_viewer.css — selection, copy, find, a11y) */
.rs-page .textLayer {
  position: absolute; inset: 0; overflow: clip; opacity: 1; line-height: 1;
  text-align: initial; letter-spacing: normal; word-spacing: normal;
  -webkit-text-size-adjust: none; text-size-adjust: none; forced-color-adjust: none;
  transform-origin: 0 0; caret-color: CanvasText; z-index: 1;
  --min-font-size: 1;
  --text-scale-factor: calc(var(--total-scale-factor) * var(--min-font-size));
  --min-font-size-inv: calc(1 / var(--min-font-size));
}
.rs-page .textLayer :is(span, br) {
  color: transparent; position: absolute; white-space: pre; cursor: text;
  transform-origin: 0% 0%; -webkit-user-select: text; user-select: text;
}
.rs-page .textLayer > :not(.markedContent), .rs-page .textLayer .markedContent span:not(.markedContent) {
  z-index: 1; --font-height: 0; font-size: calc(var(--text-scale-factor) * var(--font-height));
  --scale-x: 1; --rotate: 0deg;
  transform: rotate(var(--rotate)) scaleX(var(--scale-x)) scale(var(--min-font-size-inv));
}
.rs-page .textLayer .markedContent { display: contents; }
.rs-page .textLayer span[role="img"] { user-select: none; cursor: default; }
.rs-page .textLayer ::selection { background: rgba(199, 242, 156, .55); color: transparent; }
.rs-page .textLayer br::selection { background: transparent; }
.rs-page .textLayer .endOfContent { display: block; position: absolute; inset: 100% 0 0; z-index: 0; cursor: default; user-select: none; }
.rs-page .textLayer.selecting .endOfContent { top: 0; }

/* ---- more resources / back ---- */
.rs-more { padding-top: 56px; }
.rs-more .rs-eyebrow { margin-bottom: 8px; }
.rs-back { padding: 40px 0 72px; }
.rs-back a::after { content: '→'; margin-left: 8px; }
.rs-doc .rs-index + .rs-back { padding-top: 24px; }

/* ---- responsive ---- */
@media (max-width: 991px) {
  .rs-featured { gap: 32px; }
}
@media (max-width: 767px) {
  .rs-head { padding-top: calc(var(--rs-nav-h) + 36px); }
  .rs-featured { grid-template-columns: 1fr; gap: 28px; padding: 36px 0 44px; }
  .rs-featured-cover { max-width: 300px; }
  .rs-row-link { grid-template-columns: 36px minmax(0, 1fr) 22px; gap: 16px; padding: 18px 8px; margin: 0 -8px; }
  .rs-row-thumb { width: 36px; }
  .rs-row-date, .rs-row-kind, .rs-row-stats { display: none; }
  .rs-row-main::before { content: attr(data-line); font-family: var(--rs-sans); font-size: 12px; color: var(--rs-muted); letter-spacing: .04em; }
  .rs-row-title { font-size: 21px; }
  .rs-hide-sm, .rs-tool-title { display: none; }
  .rs-toolbar { gap: 12px; padding: 0 12px; justify-content: space-between; }
  .rs-pages { padding: 16px 8px 40px; gap: 14px; }
  .rs-intro, .rs-summary { font-size: 19px; }
  .rs-doc-foot { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 479px) {
  .rs-eyebrow { font-size: 16px; }
  .rs-wrap { padding: 0 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .rs-cover-img, .rs-readlink img, .rs-row-arrow, .rs-row-link { transition: none; }
}

/* current-page nav link: Webflow's default w--current is blue; keep the site's ink */
.body-resources .nav-menu-2 .nav-link.w--current {
  color: var(--rs-ink);
  text-decoration: underline;
  text-decoration-color: var(--rs-lime);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

/* The site's inline "html, body { overflow-x: hidden }" turns body into a scroll container that
   never scrolls, which breaks position: sticky. clip stops horizontal overflow the same way
   without creating a scroll container, so the reader toolbar can stick under the nav. */
html:has(> body.body-resources), body.body-resources { overflow-x: clip; }
