.document-header {
  width: min(100% - 80px, 1180px);
  margin-inline: auto;
  padding: 52px 0 18px;
  border-bottom: 1px solid #d2d2d7;
  background: #fff;
  color: #1d1d1f;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0;
}

.document > .document-header,
.document > .primary-navigation {
  width: 100%;
}

body > .document-header,
body > .primary-navigation {
  width: 100%;
}

body > .document-header {
  padding-right: 40px;
  padding-left: 40px;
}

body > .primary-navigation {
  padding-right: 24px;
  padding-left: 24px;
}

.brand {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
}

.brand img {
  display: block;
  width: 307px;
  max-width: 100%;
  height: auto;
  filter: none;
}

.languages {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  font-size: .76rem;
  letter-spacing: 0;
  text-transform: none;
}

.document-header__tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 18px;
}

.theme-toggle {
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #1d1d1f;
  background: transparent;
  line-height: 1;
  cursor: pointer;
}

.theme-toggle:hover {
  color: #b60000;
}

.theme-toggle .theme-toggle__sun {
  display: none;
}

.theme-toggle svg {
  display: block;
  flex: 0 0 auto;
}

html.dark .theme-toggle__moon {
  display: none;
}

html.dark .theme-toggle .theme-toggle__sun {
  display: block;
}

.languages a {
  padding: 4px;
  color: #6e6e73;
  text-decoration: none;
}

.languages [aria-current] {
  color: #161616;
  font-weight: 700;
}

.languages span {
  color: #aaa;
}

.primary-navigation {
  position: sticky;
  top: 0;
  z-index: 100;
  width: min(100% - 80px, 1180px);
  margin-inline: auto;
  padding: 14px 8px;
  border-bottom: 1px solid rgba(0, 0, 0, .14);
  background: rgba(255, 255, 255, .82);
  color: #1d1d1f;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  font-size: .76rem;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.3;
  text-transform: none;
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}

body > .document-header {
  position: relative;
  border-bottom: 0;
}

body > .primary-navigation {
  border-bottom: 0;
}

body > .document-header::after,
body > .primary-navigation::after {
  content: "";
  position: absolute;
  right: 50%;
  bottom: 0;
  width: min(calc(100% - 80px), 1180px);
  height: 1px;
  background: #d2d2d7;
  transform: translateX(50%);
}

.primary-navigation-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 34px;
}

.primary-navigation-group {
  display: contents;
}

.primary-navigation-submenu {
  display: none;
}

.primary-navigation a {
  color: #1d1d1f;
  text-decoration: none;
  white-space: nowrap;
}

.primary-navigation a:hover {
  color: #b60000;
}

.primary-navigation a.is-active {
  color: #1d1d1f;
  font-weight: 600;
}

.primary-navigation a.is-active::after {
  content: none;
}

.primary-navigation .menu-toggle {
  display: none;
}

.methods-subnavigation {
  position: sticky;
  top: 44px;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 34px;
  min-height: 32px;
  border-bottom: 1px solid rgba(0, 0, 0, .14);
  background: rgba(255, 255, 255, .95);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  font-size: 12px;
  letter-spacing: 0;
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}

.methods-subnavigation.is-visible {
  display: flex;
}

.methods-subnavigation a {
  padding: 7px 0;
  color: #6e6e73;
  text-decoration: none;
  white-space: nowrap;
}

.methods-subnavigation a:hover {
  color: #b60000;
}

.methods-subnavigation a.is-active {
  color: #1d1d1f;
  font-weight: 600;
}

.compact-brand {
  position: absolute;
  top: 50%;
  left: 16px;
  display: block;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%);
}

body > .primary-navigation .compact-brand {
  left: max(56px, calc((100vw - 1180px) / 2 + 16px));
}

/* Shared footer navigation. */
.footer-navigation {
  display: grid;
  grid-template-columns: 1.05fr 1.4fr 1fr 1fr;
  gap: 32px;
  padding: 34px 0 38px;
  border-top: 1px solid #d2d2d7;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  font-size: .76rem;
}

