:root {
    --background-color: #fffffa;
    --secondary-text-color: #BBB;
    --primary-accent: #00BFFF;
    --red-accent: #ff4545;
    
    /* Grey color variables */
    --text-muted: #666666;
    --text-quote: #666666;
    --border-light: #e0e0e0;
    
    /* Base color variables */
    --text-black: #000000;
    --text-white: #ffffff;
    
    /* Semantic color variables */
    --text-primary: var(--text-black);
    --background-primary: var(--text-white);
    
    /* Form control backgrounds */
    --form-control-bg: #ffffff;
    
    /* Shadow color variable */
    --shadow-color: rgba(0, 0, 0, 0.15);
    
    /* Font sizes - 6 unique values */
    --font-xl: 2.4rem;      /* Main titles, document titles, page titles */
    --font-lg: 1.8rem;      /* Section headers, part titles */
    --font-md: 1.6rem;      /* Chapter titles */
    --font-base: 1.3rem;    /* Base text, sections, book titles, body */
    --font-sm: 1.2rem;      /* Small text, subtitles, tables, footnotes */
    --font-xs: 0.9rem;      /* Extra small, badges, metadata, buttons */

    --max-content-width: 65ch;
    --art-deco-border-width: 120px;
    --art-deco-background-color: #666;
    --art-deco-text-shadow-color: rgba(245, 245, 245, 0.5);
    --secondary-font: Proxima Nova, Lucida Grande, Lucida Sans Unicode, Verdana, sans-serif;
}

/* Dark mode variables */
:root[data-theme="dark"] {
    --background-color: #1a1a1a;
    --secondary-text-color: #888;
    --primary-accent: #00BFFF;
    --red-accent: #ff6b6b;
    
    /* Grey color variables */
    --text-muted: #999999;
    --text-quote: #cccccc;
    --border-light: #333333;
    
    /* Base color variables */
    --text-black: #ffffff;
    --text-white: #000000;
    
    /* Semantic color variables */
    --text-primary: var(--text-black);
    --background-primary: var(--text-white);
    
    /* Form control backgrounds */
    --form-control-bg: #f8f8f8;
    
    /* Shadow color variable */
    --shadow-color: rgba(255, 255, 255, 0.1);
    

    --art-deco-background-color: #fffffa;
    --art-deco-text-shadow-color: rgba(250, 250, 250, 0.5);
}

/* Alternative selector for better browser support */
html[data-theme="dark"] {
    --background-color: #1a1a1a;
    --secondary-text-color: #888;
    --primary-accent: #00BFFF;
    --red-accent: #ff6b6b;
    
    /* Grey color variables */
    --text-muted: #999999;
    --text-quote: #cccccc;
    --border-light: #333333;
    
    /* Base color variables */
    --text-black: #ffffff;
    --text-white: #000000;
    
    /* Semantic color variables */
    --text-primary: var(--text-black);
    --background-primary: var(--text-white);
    
    /* Shadow color variable */
    --shadow-color: rgba(255, 255, 255, 0.1);
}

@media (max-width: 700px) {
    :root {
        --font-xl: 1.8rem;
        --font-lg: 1.4rem;
        --font-md: 1.2rem;
        --font-base: 1rem;
        --font-sm: 1rem;
        --art-deco-border-width: 60px;
    }
}



body {
    margin: 0;
    font-size: var(--font-base);
    line-height: 2rem;
    font-family: Garamond Premier Pro, Garamond, Hoefler Text, Baskerville, Libre Baskerville, Georgia, Palatino, Palatino Linotype, serif;
    background-color: var(--background-color);
    color: var(--text-primary);
}

/* Universal scrollbar styling */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--border-light);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-accent);
    border-radius: 6px;
    border: 2px solid var(--border-light);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-accent);
}

/* Firefox scrollbar styling */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-accent) var(--border-light);
    box-sizing: border-box;
}

h1 {
    line-height: normal;
    font-weight: 500;
}

a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 525;
    text-decoration: underline;
    text-decoration-color: var(--primary-accent);
    text-decoration-skip-ink: none;
    text-decoration-thickness: 2.7px;
    white-space: pre-line;
}

a:focus-visible {
    outline: 2px solid var(--secondary-text-color);
}

