html {
    margin: 0;
    padding: 0;
}

.foot {
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    margin-top: auto;
    padding-top: 2rem;
    padding-bottom: 1rem;
}

.foot p {
    margin: 0.25rem 0;
}



/* .catalog{
    border-collapse: collapse;
    width: 100%;
    line-height: 2;
    border-bottom: 2px solid #232323;
}

.catalog tr {
    display: flex;
    justify-content: space-between;
} */



.catalog {
    width: 100%;
}

.blog-item {
    position: relative;
    line-height: 2;
    min-height: 2em;
    width: 100%;
}

.title {
    position: absolute;
    left: 0;
    top: 0;
}

.title a:active{
    color: var(--h3-color);
}

.date {
    position: absolute;
    right: 0;
    top: 0;
    width: 11ch;
    text-align: left;
    white-space: nowrap;
}

hr {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    border: none;
    height: 4px;
    background: var(--h3-color);
}

/* Mobile styles */
@media (max-width: 600px) {
    .name-plate {
        margin-left: 5% !important;
        margin-right: 5% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

@media (max-width: 480px) {
    .name-plate {
        font-size: 10px !important;
    }
}
.post-date {
    margin-bottom: 0;
    opacity: 0.6;
}

.post-date + h3 {
    margin-top: 0;
}
body .main .name-plate { margin-left: auto; margin-right: auto; }
body .main { grid-column: 1 / -1; }
/* each cluster framed by four corner brackets instead of a divider */
.catalog[data-cluster] {
    --c: var(--border-color);
    padding: 10px 16px;
    margin-bottom: 24px;
    box-sizing: border-box;
    background:
      linear-gradient(var(--c), var(--c)) top left / 12px 2px no-repeat,
      linear-gradient(var(--c), var(--c)) top left / 2px 12px no-repeat,
      linear-gradient(var(--c), var(--c)) top right / 12px 2px no-repeat,
      linear-gradient(var(--c), var(--c)) top right / 2px 12px no-repeat,
      linear-gradient(var(--c), var(--c)) bottom left / 12px 2px no-repeat,
      linear-gradient(var(--c), var(--c)) bottom left / 2px 12px no-repeat,
      linear-gradient(var(--c), var(--c)) bottom right / 12px 2px no-repeat,
      linear-gradient(var(--c), var(--c)) bottom right / 2px 12px no-repeat;
}
.name-plate > .catalog[data-cluster]:last-child > .blog-item:last-child { margin-bottom: 0 !important; }
/* posts: the rendered content stays centered on the window, clear of the left list */
html body:has(.sidebar .stuff-list) .main { grid-column: 1 / -1; }
html body:has(.sidebar .stuff-list) .main .name-plate { margin: 16px auto 0 auto; width: min(700px, calc(100% - 2 * 450px)); max-width: none; }
/* posts, better resizing:
   - wide window: content is centered
   - medium window: content slides right of the list instead of shrinking first
   - narrow window: list goes on top, content full width underneath */
html body:has(.sidebar .stuff-list) .main .name-plate {
    width: min(700px, calc(100% - 450px - 2rem));
    margin: 16px auto 0 max(450px, calc(50% - 350px));
}
@media (max-width: 1000px) {
    html body:has(.sidebar .stuff-list) .main { grid-row: 4; padding-top: 1rem; overflow: visible; }
    html body:has(.sidebar .stuff-list) .main .name-plate { width: auto; margin: 0 2rem 0 0; }
    body:has(.sidebar .stuff-list) { overflow-y: auto; height: auto; }
}
/* use the measured list width instead of a fixed 450px guess */
html body:has(.sidebar .stuff-list) .main .name-plate {
    width: min(700px, calc(100% - 2 * var(--left-reserve, 450px)), calc(100% - var(--left-reserve, 450px) - 2rem));
    margin-left: max(var(--left-reserve, 450px), calc(50% - min(700px, 100% - 2 * var(--left-reserve, 450px)) / 2));
}
/* centered while there's room; then slide right (keeping full width) until it reaches the list; only then shrink */
html body:has(.sidebar .stuff-list) .main .name-plate {
    --w: min(900px, calc(100% - var(--left-reserve, 450px) - 2rem));
    width: var(--w);
    margin-left: max(var(--left-reserve, 450px), calc(50% - var(--w) / 2));
}
html body:has(.sidebar .stuff-list) .main .name-plate { max-width: none; }
/* centered AND hugging the list: the post widens to fill the space between the list and its mirror on the right
   (up to 1100px); if it can't fill that, it falls back to sliding right / shrinking as before */
html body:has(.sidebar .stuff-list) .main .name-plate {
    --w: max(min(1100px, calc(100% - 2 * var(--left-reserve, 450px))), min(700px, calc(100% - var(--left-reserve, 450px) - 2rem)));
}
/* narrow windows (stacked): post starts at the left edge, full width. Keep this last so it wins. */
@media (max-width: 1000px) {
    html body:has(.sidebar .stuff-list) .main .name-plate { width: auto; margin: 0 2rem 0 0; }
}
