/* Shared article hierarchy and navigation; only normalized long-form layouts. */
:root { --kttc-reading-offset: 100px; }
body .kttc-reading-layout { display: grid !important; grid-template-columns: 280px minmax(0,1fr) !important; gap: clamp(24px,3vw,48px) !important; align-items: start; }
body .kttc-reading-layout > * { min-width: 0; }
body .kttc-reading-body { min-width: 0; }
body .kttc-reading-body .kttc-reading-heading { color: #2d6b3c; line-height: 1.35 !important; overflow-wrap: anywhere; text-wrap: pretty; scroll-margin-top: var(--kttc-reading-offset) !important; }
body .kttc-reading-body h2.kttc-reading-heading { font-size: clamp(25px,2.4vw,34px) !important; margin: 40px 0 18px !important; }
body .kttc-reading-body h3.kttc-reading-heading { font-size: clamp(21px,1.9vw,26px) !important; margin: 28px 0 14px !important; }
body .kttc-reading-body h4.kttc-reading-heading { font-size: clamp(18px,1.5vw,21px) !important; margin: 22px 0 12px !important; }
/* Compact cards retain their own type scale. */
body .kttc-reading-body :is(.nitrogen-card,.nitrogen-stage-card,.article-warning) .kttc-reading-heading { font-size: 19px !important; margin: 0 0 12px !important; }
body .kttc-reading-body [id] { scroll-margin-top: var(--kttc-reading-offset) !important; }
body .kttc-reading-body .kttc-restored-copy { margin-block: 18px; }
body .kttc-reading-body .kttc-restored-copy p { margin-block: 14px 10px; }
body .kttc-reading-body .kttc-restored-copy li { line-height: 1.75; margin-block: 6px; }
body .kttc-toc-desktop { display: block !important; position: sticky !important; top: var(--kttc-reading-offset) !important; align-self: start; margin: 0 !important; padding: 18px 12px 12px !important; min-width: 0; border: 1px solid #d6e4d2; border-radius: 16px; background: #f7faf2; box-shadow: 0 8px 24px #294a2410; }
body .kttc-toc-column { position: sticky !important; top: var(--kttc-reading-offset) !important; align-self: start !important; }
body .kttc-toc-column .kttc-toc-desktop { position: static !important; }
body .kttc-toc-title { color: #2d6b3c; font-size: 18px !important; font-weight: 700; line-height: 1.4; margin: 0 10px 12px !important; }
body .kttc-toc-links { display: grid !important; grid-template-columns: minmax(0,1fr) !important; gap: 5px; max-height: calc(100vh - var(--kttc-reading-offset) - 85px); max-height: calc(100dvh - var(--kttc-reading-offset) - 85px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-gutter: stable; padding: 3px; }
body .kttc-toc-links a.kttc-toc-link { display: grid !important; grid-template-columns: 26px minmax(0,1fr) !important; gap: 9px; align-items: start; min-height: 44px; box-sizing: border-box; padding: 10px 8px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: #344d36; font-size: 14px !important; font-weight: 500; line-height: 1.5; text-decoration: none; overflow-wrap: anywhere; }
body .kttc-toc-number { display: block; text-align: center; font-variant-numeric: tabular-nums; color: #47734b; font-size: 12px; line-height: 21px; }
body .kttc-toc-label { display: block; min-width: 0; }
body .kttc-toc-links a.kttc-toc-child { padding-left: 20px; font-size: 13px !important; }
body .kttc-toc-links a:hover { background: #eaf3e6; }
body .kttc-toc-links a[aria-current="location"] { background: #e0eed9; border-color: #b8d5ae; color: #215e32; font-weight: 700; }
body .kttc-toc-links a:focus-visible,body .kttc-toc-mobile summary:focus-visible { outline: 3px solid #2d6b3c; outline-offset: 1px; }
body .kttc-toc-mobile { display: none !important; }
@media (max-width:1180px) {
 body .kttc-reading-layout { display: block !important; }
 body .kttc-toc-desktop,body .kttc-toc-column { display: none !important; }
 body .kttc-toc-mobile { display: block !important; margin: 0 0 28px !important; border: 1px solid #cddfc7; border-radius: 14px; background: #f7faf2; overflow: hidden; }
 body .kttc-toc-mobile summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 12px 16px; box-sizing: border-box; list-style: none; cursor: pointer; color: #2d6b3c; font-size: 16px; font-weight: 700; }
 body .kttc-toc-mobile summary::-webkit-details-marker { display:none; }
 body .kttc-toc-mobile summary::after { content: '+'; font-size: 23px; font-weight: 400; }
 body .kttc-toc-mobile[open] summary::after { content: '−'; }
 body .kttc-toc-mobile .kttc-toc-links { max-height: min(55dvh,480px); padding: 4px 10px 12px; border-top: 1px solid #d6e4d2; }
 body .kttc-toc-links a.kttc-toc-link { font-size: 15px !important; }
 body .kttc-toc-links a.kttc-toc-child { font-size: 14px !important; }
}
@media (max-width:600px) {
 body .kttc-reading-body h2.kttc-reading-heading { margin-top: 30px !important; }
 body .kttc-reading-body h3.kttc-reading-heading { margin-top: 24px !important; }
}
@media print {
 body .kttc-toc-desktop,body .kttc-toc-column,body .kttc-toc-mobile { display: none !important; }
 body .kttc-reading-layout { display:block !important; }
}