#resize-bar:hover {
    cursor: pointer;
}

blockquote {
    margin-left: 0;
    padding-left: 30px;
    border-left: 5px solid var(--primary-accent);
    color: var(--text-quote);
}

blockquote a {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

blockquote a:hover {
    text-decoration: none;
    color: inherit;
}


li.toc-list-item[style*="counter-increment: section"]::before {
    content: counter(section) ". ";
    display: inline-block;
    width: 2em;
}

.bottom-navbar-container {
    font-family: var(--secondary-font);
}


/* Basic styling for the container and children */
.bottom-navbar-options {
    display: flex;
    max-width: var(--max-content-width);
    margin: auto;
    flex-direction: row;
    justify-content: space-between;
    align-items: stretch;
    min-height: 60px;
    color: var(--text-white);
}

.bottom-navbar-child {
    flex: 1 1 auto;
    min-width: 100px;
    text-align: center; /* Centering text inside each child */
    padding: 15px 0px; 
    text-decoration: none;
    text-decoration-line: none;
    color: var(--text-muted);
    border-top: 2px solid var(--border-light);
    border-left: 2px solid var(--border-light);
    flex-basis: 10%;
    font-weight: 200;
    font-size: var(--font-sm);
}

.bottom-navbar-toc {
    flex: 1 1 auto;
    min-width: 100px;
    text-align: right; /* Centering text inside each child */
    padding: 15px 0px;
    padding-right: 20px;
    text-decoration: none;
    text-decoration-line: none;
    color: var(--text-muted);
    border-top: 2px solid var(--border-light);
    font-weight: 200;
    font-size: var(--font-sm);
}

.bottom-navbar-toc::after {
    content: "▶︎";
    position: relative;
    color: var(--primary-accent);
    font-size: 1rem;
    padding: 0px;
    vertical-align: middle;
    top: 0px;
    right: -10px;
}



a.bottom-navbar-child:visited {
    color: var(--text-muted);
}

.bottom-navbar-child:first-child {
    text-align: left;
    padding-left: 20px;
    border-left: 0;
    flex-basis: 35%
}
.bottom-navbar-child:last-child {
    text-align: right;
    flex-basis: 35%;
    padding-right: 20px;
}


.bottom-navbar-child:last-child::after {
    content: "▶︎";
    position: relative;
    color: var(--primary-accent);
    font-size: 1rem;
    padding: 0px;
    vertical-align: middle;
    top: 0px;
    right: -10px;
}

.bottom-navbar-child:first-child::before {
    content: "◀";
    position: relative;
    color: var(--primary-accent);
    font-size: 1rem;
    padding: 0px;
    vertical-align: middle;
    top: 0px;
    left: -10px;
}


/* When the parent container is wide enough, the children will be in a row */
@media (min-width: 900px) {
    .bottom-navbar-options {
        flex-direction: row;
    }
}

/* When the parent container's width is less than 600px */
@media (max-width: 900px) {
    .bottom-navbar-child:nth-child(2) {
        border-left: 0;
    }
    .bottom-navbar-child:last-child {
        border-left: 0;
    }
    .bottom-navbar-options {
        flex-wrap: wrap;
    }
    /* First child stays alone */
    .bottom-navbar-child:nth-child(1) {
        flex: none;
        width: 100%;
    }

    /* Last child is below the middle three */
    .bottom-navbar-child:nth-child(4) {
        flex: none;
        width: 100%;
    }
}

.bottom-navbar-child.disabled {
    color: var(--secondary-text-color);
}

/* Table of Contents Styles */
.page-content > ul.toc-list {
    padding-left: 0;
}

.toc-list {
    list-style: none;
    padding-left: 1rem;  /* Using rem instead of em */
}

.toc-list.centered {
    padding-left: 0;
    text-align: center;
}



.toc-item.centered {
    margin: 1rem 0;
}

/* Special indentation for sections under Prologue */
.toc-item.prologue-chapter > .toc-list > .toc-item.toc-section {
    padding-left: 1rem;
}

/* Vertical spacing between different levels */
.toc-item.toc-part {
    margin-top: 1.5rem;  /* More space before parts */
}

.toc-item.toc-part:first-child {
    margin-top: 0;  /* No extra space for first part */
}

.toc-item.toc-chapter {
    margin-top: 1.5rem;  /* More space before chapters */
}

/* First chapter in a part should have less top margin */
.toc-item.toc-part > .toc-list > .toc-item.toc-chapter:first-child {
    margin-top: 0.5rem;  /* Reduced space for first chapter in a part */
}


/* Add extra space when transitioning from sections to a new chapter or part */
.toc-item.toc-section + .toc-item.toc-chapter,
.toc-item.toc-section + .toc-item.toc-part {
    margin-top: 2rem;
}

.toc-link {
    text-decoration: none;
    color: var(--text-primary);
    display: inline-block;
}

.toc-entry-container {
    display: inline-block;
    width: 100%;
}

.gradient-divider-container {
    display: inline-block;
    width: 100%;
}

.toc-number {
    color: var(--primary-accent);
}

/* Different sizes for different levels */
li.toc-item.toc-part {
    font-size: var(--font-lg);
}

li.toc-item.toc-chapter {
    font-size: var(--font-md);
}

li.toc-item.toc-section {
    font-size: var(--font-base);
}

/* Part styling */
li.toc-item.toc-part > .toc-link {
    color: var(--text-primary);  /* Override the previous part color styling */
}

/* Chapter styling with underline */
li.toc-item.toc-chapter > .toc-entry-container > .toc-link.centered {
    border-bottom: 2px solid var(--primary-accent);
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Reset font size for nested lists */
/* .toc-item > .toc-list {
    font-size: initial;
} */

/* Disabled link styling for upcoming content */
.toc-item.disabled .toc-link {
    color: var(--secondary-text-color);
    text-decoration: none;
    cursor: default;
    pointer-events: none;
}

.toc-item.disabled {
    opacity: 0.75;
}

/* Library Page Styles */
.library-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 10px 2rem;
    height: 100%;
}

.library-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
    padding-bottom: 4rem;
}

