@font-face {
    font-family: Charis;
    src: url(fonts/charis-sil.woff2) format('woff2'),
         url(fonts/charis-sil.ttf)   format('truetype');
    font-display: swap;
}

@font-face {
    font-family: Charis-Italic;
    src: url(fonts/charis-sil-italic.woff2) format('woff2'),
         url(fonts/charis-sil-italic.ttf)   format('truetype');
    font-display: swap;
}

@font-face {
    font-family: Charis-Bold;
    src: url(fonts/charis-sil-bold.woff2) format('woff2'),
         url(fonts/charis-sil-bold.ttf)   format('truetype');
    font-display: swap;
}

@font-face {
    font-family: Sahitya;
    src: url(fonts/Sahitya-Regular.woff2) format('woff2'),
         url(fonts/Sahitya-Regular.ttf)   format('truetype');
    font-display: swap;
}

body {
    font-family: Charis;
    width: 1100px;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 15px;
    box-sizing: border-box;
}

@media (max-width: 1100px) {
    body {
        width: 100%;
    }
    .citation_block {
        overflow-x: auto;
    }
    table {
        width: 100% !important;
    }
}

sup, .comment_number {
    color: #FDA50F;
    font-family: Charis-Bold;
    cursor: pointer;
}

a {
    text-decoration: none;
}

.headers {
    text-align: center;
    margin: 10px 0;
}

.header_1 {
    margin-top: 20px;
    font-size: 24px;
    color: #a52a2a;
}

.header_2 {
    font-size: 20px;
}

.header_3 {
    color: red;
    font-size: 18px;
    text-align: center;
}

.header_table_row2 {
    color: red;
    font-size: 18px;
    text-align: center;
}

.header_table_row1 {
    color: blue;
    font-size: 18px;
    text-align: left;
}
.header_table_row3 {
    color: blue;
    font-size: 18px;
    text-align: right;
}
.header_5, .chapter_title {
    color: green;
    margin-top: 30px;
    margin-bottom: 30px;
    font-size: 18px;
    font-family: Charis-Bold;
}

.header_year {
    margin-top: 100px;
    font-size: 16px;
    font-family: Charis-Bold;
}

.header_annotation {
    margin-top: 100px;
    font-size: 14px;
    text-align: justify;
}

.annotation_item {
    font-size: 14px;
    text-align: justify;
    text-indent: 1.5em;
    display: block;
}

.content_item_big {
    text-align: left;
    width: 100%;
    margin-left: 60px
}
.content_item {
    display: inline-block;
    width: 16%;
}

.highlight {
    background-color: yellow;
}
.highlight-1 {
    background-color: yellow;
}
.highlight-2 {
    background-color: cyan;
}
.highlight.active {
    border: 2px solid red;
    outline: 2px solid red;
}
.button-container {
    position: fixed;
    top: 0;
    left: 0;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 10px;
    z-index: 999;
    border-bottom: 1px solid #ddd;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.content_splitter, .chapter_splitter {
    height: 150px;
}

.content_title  a {
    color: #6495ed;
    font-family: Charis-Bold;
    font-size: 18px;
}
.content_title_big  a {
    margin-top: 20px;
    margin-left: -20px;
    color: #a52a2a;
    font-family: Charis-Bold;
    font-size: 20px;
}

.chapter_content {
    margin-bottom: 20px;
    clear: both;
}

.comments {
    margin-bottom: 25px;
    font-size: 16px;
    text-align: justify;
}

.sanskrit {
    font-family: Sahitya;
    font-size: 25px;
}

.person_translation, .person_iast {
    color: #FDA50F;
}

.comment_text {
    text-align: justify;
}

/* Parallel Sa/Ru layout (ported from style0 + flex so Russian never
   disappears off-screen when the container is narrower than 440+620). */
.chapter_content,
.clear {
    clear: both;
}

.chapter_content {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    align-items: flex-start;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.chapter_content > .chapter_block {
    display: block;
    vertical-align: top;
    box-sizing: border-box;
    min-width: 0;
}

.chapter_content > .chapter_block.iast,
.chapter_content > .iast {
    flex: 1 1 16rem;
    max-width: 100%;
}

.chapter_content > .chapter_block.translation,
.chapter_content > .translation {
    flex: 1 1 18rem;
    max-width: 100%;
}

.iast {
    font-size: 16px;
    text-align: left;
    padding-right: 10px;
    /* width was fixed 440px — overflows and hides the translation sibling */
    width: auto;
    max-width: 100%;
    color: #708090;
    word-wrap: break-word;
    word-break: break-word;
}

.iast_author, .translation_author {
    font-family: Charis-Italic;
}

.translation {
    font-size: 18px;
    text-align: justify;
    width: auto;
    max-width: 100%;
}
.comments {
    margin-bottom: 30px;
    font-size: 18px;
    text-align: justify;
    color: #5f5f5f;    
}

.chapter {
    margin-bottom: 60px;
}

.range {
    float: right;
    display: block;
    color: #000;
    font-family: Charis-Bold;
}

.endchapter_sanskrit {
    font-size: 16px;
    text-align: center;
    color: #708090;  
}
.endchapter {
    font-size: 18px;
    text-align: center;
    font-family: Charis-Italic;
}

.endbook {
    text-align: center;
    font-size: 18px;
}

.blue-text {
     color: SteelBlue;
     font-style: italic;
}

.red-text {
     color: red;
}

/* Narrow screens: stack Sa then Ru (flex-wrap already does this; force column). */
@media (max-width: 700px) {
    body { padding: 0 8px; }
    .chapter_content {
        flex-direction: column;
        gap: 0.5rem;
    }
    .iast,
    .translation,
    .chapter_content > .chapter_block.iast,
    .chapter_content > .chapter_block.translation {
        width: 100%;
        max-width: 100%;
        flex: 1 1 auto;
        padding-right: 0;
        float: none;
    }
    .citation_block { overflow-x: visible; }
    .comments { margin-bottom: 12px; }
}

/* Nested citation_block inside search results (ingest packs a full block
   into line_html) — keep both languages readable, de-emphasize inner chrome. */
.full-content > .citation_block {
    border: none;
    margin: 0;
    padding: 0;
}
.full-content > .citation_block > .range {
    float: none;
    display: inline-block;
    margin: 0 0 0.4rem 0;
    font-size: 0.85rem;
    color: #888;
}