.footer-navigation__group {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.footer-navigation a {
  color: #6e6e73;
  line-height: 1.4;
  text-decoration: none;
}

.footer-navigation a:hover {
  color: #b60000;
}

.footer-navigation a.footer-navigation__primary {
  color: #1d1d1f;
  font-weight: 600;
}

html.dark .footer-brand,
html.dark .reading-site-footer__brand {
  position: relative;
}

html.dark .footer-brand::after,
html.dark .reading-site-footer__brand::after {
  position: absolute;
  top: 45.25%;
  left: 0;
  width: 4.73px;
  height: 4.73px;
  margin-left: 18.25px;
  background: #ca0000;
  content: "";
  pointer-events: none;
}

.primary-navigation.is-stuck .compact-brand {
  opacity: 1;
  pointer-events: auto;
}

.compact-brand img {
  display: block;
  height: auto;
  filter: none;
}

.compact-brand-wordmark {
  width: 126px;
}

.compact-brand-symbol {
  display: none !important;
  width: 25px;
}

@media (max-width: 700px) {
  .document-header,
  .primary-navigation {
    width: calc(100% - 40px);
  }

  .document-header {
    padding-top: 32px;
  }

  body > .document-header {
    padding-right: 20px;
    padding-left: 20px;
  }

  body > .primary-navigation {
    padding-right: 0;
    padding-left: 20px;
  }

  body > .document-header::after,
  body > .primary-navigation::after {
    width: calc(100% - 40px);
  }

  .brand img {
    width: 245px;
  }

  .primary-navigation {
    margin-right: 0;
    padding-right: 0;
  }

  .document > .primary-navigation {
    width: calc(100% + 20px);
    margin-right: -20px;
  }

  .compact-brand {
    left: 0;
  }

  body > .primary-navigation .compact-brand {
    left: 20px;
  }

  .compact-brand-wordmark {
    display: none !important;
  }

  .compact-brand-symbol {
    display: block !important;
  }

  .primary-navigation .menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 28px;
    margin: 0 8px 0 auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #1d1d1f;
    font-size: 22px;
    line-height: 1;
  }

  .primary-navigation-links {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 10px 20px 18px 42px;
    border-bottom: 1px solid rgba(0, 0, 0, .14);
    background: rgba(255, 255, 255, .98);
    font-size: 14px;
    max-height: calc(100vh - 56px);
    overflow-y: auto;
  }

  .primary-navigation.is-open .primary-navigation-links {
    display: flex;
  }

  .primary-navigation-links a {
    width: 100%;
    padding: 10px 0;
  }

  .primary-navigation-group {
    display: block;
    width: 100%;
  }

  .primary-navigation-submenu {
    display: flex;
    flex-direction: column;
    margin: 0 0 6px 2px;
    padding: 0 0 2px 16px;
    border-left: 1px solid #d2d2d7;
  }

  .primary-navigation-submenu a {
    padding: 6px 0;
    color: #6e6e73;
    font-size: 12px;
    line-height: 1.4;
  }

  .methods-subnavigation {
    top: 56px;
    grid-template-columns: repeat(2, max-content);
    justify-content: start;
    gap: 0 22px;
    min-height: 0;
    overflow: visible;
    padding: 7px 20px 8px;
  }

  .footer-navigation {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px 22px;
    padding: 30px 0 34px;
  }

  .methods-subnavigation.is-visible {
    display: grid;
  }

  .methods-subnavigation a {
    padding: 5px 0;
    line-height: 1.35;
  }

  .publications-filter-bar {
    top: 56px !important;
    z-index: 90;
  }

  .chapter,
  .chapter-body h3,
  #profile-rodrigo,
  #profile-sources,
  #profile-consultation-sources,
  #profile-affiliations,
  #profile-methodologies {
    scroll-margin-top: 132px;
  }

}

@media (min-width: 701px) and (max-width: 1000px) {
  .primary-navigation-links {
    gap: 22px;
  }

  .compact-brand-wordmark {
    display: none !important;
  }

  .compact-brand-symbol {
    display: block !important;
  }
}

@media print {
  .languages,
  .primary-navigation {
    display: none;
  }

  .document-header {
    padding-top: 0;
  }
}

/* Shared dark theme ------------------------------------------------------- */
html.dark {
  color-scheme: dark;
  background: #131313;
}

