/* Report figures: image at the text-column width with the caption below it.
   Scoped to `.fig` (emitted by the markdown figure-wrapper) so that a
   hand-written bare <figure> keeps Tufte's native margin-caption behaviour. */
figure.fig {
    text-align: center;
    margin: 2rem 0 2.5rem;
}

figure.fig img {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
}

figure.fig figcaption {
    float: none;
    max-width: 100%;
    margin: 0.6rem 0 0;
    text-align: left;
    font-size: 1.1rem;
    line-height: 1.5;
    color: #555;
}

figure.fig .fignum {
    font-weight: 600;
    color: #333;
}

/* Link post (teaser): the call-to-action at the foot of the post that points
   at the fuller version. Driven by the `link:` frontmatter field. */
a.postlink {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    max-width: 55%;
    margin: 2.5rem 0 1rem;
    padding: 0.9rem 1.2rem;
    border: 1px solid #d7d2c4;
    border-left: 3px solid #7a3b1d;
    border-radius: 4px;
    background: #f4f1e8;
    text-decoration: none;
    color: #7a3b1d;
}

a.postlink:hover {
    background: #efe9db;
}

a.postlink .postlink-main {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

a.postlink .postlink-label {
    font-weight: 600;
}

a.postlink .postlink-note {
    font-weight: 400;
    font-size: 0.85rem;
    color: #6c5a4a;
}

a.postlink .postlink-arrow {
    font-weight: 400;
    font-size: 1.3rem;
}

/* The "link ↗" marker beside a teaser's title in the blog index. */
.post-type {
    font-size: 0.8rem;
    font-weight: 500;
    vertical-align: middle;
    color: #7a3b1d;
    background: #f0e7dd;
    border: 1px solid #dccbbb;
    border-radius: 999px;
    padding: 0.05em 0.6em;
    white-space: nowrap;
}

@media (max-width: 760px) {
    a.postlink { max-width: 100%; }
}