/* Tablet and larger screens */
@media (min-width: 768px) {
    .library-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .search-sort-container {
        flex-direction: column;
    }
}

/* Desktop screens */
@media (min-width: 1024px) {
    .library-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.library-card {
    background-color: var(--background-color);
    border: 1px solid var(--primary-accent);
    border-radius: 4px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    /* width: 100%; */
}

.library-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 8px var(--shadow-color);
}

.library-card-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0 1rem;
}

.library-card-image {
    width: 50%;  /* Make the image take up half the card width */
    margin: 1rem auto 0;  /* Center the image with auto horizontal margins */
    aspect-ratio: 2/3;  /* This is equivalent to 1.5:1 height:width ratio */
    overflow: hidden;
    position: relative;
}

.library-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.library-card:hover .library-card-image img {
    transform: scale(1.05);
}

.library-card-title {
    font-size: var(--font-lg);
    margin: 0;
    color: var(--text-primary);
    margin-top: 0.8rem;
}

.library-card-subtitle {
    font-size: var(--font-sm);
    margin: 0;
    color: var(--text-muted);
    font-weight: normal;
}

.library-card-meta {
    flex-grow: 1;
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 1rem;
    font-size: var(--font-xs);
    color: var(--text-muted);
    flex-wrap: wrap;
}



.library-card-meta > span:not(:last-child)::after {
    content: "•";
    margin-left: 1rem;
    color: var(--primary-accent);
    font-size: var(--font-sm);
    line-height: 0;
    position: relative;
    top: 2px;
}

.library-card-type {
    font-weight: 700;
    font-style: italic;
}