html.dark body,
html.dark .document,
html.dark main {
  color: #e5e2e1;
  background-color: #131313;
}

html.dark .document-header,
html.dark .primary-navigation,
html.dark .methods-subnavigation,
html.dark .library-subnavigation,
html.dark .agenda-subnavigation {
  color: #e5e2e1;
  background: rgba(19, 19, 19, .92);
}

html.dark .document-header {
  background: #131313;
}

html.dark .document-header::after,
html.dark .primary-navigation::after,
html.dark .chapter,
html.dark .contact,
html.dark .footer-bottom,
html.dark .footer-navigation,
html.dark .reading-site-footer__bottom,
html.dark .agenda-section,
html.dark .library-catalog,
html.dark .convention-return {
  border-color: #353535;
}

html.dark body > .document-header::after,
html.dark body > .primary-navigation::after {
  background: #353535;
}

html.dark .brand img,
html.dark .compact-brand img,
html.dark .footer-brand img,
html.dark .reading-site-footer__brand img {
  filter: brightness(0) invert(1);
}

.brand {
  position: relative;
}

html.dark .brand::after,
html.dark .compact-brand::after {
  position: absolute;
  top: 35.95%;
  left: 14.22%;
  width: 3.36%;
  aspect-ratio: 1;
  background: #ca0000;
  content: "";
  pointer-events: none;
}

@media (max-width: 1000px) {
  html.dark .compact-brand::after {
    top: 45.27%;
    left: 73.05%;
    width: 18.92%;
  }
}

html.dark .languages a,
html.dark .languages span,
html.dark .primary-navigation a,
html.dark .primary-navigation a.is-active,
html.dark .methods-subnavigation a,
html.dark .library-subnavigation a,
html.dark .agenda-subnavigation a,
html.dark .theme-toggle {
  color: #c6c6c7;
}

html.dark .primary-navigation-submenu {
  border-color: #3f3f42;
}

html.dark .primary-navigation-submenu a {
  color: #98989d;
}

html.dark .languages [aria-current],
html.dark .primary-navigation a.is-active,
html.dark .methods-subnavigation a.is-active,
html.dark .library-subnavigation a.is-active,
html.dark .agenda-subnavigation a.is-active {
  color: #fff;
}

html.dark .theme-toggle:hover,
html.dark .primary-navigation a:hover,
html.dark .methods-subnavigation a:hover,
html.dark .library-subnavigation a:hover,
html.dark .agenda-subnavigation a:hover {
  color: #ff6b5f;
}

html.dark .primary-navigation-links {
  background-color: transparent;
}

html.dark .footer-navigation a {
  color: #a1a1a6;
}

html.dark .footer-navigation a.footer-navigation__primary {
  color: #e5e2e1;
}

html.dark .footer-navigation a:hover,
html.dark .footer-navigation a.footer-navigation__primary:hover {
  color: #ff6b5f;
}

html.dark h1,
html.dark h2,
html.dark h3,
html.dark h4,
html.dark h5,
html.dark h6,
html.dark .headline-support,
html.dark .chapter-body,
html.dark .chapter-body h3,
html.dark .contact > h2,
html.dark .contact-body,
html.dark .contact-location,
html.dark .note,
html.dark .institution-logos span,
html.dark .section-epigraph p,
html.dark .section-epigraph cite,
html.dark .reading-site-footer,
html.dark .reading-site-footer__contact-body,
html.dark .reading-site-footer__contact-body a,
html.dark .reading-site-footer__note,
html.dark .article-body,
html.dark .article-body p,
html.dark .article-title,
html.dark .library-page,
html.dark .agenda-page,
html.dark .convention-page {
  color: #e5e2e1 !important;
}

html.dark .chapter-subnav-label,
html.dark .chapter-subnav a,
html.dark .institution-logos small,
html.dark cite,
html.dark footer,
html.dark .reading-site-footer__bottom,
html.dark .library-introduction > p:last-child,
html.dark .agenda-introduction > p:last-child,
html.dark .convention-deck,
html.dark .convention-article-meta,
html.dark .convention-breadcrumb {
  color: #a1a1a6;
}

html.dark .chapter-subnav a,
html.dark .chapter-subnav a:last-child,
html.dark #profile-affiliations,
html.dark #profile-methodologies,
html.dark .founder-profile-photo,
html.dark input,
html.dark textarea {
  border-color: #3f3f42;
}

