.chart-page { --chart-line: #e2d4bf; --chart-muted: #746858; }
.chart-container { width: min(1280px, calc(100% - 40px)); margin-inline: auto; }
.chart-main { padding: 1rem 0 3rem; }
.chart-breadcrumbs { display: flex; flex-wrap: wrap; gap: .4rem .6rem; margin: .4rem 0 1rem; font-size: .87rem; color: var(--chart-muted); }
.chart-breadcrumbs a { text-decoration: underline; text-underline-offset: 3px; }
.chart-hero { padding: clamp(1.3rem, 3vw, 2.5rem); background: linear-gradient(120deg, #fffdf8, #f7edda); border: 1px solid var(--chart-line); border-top: 4px solid #b28a4b; border-radius: 12px; margin-bottom: 1.4rem; }
.chart-hero h1 { max-width: 1050px; font-size: clamp(1.9rem, 3.2vw, 3rem); line-height: 1.16; overflow-wrap: anywhere; }
.chart-eyebrow { color: #80542f; font: 700 .76rem/1.4 system-ui, sans-serif; letter-spacing: .1em; text-transform: uppercase; margin: 0 0 .7rem; }
.chart-lead { font-size: 1.08rem; line-height: 1.7; color: #655847; max-width: 85ch; }
.chart-meta { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; font: .82rem/1.6 system-ui, sans-serif; color: var(--chart-muted); }
.chart-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.1rem; }
.chart-actions a, .chart-file-list a { display: inline-block; padding: .55rem .8rem; background: #fbf2df; border: 1px solid #d4be99; border-radius: 6px; color: #624225; font-size: .92rem; }
.chart-actions a:first-child { background: #795032; color: #fffdf8; border-color: #795032; }
.chart-panel { padding: clamp(1rem, 2.5vw, 2rem); border: 1px solid var(--chart-line); border-radius: 10px; background: #fffdf8; margin: 1.3rem 0; min-width: 0; }
.chart-panel h2 { font-size: 1.65rem; }
.chart-file-list { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.chart-file-list li { border: 1px solid #eadfcd; border-radius: 7px; padding: 1rem; min-width: 0; }
.chart-file-list strong { display: block; overflow-wrap: anywhere; }
.chart-file-meta { display: block; color: var(--chart-muted); font: .8rem/1.6 system-ui, sans-serif; margin: .35rem 0 .6rem; }
.chart-file-note { font-size: .88rem; color: var(--chart-muted); }
.chart-preview { margin: 1.2rem 0 0; padding: .7rem; border: 1px solid #e5d8c2; border-radius: 7px; background: #f6f0e3; }
.chart-preview > a { display: block; background: white; }
.chart-preview img { display: block; width: 100%; height: auto; max-height: 700px; object-fit: contain; }
.chart-preview figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; padding: .7rem .3rem .2rem; font-size: .86rem; }
.chart-preview figcaption a { text-decoration: underline; }
.chart-reading-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 1.4rem; margin-top: 1.5rem; align-items: start; }
.chart-sidebar { position: sticky; top: 24px; min-width: 0; }
.chart-toc { border: 1px solid var(--chart-line); border-radius: 8px; background: #fffdf8; }
.chart-toc summary { cursor: pointer; font-weight: 700; padding: .9rem 1rem; }
.chart-toc nav { max-height: 70vh; overflow-y: auto; padding: 0 .8rem 1rem; scrollbar-width: thin; }
.chart-toc ol { padding: 0; margin: 0; list-style: none; }
.chart-toc a { display: block; padding: .4rem .6rem; border-left: 2px solid #eadfcd; font-size: .83rem; line-height: 1.45; }
.chart-toc a:hover, .chart-toc a[aria-current="location"] { border-color: #9b7342; background: #faf0de; color: #563b21; text-decoration: none; }
.chart-toc .chart-toc-sub a { padding-left: 1.1rem; font-size: .78rem; }
.chart-sidebar > p { font-size: .86rem; }
.chart-reading-panel { min-width: 0; border: 1px solid var(--chart-line); border-radius: 10px; background: #fffdf8; }
.chart-essay { padding: clamp(1.2rem, 3vw, 2.8rem); font-size: 1.06rem; line-height: 1.82; overflow-wrap: anywhere; }
.chart-essay h2 { margin: 2em 0 .65em; padding-bottom: .4em; border-bottom: 1px solid #eadfcd; font-size: 1.55rem; line-height: 1.3; }
.chart-essay h3 { margin: 1.6em 0 .5em; font-size: 1.24rem; line-height: 1.4; }
.chart-essay h4 { margin: 1.5em 0 .5em; font-size: 1.08rem; }
.chart-essay > :first-child, .chart-essay > section:first-child > :first-child { margin-top: 0; }
.chart-essay p { margin: .8em 0; }
.chart-essay li { margin: .35em 0; }
.chart-essay li p { margin: .4em 0; }
.chart-essay ul, .chart-essay ol { padding-left: 1.5rem; }
.chart-essay a { text-decoration: underline; text-underline-offset: 3px; }
.chart-essay hr { border: 0; border-top: 1px solid #eadfcd; margin: 2rem 0; }
.chart-essay blockquote, .chart-essay .scripture-strip { border-left: 3px solid #b28a4b; background: #faf4e7; padding: .7rem 1.1rem; margin: 1.2rem 0; }
.chart-table-scroll { overflow-x: auto; max-width: 100%; margin: 1.4rem 0; border: 1px solid var(--chart-line); border-radius: 5px; }
.chart-table-scroll table { width: 100%; border-collapse: collapse; font-size: .91rem; line-height: 1.6; margin: 0; }
.chart-table-scroll td, .chart-table-scroll th { border: 1px solid var(--chart-line); padding: .65rem .75rem; min-width: 130px; vertical-align: top; text-align: left; }
.chart-table-scroll th { background: #f5ead4; }
.chart-related { margin-top: 2rem; }
.chart-related ul { columns: 2; padding-left: 1.2rem; }
.chart-related li { margin: .5rem 0; break-inside: avoid; }
.chart-end { padding: 1rem 1.5rem; border-top: 1px solid var(--chart-line); background: #fbf6eb; font-size: .85rem; }
.chart-index-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .6rem; }
.chart-search { margin: 1.2rem 0 .6rem; max-width: 700px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; }
.chart-search label { grid-column: 1 / -1; font: 600 .86rem/1.4 system-ui, sans-serif; }
.chart-search input { min-width: 0; width: 100%; padding: .7rem .85rem; border: 1px solid #cbb99a; border-radius: 6px; background: white; color: #2f2418; font: 1rem/1.4 system-ui, sans-serif; }
.chart-search button { padding: .6rem .8rem; border: 1px solid #cbb99a; border-radius: 6px; background: #f8efdd; color: #624225; font: 600 .86rem/1.4 system-ui, sans-serif; cursor: pointer; }
.chart-search-count { color: var(--chart-muted); font: .83rem/1.5 system-ui, sans-serif; }
.chart-alphabet { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1rem 0 1.5rem; }
.chart-alphabet a { display: grid; place-items: center; min-width: 36px; min-height: 36px; border: 1px solid var(--chart-line); border-radius: 5px; background: #fbf6eb; font: 600 .85rem/1 system-ui, sans-serif; }
.chart-letter h2 { color: #876138; border-bottom: 1px solid var(--chart-line); padding: .5rem 0; }
.chart-index-list { padding: 0; margin: 0; list-style: none; }
.chart-index-entry { padding: 1rem 0; border-bottom: 1px solid #eee4d3; }
.chart-index-entry:last-child { border-bottom: 0; }
.chart-index-entry h3 { font-size: 1.28rem; margin: 0 0 .4rem; line-height: 1.35; }
.chart-index-entry h3 a { text-decoration: underline; text-decoration-color: #d0b693; text-underline-offset: 4px; }
.chart-index-entry p { margin: .3rem 0; color: #635b4e; line-height: 1.65; }
.chart-index-meta { color: var(--chart-muted); font: .78rem/1.5 system-ui, sans-serif; }
.chart-empty { background: #fbf5e9; border-left: 3px solid #b28a4b; padding: 1.2rem; }
.chart-page [hidden] { display: none !important; }
.chart-page main [id] { scroll-margin-top: 24px; }
.chart-page :focus-visible { outline: 3px solid #916b32; outline-offset: 3px; }
.chart-skip { position: absolute; top: -100px; left: 1rem; z-index: 10000; padding: .7rem 1rem; background: white; }
.chart-skip:focus { top: 1rem; }
@media (max-width: 960px) { .chart-reading-layout { grid-template-columns: minmax(0, 1fr); } .chart-sidebar { position: static; } .chart-toc nav { max-height: 45vh; } }
@media (max-width: 600px) {
  .chart-container { width: calc(100% - 24px); }
  .chart-file-list { grid-template-columns: 1fr; }
  .chart-hero { padding: 1.2rem; }
  .chart-hero h1 { font-size: 1.9rem; }
  .chart-essay { font-size: 1.03rem; padding: 1.2rem; }
  .chart-essay h2 { font-size: 1.4rem; }
  .chart-related ul { columns: 1; }
}
@media (prefers-reduced-motion: reduce) { html:has(.chart-page) { scroll-behavior: auto; } }
@media print {
  .chart-page { background: white; color: black; }
  .chart-page .site-header, .chart-page .site-footer, .chart-sidebar, .chart-actions, .chart-file-list, .chart-breadcrumbs, .chart-related, .copy-float-wrap, .chart-end { display: none !important; }
  .chart-container { width: 100%; }
  .chart-reading-layout { display: block; }
  .chart-panel, .chart-hero, .chart-reading-panel { border: 0; background: white; padding: 0; }
  .chart-essay { padding: 0; font-size: 11pt; line-height: 1.55; }
  .chart-essay h2, .chart-essay h3 { break-after: avoid; }
  .chart-preview { break-inside: avoid; }
  .chart-table-scroll { overflow: visible; }
}