/* Library Description */
.library-description {
    max-width: 800px;
    margin: 2rem auto;
    text-align: center;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Search and Sort Controls */
.search-sort-container {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    margin: 2rem 0;
    background-color: var(--background-color);
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.search-input-wrapper {
    position: relative;
    flex: 1;
    width: 100%;
    max-width: 500px;
}

.search-input {
    width: 100%;
    padding: 0.8rem;
    font-size: var(--font-xs);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    font-family: inherit;
    background-color: var(--form-control-bg);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-accent);
}

.clear-search-button {
    position: absolute;
    right: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    cursor: pointer;
    padding: 4px;
    font-size: var(--font-sm);
    color: var(--text-muted);
    line-height: 1;
}

.clear-search-button:hover {
    color: var(--red-accent);
}

.sort-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.sort-select {
    padding: 0.8rem;
    padding-right: 3rem; /* Space for custom arrow */
    font-size: var(--font-xs);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    background-color: var(--form-control-bg);
    color: black;
    font-family: inherit;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.select-wrapper {
    position: relative;
    display: inline-block;
}

.select-wrapper::after {
    content: '▼';
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    transition: color 0.2s ease;
}

.select-wrapper:hover .sort-select {
    border-color: var(--primary-accent);
}

.select-wrapper:hover::after {
    color: var(--primary-accent);
}

.sort-select:focus {
    outline: none;
    border-color: var(--primary-accent);
}

.sort-dir-btn {
    padding: 0.8rem 1rem;
    font-size: var(--font-xs);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    background-color: var(--form-control-bg);
    color: black;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sort-dir-btn:hover {
    border-color: var(--primary-accent);
    color: var(--primary-accent);
}

/* Table styling */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    line-height: 1.6;
    background-color: var(--background-color);
}

.footnote-back-link {
    display: inline;
    margin-left: 0.5rem;
    font-size: var(--font-sm);
    text-decoration: none;
    color: var(--primary-accent);
    transition: transform 0.2s ease;
}

.footnote-back-link:hover {
    transform: scale(1.2);
    color: var(--red-accent);
}



/* Footnote list item styling */
.fn-li > p:nth-child(2),
.fn-li > blockquote:nth-child(2) {
    margin-top: 0;
}

/* Footnote reference styling */
a[id^="fnref-"] {
    text-decoration: none;
    color: var(--primary-accent);
    font-weight: bold;
}

th {
    text-align: left;
    padding: 0.5rem;
    border-bottom: 2.7px solid var(--primary-accent);
    font-weight: 525;
}

td {
    padding: 0.5rem;
    border-bottom: 1px solid var(--border-light);
}

/* First column (Rule number) styling */
td:first-child,
th:first-child {
    width: 10%;
    text-align: center;
    color: var(--primary-accent);
}

/* Second column (Offense) styling */
td:nth-child(2),
th:nth-child(2) {
    width: 70%;
}

/* Third column (Lashes) styling */
td:last-child,
th:last-child {
    width: 20%;
    text-align: center;
}


sup {
    font-size: 0.75em;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
    top: -0.4em;
  }

/* Wiki Page Styles */


.wiki-content {
    margin: 2rem auto;
    max-width: var(--max-content-width);
    width: 100%;
    padding: 0 10px 2rem;
    
}

.document-header {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
    padding: 2rem;
    background-color: var(--background-color);
    border: 1px solid var(--primary-accent);
    border-radius: 4px;
}

.document-image-container {
    flex-shrink: 0;
    width: 200px;
    height: 300px;
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 0 4px 8px var(--shadow-color);
}

.document-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.document-image:hover {
    transform: scale(1.02);
}

.document-title-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.document-title {
    margin: 0 0 1rem 0;
    font-size: var(--font-xl);
    line-height: 1.2;
    color: var(--text-primary);
}

.document-subtitle {
    margin: 0 0 1rem 0;
    font-size: var(--font-sm);
    font-weight: normal;
    color: var(--text-muted);
    font-style: italic;
}

.document-author {
    color: var(--text-muted);
    line-height: 1.4;
}

.document-type {
    font-style: italic;
    font-weight: bold;
}

.document-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
}

.action-link {
    padding: 0.5rem 1rem;
    border: 1px solid var(--primary-accent);
    border-radius: 4px;
    text-decoration: none;
    font-size: var(--font-xs);
    font-weight: 500;
    transition: all 0.2s ease;
}

.action-link.external-link {
    color: var(--primary-accent);
    background-color: transparent;
}

.action-link.external-link:hover {
    background-color: var(--primary-accent);
    color: var(--text-white);
}

.action-link.download-link {
    color: var(--text-white);
    background-color: var(--primary-accent);
}

.action-link.download-link:hover {
    background-color: var(--red-accent);
    border-color: var(--red-accent);
}

.action-link.disabled {
    color: var(--secondary-text-color);
    border-color: var(--border-light);
    background-color: var(--border-light);
    cursor: not-allowed;
}

/* References section - now free-floating */
.references-section {
    margin-bottom: 3rem;
}

.references-section h2 {
    margin: 0 0 1.5rem 0;
    font-size: var(--font-md);
    color: var(--text-primary);
    text-align: center;
}

.no-content-message {
    color: var(--secondary-text-color);
    font-style: italic;
    text-align: center;
    padding: 2rem;
    background-color: var(--border-light);
    border-radius: 4px;
    border: 1px dashed var(--border-light);
}

.backlinks-grid,
.highlights-grid,
.references-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Backlink and highlight item styling */
.backlink-item {
    text-decoration: none;
    color: inherit;
}

.backlink-content {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--primary-accent);
    border-radius: 4px;
    padding: 1.5rem;
    background-color: var(--background-color);
}