html.dark .founder-profile-photo,
html.dark input,
html.dark textarea,
html.dark .bg-white,
html.dark .bg-white\/95,
html.dark .pub-card,
html.dark .book-page,
html.dark .book-hero,
html.dark .book-details,
html.dark .book-support-callout__inner,
html.dark #download-modal > div,
html.dark #sponsor-modal > div {
  color: #e5e2e1 !important;
  background-color: #1c1c1e !important;
}

html.dark .book-page > section {
  color: #e5e2e1 !important;
  background: #131313 !important;
  border-color: #3f3f42 !important;
}

html.dark .book-page h1,
html.dark .book-page h2,
html.dark .book-page h3,
html.dark .book-page h4,
html.dark .book-page [class*="text-[#1d1d1f]"],
html.dark .book-page [class*="text-[#424245]"],
html.dark .book-hero .border-y p:last-child,
html.dark .book-stats p:first-child,
html.dark .book-lots > div > div:last-child span:last-child {
  color: #e5e2e1 !important;
}

html.dark .book-page [class*="text-[#6e6e73]"],
html.dark .book-page [class*="text-stone-4"],
html.dark .book-page [class*="text-gray-medium"],
html.dark .book-hero nav,
html.dark .book-hero nav a,
html.dark .book-hero .border-y p:first-child,
html.dark .book-themes .grid p,
html.dark .book-distribution p,
html.dark .book-lots > div > div:last-child {
  color: #a1a1a6 !important;
}

html.dark .book-note {
  color: #c7c7ca;
}

html.dark .book-note h2,
html.dark .book-note .book-note__closing,
html.dark .book-chapters span {
  color: #e5e2e1 !important;
}

html.dark .book-chapters,
html.dark .book-chapters li {
  border-color: #3f3f42;
}

html.dark .book-chapters strong {
  color: #a1a1a6;
}

html.dark .book-support-callout__inner,
html.dark .book-support-callout__inner::before,
html.dark .book-hero .border-y,
html.dark .book-hero .h-8.w-px,
html.dark .book-themes .grid > div,
html.dark .book-distribution > div > .flex:first-child,
html.dark .book-stats > div,
html.dark .book-lots > div,
html.dark .book-lots > div > div:last-child,
html.dark .book-sponsor,
html.dark .book-specs {
  border-color: #3f3f42 !important;
}

html.dark .book-support-callout__inner::before,
html.dark .book-hero .h-8.w-px {
  background: #3f3f42 !important;
}

html.dark .bg-stone-50,
html.dark .bg-stone-100,
html.dark .bg-surface {
  color: #e5e2e1 !important;
  background-color: #202022 !important;
}

html.dark .library-page ~ .reading-site-footer,
html.dark .agenda-page ~ .reading-site-footer,
html.dark .convention-page ~ .reading-site-footer {
  background: #131313;
}

html.dark .agenda-event,
html.dark .convention-entry {
  color: #e5e2e1 !important;
  background: transparent !important;
}

html.dark .agenda-event,
html.dark .agenda-event__date,
html.dark .agenda-list-toolbar,
html.dark .agenda-list-empty,
html.dark .convention-entry {
  border-color: #3f3f42;
}

html.dark .agenda-list-filter,
html.dark .agenda-event__meta,
html.dark .agenda-event__year,
html.dark .convention-meta {
  color: #a1a1a6;
}

html.dark .agenda-list-filter:hover,
html.dark .agenda-list-filter.is-active,
html.dark .agenda-event__date,
html.dark .agenda-event__content h3,
html.dark .agenda-list-empty h3 {
  color: #e5e2e1;
}

html.dark .agenda-event__description,
html.dark .agenda-list-empty p,
html.dark .convention-subject,
html.dark .convention-insights,
html.dark .convention-article-body,
html.dark .convention-article-body p {
  color: #d1d1d3;
}

html.dark .home-publications__list,
html.dark .home-publication,
html.dark .home-publication__cover {
  border-color: #3f3f42;
}

html.dark .home-publication__meta,
html.dark .home-publication__content > p:not(.home-publication__meta) {
  color: #98989d;
}

