/* Custom styles for preserving line breaks */
.caption,
.text-content {
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Edward Tufte-style side notes */
.entry-container {
    display: flex;
    gap: 1rem;
    position: relative;
}

/* Preserve vertical spacing between entries (awsm.css compatibility) */
.entry-container + .entry-container {
    margin-top: 5em;
}

.entry-main {
    flex: 1;
    min-width: 0;
}

.entry-main article {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
}

.entry-main article > h5 {
    width: 100%;
}

.entry-aside {
    width: 200px;
    flex-shrink: 0;
    margin-left: 1rem;
    margin-top: 3.5rem;
    border: none !important;
    order: 2;
}

.entry-main article > p,
.entry-main article > section {
    width: 100%;
    order: 1;
}



.entry-aside .side-note {
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    padding-left: 1rem;
    color: #555;
    font-style: normal;
    position: relative;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.entry-aside .side-note::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 2px;
    background-color: #ccc;
}

.entry-aside .side-note:last-child {
    margin-bottom: 0;
}

/* Responsive: stack on smaller screens */
@media (max-width: 768px) {
    .entry-container {
        flex-direction: column;
    }

    /* Reduce gap between entries on mobile */
    .entry-container + .entry-container {
        margin-top: 2em;
    }

    .entry-main article {
        display: block;
    }

    .entry-main article > h5 {
        margin-bottom: 1rem;
    }

    .entry-aside {
        width: 100%;
        margin-left: 0;
        margin-top: 0;
        margin-bottom: 1rem;
        padding-bottom: 0.5rem;
        border-bottom: 1px solid #ddd;
    }

    .entry-main article > p,
    .entry-main article > section {
        width: 100%;
    }

    .entry-aside .side-note {
        padding-left: 0;
        padding-bottom: 0.5rem;
        margin-bottom: 0.5rem;
    }

    .entry-aside .side-note::before {
        display: none;
    }
}