.backlink-header,
.highlight-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.reference-type-badge {
    font-size: var(--font-xs);
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.backlink-badge {
    background-color: var(--secondary-text-color);
    color: var(--text-white);
}

.highlight-badge {
    background-color: var(--secondary-text-color);
    color: var(--text-white);
}

.backlink-title {
    font-weight: 600;
    color: var(--primary-accent);
    margin: 0;
}

.backlink-text {
    color: var(--text-muted);
    line-height: 1.5;
}

.backlink-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.backlink-link {
    color: var(--primary-accent);
    text-decoration: none;
    font-size: var(--font-xs);
    font-weight: 500;
    transition: color 0.2s ease;
    align-self: flex-start;
}

.backlink-link:hover {
    color: var(--red-accent);
    text-decoration: underline;
}

.used-highlight-item {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--primary-accent);
    border-radius: 8px;
    padding: 1.5rem;
    /* background-color: var(--border-light); */
    /* transition: transform 0.2s ease, box-shadow 0.2s ease; */
}

/* .used-highlight-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow-color);
} */

.highlight-title {
    font-weight: 600;
    color: var(--primary-accent);
    margin: 0;
}

.highlight-title-prefix {
    color: var(--text-muted);
}

.highlight-content {
    margin-top: 1rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
    line-height: 1.5;
    font-style: italic;
}

.highlight-link {
    color: var(--primary-accent);
    text-decoration: none;
    font-size: var(--font-xs);
    font-weight: 500;
    transition: color 0.2s ease;
    align-self: flex-start;
}

.highlight-link:hover {
    color: var(--red-accent);
    text-decoration: underline;
}

.highlight-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.use-context-link {
    color: var(--primary-accent);
}

.source-context-link {
    color: var(--primary-accent);
}

.source-context-link:hover {
    color: var(--red-accent);
}