html.dark .home-publication h3 a {
  color: #f5f5f7;
}

html.dark .home-publication__link,
html.dark .home-publications__all {
  color: #ff6b5f;
}

html.dark .agenda-event__image {
  background: #202022;
}

html.dark .convention-article-body strong {
  color: #f5f5f7;
}

html.dark .library-book {
  border-color: #3f3f42;
  background: transparent;
}

html.dark .library-book img {
  border-color: #4a4a4d;
}

html.dark .library-book-author {
  color: #a1a1a6;
}

html.dark .library-book-insight {
  color: #d1d1d3;
}

html.dark .library-book h3 a {
  color: #f5f5f7;
}

html.dark .library-book-amazon {
  color: #ff453a;
}

html.dark .library-book h3 a:hover,
html.dark .library-book h3 a:focus-visible {
  color: #ff453a;
}


html.dark .library-book-amazon:hover,
html.dark .library-book-amazon:focus-visible {
  color: #f5f5f7;
}

html.dark .institution-logos {
  padding: 0;
  background: transparent;
}

html.dark .institution-logos img {
  filter: grayscale(1) contrast(1.35) invert(1);
  mix-blend-mode: screen;
  opacity: .9;
}

html.dark .institution-logos span {
  color: #e5e2e1 !important;
}

html.dark .institution-logos small {
  color: #a1a1a6 !important;
}

html.dark .institution-logos li:not(.institution-item--contextual) small {
  border-color: #3a3a3c;
}

html.dark .reference-context {
  border-color: #3a3a3c;
  color: #a1a1a6;
}

html.dark .reference-context__full {
  color: #d1cecd;
}

html.dark .reference-context__toggle {
  color: #ff6b5f;
}

html.dark .reading-site-footer__location {
  color: #e5e2e1;
}

html.dark .contact-body a:not(.linkedin-button) {
  color: #e5e2e1;
}

html.dark .contact-body a:not(.linkedin-button):hover {
  color: #ff6b5f;
}

html.dark .reading-site-footer__contact,
html.dark .reading-site-footer__contact h2 {
  border-color: #353535;
}

html.dark .reading-site-footer__contact::before {
  background: #353535;
}

html.dark .text-black,
html.dark .text-stone-900,
html.dark .text-on-background,
html.dark .book-page [class*="text-stone-3"] {
  color: #f5f5f7 !important;
}

html.dark .text-gray-600,
html.dark .text-gray-medium,
html.dark .book-page [class*="text-gray-medium"] {
  color: #a1a1a6 !important;
}

html.dark .border-gray-dark\/60,
html.dark .border-gray-dark\/50,
html.dark .border-gray-dark\/40,
html.dark .border-stone-300,
html.dark .border-\[\#d2d2d7\] {
  border-color: #3f3f42 !important;
}

html.dark .agenda-event__action {
  color: #d1d1d3;
}

html.dark .agenda-event__action:hover {
  color: #ff6b5f;
}

html.dark .agenda-event__action--primary {
  border-color: #ff6b5f;
  color: #ff6b5f;
}

html.dark .agenda-event__action--primary:hover {
  background: #b60000;
  color: #fff;
}

html.dark #open-download-modal-btn {
  border-color: #b60000 !important;
  background: #b60000 !important;
  color: #fff !important;
}

html.dark #open-download-modal-btn:hover {
  border-color: #d11919 !important;
  background: #d11919 !important;
}

html.dark .reading-site-footer a.reading-site-footer__linkedin-button,
html.dark .linkedin-button,
html.dark .book-support-callout__button {
  color: #161616 !important;
  background: #f5f5f7 !important;
}

html.dark .reading-site-footer a.reading-site-footer__linkedin-button:hover,
html.dark .linkedin-button:hover,
html.dark .book-support-callout__button:hover {
  color: #fff !important;
  background: #b60000 !important;
}

@media (max-width: 700px) {
  html.dark .primary-navigation-links {
    border-color: #353535;
    background: rgba(19, 19, 19, .98);
  }

  html.dark .primary-navigation .menu-toggle {
    color: #f5f5f7;
  }
}

@media print {
  .theme-toggle {
    display: none;
  }
}
