/* TCFC: scoped additions to the existing ENDO-E chapter and homepage layout. */
.chapter-new{display:inline-flex;align-items:center;vertical-align:middle;margin-inline-start:7px;padding:2px 5px;border:1px solid #e8a7b1;border-radius:4px;background:#fff0f3;color:#b31e36;font-size:12px;font-weight:750;letter-spacing:.035em;line-height:1.15;white-space:nowrap}
.tcfc-chapter .chapter-heading h1{max-width:100%;font-size:clamp(32px,4.1vw,58px)}
.tcfc-chapter .chapter-meta>span{font-size:14px;color:#496080;line-height:1.5}
.tcfc-chapter .chapter-article{width:100%;max-width:1080px;line-height:1.75}
.tcfc-chapter .chapter-article p{max-width:none;margin:0 0 1.05em;text-indent:0;text-align:justify;text-align-last:start;text-justify:inter-word;-webkit-hyphens:auto;hyphens:auto;overflow-wrap:break-word;word-break:normal;word-spacing:normal}
.tcfc-chapter .chapter-article .tcfc-lead{font-size:1.12em;line-height:1.65;color:#304d7a;padding-bottom:1.1em;border-bottom:1px solid #dae4f3;margin-bottom:1.4em}
.tcfc-chapter .tcfc-section{min-width:0;margin:0 0 2.3rem}
.tcfc-chapter .tcfc-section:first-of-type h2{margin-top:.4em}
.tcfc-chapter .chapter-article h2{line-height:1.25;scroll-margin-top:125px}
.tcfc-chapter .citations{font-size:.82em;font-weight:500;line-height:inherit;white-space:normal}
.tcfc-chapter .citations a{display:inline-block;text-decoration-thickness:1px;text-underline-offset:2px;padding-inline:1px;scroll-margin-top:125px}
.tcfc-chapter .chapter-article figure.tcfc-figure{display:block;width:100%;max-width:980px;margin:1.65rem auto 2rem;padding:14px 14px 0;border:1px solid #dce5f2;border-radius:16px;background:linear-gradient(135deg,#fff,#f4f8fd);box-shadow:inset 0 1px 0 #fff,0 5px 18px #263f7908;break-inside:avoid}
.tcfc-chapter .tcfc-figure>a{display:block;width:100%;min-width:0}
.tcfc-chapter .chapter-article .tcfc-figure img{display:block;height:auto!important;max-width:100%!important;object-fit:contain;border-radius:3px;margin:0 auto!important}
.tcfc-chapter .chapter-article figure.tcfc-figure>figcaption{max-width:none!important;width:100%;text-align:left!important;font-size:14px!important;line-height:1.65!important;margin:12px 0 0!important;padding:12px 4px 15px;border-top:1px solid #dfe7f3;color:#415775}
.tcfc-chapter .tcfc-figure figcaption strong{color:#233e6c}
.tcfc-chapter .tcfc-table{width:100%;margin:1.4rem 0 1.8rem;background:white}
.tcfc-chapter .tcfc-table .scientific-table{min-width:520px;width:100%;font-size:.9em;line-height:1.55}
.tcfc-chapter .tcfc-table caption{caption-side:top;text-align:left;padding:14px 16px;background:#eaf1fd;color:#233e6c;font-weight:700;border-bottom:1px solid #d8e3f3}
.tcfc-chapter .tcfc-table thead th{background:#eaf1fd;color:#233e6c;vertical-align:middle;text-align:left}
.tcfc-chapter .tcfc-table tbody th{font-weight:600;background:transparent;color:inherit}
.tcfc-chapter .tcfc-table tbody tr:nth-child(odd){background:#fff}
.tcfc-chapter .tcfc-table tbody tr:nth-child(even){background:#f6f9fd}
.tcfc-chapter .tcfc-table th,.tcfc-chapter .tcfc-table td{padding:12px 14px;overflow-wrap:normal;hyphens:none}
.tcfc-chapter .tcfc-authors{margin-top:2.5rem;padding-top:.1rem;border-top:1px solid #dbe5f3}
.tcfc-chapter .tcfc-authors p{font-size:.92em;color:#405775}
.tcfc-chapter .references{padding-inline-start:1.6em;font-size:.9em;line-height:1.65;overflow-wrap:anywhere}
.tcfc-chapter .references li{padding-inline-start:.3em;margin:0 0 1em;scroll-margin-top:125px}
.tcfc-chapter .reference-doi{font-size:.9em;white-space:nowrap}
.tcfc-chapter .related{margin-top:2rem}
@media(max-width:820px){.tcfc-chapter .chapter-grid{grid-template-columns:minmax(0,1fr)}.tcfc-chapter .chapter-toc{position:static;max-height:none}.tcfc-chapter .chapter-heading h1{font-size:clamp(30px,7vw,42px)}}
@media(max-width:620px){.tcfc-chapter .chapter-article figure.tcfc-figure{padding:8px 8px 0;border-radius:12px}.tcfc-chapter .chapter-article figure.tcfc-figure>figcaption{padding:10px 3px 12px}.tcfc-chapter .tcfc-table .scientific-table{min-width:460px}.tcfc-chapter .tcfc-table th,.tcfc-chapter .tcfc-table td{padding:10px 12px}}
@media print{.chapter-new{display:none}.tcfc-chapter .chapter-article{max-width:none;font-size:11pt}.tcfc-chapter .chapter-article figure.tcfc-figure{box-shadow:none;background:white}.tcfc-chapter .tcfc-figure img{max-height:18cm!important;object-fit:contain}.tcfc-chapter .tcfc-section h2{break-after:avoid}.tcfc-chapter .tcfc-table{overflow:visible}.tcfc-chapter .tcfc-table .scientific-table{min-width:0}.tcfc-chapter .citations a{text-decoration:none}}

/* Match the paragraph alignment of the original chapters, including highlighted prose. */
.chapter-page.tcfc-chapter .chapter-article p.study-highlight{text-align:justify!important;text-align-last:start;text-justify:inter-word;-webkit-hyphens:auto;hyphens:auto}
.tcfc-chapter .chapter-article :is(table,figcaption) p{text-align:left;text-align-last:start;hyphens:none}
/* Reserve image geometry before lazy loading so chapter links remain stable. */
.chapter-page.tcfc-chapter .chapter-article img[data-scientific-image]{width:min(100%,var(--display-width))!important;aspect-ratio:var(--image-aspect)!important}

/* Center both the figure frame and the source image; prose remains justified. */
.chapter-page.tcfc-chapter .chapter-article figure.tcfc-figure img[data-scientific-image]{display:block;margin-left:auto!important;margin-right:auto!important}