/* Responsive design for mobile */
@media (max-width: 768px) {
    .document-header {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .document-image-container {
        width: 150px;
        height: 225px;
        margin: 0 auto;
    }
    
    .wiki-page-container {
        padding: 0 1rem 1rem;
    }
    
    .document-header,
    .document-metadata,
    .content-section {
        padding: 1.5rem;
    }
}

/* Common Page Layout Classes */
.page-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.content-container {
    max-width: var(--max-content-width);
    margin: auto;
    flex: 1;
    padding: 0 2rem 2rem;
}

/* Content Page Specific Classes */
.page-layout {
    display: flex;
    flex: 1;
    flex-direction: row;
    justify-content: center;
}

.page-content {
    flex-grow: 1;
    overflow: auto;
    max-width: var(--max-content-width);
    padding: 20px 10px;;
    /* text-align: justify; */
    hyphens: auto;
}

.content-title {
    text-align: center;
}

.content-divider-container {
    max-width: 100%;
    display: flex;
    justify-content: center;
}

/* Responsive adjustments for content container */
@media (max-width: 768px) {
    .content-container {
        padding: 0 1rem 1rem;
    }
}

/* Home and About Page Styles - Simplified */
.home-header,
.about-header {
    text-align: center;
}

.home-title,
.about-title {
    color: var(--text-primary);
    font-size: var(--font-xl);
    /* margin: 0 0 1rem 0; */
    font-weight: normal;
}

.home-subtitle,
.about-subtitle {
    color: var(--secondary-text-color);
    font-size: var(--font-md);
    margin: 0;
    font-weight: normal;
}

.home-main,
.about-main {
    display: flex;
    flex-direction: column;
}

.home-section {
    margin-bottom: 2rem;
}

.about-section {
    /* margin-bottom: 2rem; */
    text-align: center;
}

.home-section:last-child,
.about-section:last-child {
    margin-bottom: 0;
}

.home-section h2,
.about-section h2 {
    color: var(--text-primary);
    font-size: var(--font-sm);
    margin: 0 0 1rem 0;
    font-weight: normal;
}



.home-section p:last-child,
.about-section p:last-child {
    margin-bottom: 0;
}

.home-link,
.about-link {
    color: var(--primary-accent);
    text-decoration: none;
}

.home-link:hover,
.about-link:hover {
    text-decoration: underline;
}




/* .document-meta > span {
    white-space: nowrap;
} */

.document-meta > span:not(:last-child)::after {
    content: "•";
    margin-left: 0.5rem;
    margin-right: 0.5rem;
    color: var(--primary-accent);
    font-size: var(--font-sm);
    line-height: 0;
    position: relative;
    top: 2px;
}

.page-number {
    color: var(--text-muted);
    font-style: italic;
}

/* Dual Header Component */
.dual-header {
    text-align: center;
    margin-bottom: 20px;
}

.dual-header h2 {
    color: var(--secondary-text-color);
    font-size: var(--font-md);
    font-weight: normal;
    margin-bottom: 0.5rem;
}

.dual-header h1 {
    color: var(--text-primary);
    font-size: var(--font-xl);
    margin-top: 0;
}

/* Dark mode toggle button */
.dark-mode-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    font-size: 18px;
    line-height: 1;
}

.dark-mode-toggle:hover {
    background-color: var(--border-light);
}

.dark-mode-toggle:focus {
    outline: none; /* Remove focus border */
}

/* Fix mobile touch hover state issues */
@media (hover: none) and (pointer: coarse) {
    .dark-mode-toggle:hover {
        background-color: transparent;
    }
    
    .dark-mode-toggle:active {
        background-color: var(--border-light);
    }
}

/* Icon display based on theme */
.dark-mode-toggle::before {
    content: "☾"; /* Light mode icon (crescent moon) */
    color: var(--text-primary);
    font-size: 16px;
    line-height: 1;
}

/* When the HTML element has data-theme="dark", show sun icon */
html[data-theme="dark"] .dark-mode-toggle::before {
    content: "☼"; /* Dark mode icon (sun) */
    color: var(--text-primary);
    font-size: 16px;
    line-height: 1;
}


.donors-section h2 {
    margin-top: 0;
}


.donors-title {
    text-align: center;
    font-size: var(--font-lg);
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: normal;
}

.donors-description {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.tier-title {
    text-align: center;
    font-size: var(--font-xl);
    color: var(--text-primary);
    margin: 2rem 0 1rem 0;
    font-weight: normal;
    font-weight: 550;
    /* font-family: var(--secondary-font); */
}

.donors-wall {
    max-width: 1000px;
    margin: 0 auto;
    margin-bottom: 30px;
}

.donor-tier {
    margin: 0 0 60px 0;
    position: relative;
    font-size: var(--font-lg);
    border-image: url('/images/art_deco_frame.svg');
    border-image-slice: 17.5% 17.5%;
    border-style: solid;
    border-width: var(--art-deco-border-width);
}

.donor-tier:last-child {
    margin-bottom: 20px;
}


.donor-names {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
    justify-items: center;
}

.donor-names p {
    margin: 0;
    font-size: 30px;
    font-weight: 600;
    padding: 0.5rem 0;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
    color: transparent;
    /* font-family: 'Zilla Slab', serif; */
    text-transform: uppercase;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 2px 2px 1px var(--art-deco-text-shadow-color);
    background-color:  var(--art-deco-background-color);
    text-align: center;
}

/* Engraved effect for donor names using background-clip */





/* Responsive adjustments */
@media (max-width: 768px) {
    .donors-wall {
        margin: 0 1rem;
    }
    
    .tier-title {
        /* font-size: var(--font-md); */
        margin: 1.5rem 0 0.75rem 0;
    }
    
    .donor-names {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .donor-names p {
        padding: 0.25rem 0;
    }
}

