/* Huffman Gazette — edition change-type styles */

/* Mode toggle at the top of the page */
.edition-nav {
    margin-bottom: 2rem;
    font-family: "et-book", Palatino, "Palatino Linotype", "Palatino LT STD", "Book Antiqua", Georgia, serif;
    font-size: 1rem;
    color: #666;
}

.edition-nav a {
    text-decoration: none;
    color: #666;
    cursor: pointer;
    padding-bottom: 1px;
}

.edition-nav a.active {
    color: #111;
    border-bottom: 1px solid #111;
}

.edition-nav a:hover {
    color: #111;
}

.edition-nav .disabled {
    color: #ccc;
    cursor: default;
}

.edition-nav .separator {
    margin: 0 0.5rem;
    color: #ccc;
}

/* Anchor scroll offset — breathing room above section headers */
h2[id] {
    scroll-margin-top: 2rem;
}

/* Site name on edition pages — de-emphasized, links home */
.site-name {
    font-family: "et-book", Palatino, "Palatino Linotype", "Palatino LT STD", "Book Antiqua", Georgia, serif;
    font-size: 1.4rem;
    color: #888;
    margin-bottom: 0;
}

.site-name a {
    color: #888;
    text-decoration: none;
}

.site-name a:hover {
    color: #111;
}

/* Bureau metadata on home page */
.bureau-meta {
    color: #888;
}

/* New and evolved sections: subtle left border accent.
   Use box-shadow instead of border-left to avoid shifting content
   and breaking Tufte's margin note positioning. */
.view-changes section.change-new,
.view-changes section.change-evolved {
    box-shadow: -3px 0 0 0 #8b9e8b;
}

/* Evolved changelog in the margin */
.changelog-note {
    font-style: italic;
    color: #666;
    font-size: 0.85rem;
}

/* Tombstone label on section headings */
.tombstone-label {
    font-size: 0.6em;
    font-weight: normal;
    color: #999;
    font-style: italic;
}

/* Tombstone: de-emphasized */
.view-changes section.change-tombstone {
    opacity: 0.45;
}

.view-changes section.change-tombstone h2 {
    text-decoration: line-through;
    text-decoration-color: #999;
}

/* In "current" view mode, hide tombstoned sections entirely */
.view-current section.change-tombstone {
    display: none;
}

/* Published page layout — constrain headers to Tufte column width */
article > h1 {
    width: 55%;
}

section > h2 {
    width: 55%;
}

article > .subtitle {
    width: 55%;
}

/* Published page tables */
section > table {
    border-collapse: collapse;
    font-size: 1.2rem;
    line-height: 1.6;
    margin: 1.4rem 0;
}

section > table th {
    text-align: left;
    font-weight: bold;
    border-bottom: 2px solid #333;
    padding: 0.4rem 1rem 0.4rem 0;
}

section > table td {
    padding: 0.4rem 1rem 0.4rem 0;
    border-bottom: 1px solid #ddd;
    vertical-align: top;
}

section > table td:first-child {
    max-width: 25rem;
}

section > table tr:last-child td {
    border-bottom: none;
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
    .edition-nav a {
        color: #999;
    }

    .edition-nav a.active {
        color: #eee;
        border-bottom-color: #eee;
    }

    .edition-nav .separator {
        color: #555;
    }

    .view-changes section.change-new,
    .view-changes section.change-evolved {
        box-shadow: -3px 0 0 0 #6b8e6b;
    }

    .changelog-note {
        color: #999;
    }
}
