.blog-body {
    background: var(--paper);
}

.blog-top {
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(14px);
}

.blog-main {
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
    padding: clamp(48px, 8vw, 88px) 0 96px;
}

.blog-intro {
    width: min(72ch, 100%);
    margin-bottom: clamp(38px, 6vw, 68px);
}

.register-kicker,
.featured-meta,
.featured-link,
.filing-label,
.register-row-index,
.register-row-meta,
.article-register-topic,
.article-register-reading,
.article-ledger,
.next-entry-cue,
.article-body figcaption {
    font-family: "Spline Sans Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
}

.blog-intro h1,
.article-header h1 {
    margin: 0;
    max-width: 19ch;
    font-size: clamp(2.65rem, 7vw, 5.5rem);
    line-height: 0.98;
}

.article-description {
    max-width: 68ch;
    color: var(--muted);
    font-size: clamp(1.05rem, 2vw, 1.24rem);
    line-height: 1.6;
}

.blog-index {
    width: min(960px, calc(100% - 40px));
    padding-top: clamp(28px, 5vw, 48px);
    padding-bottom: 48px;
}

.post-main {
    padding-bottom: 48px;
}

/* Keeps the page's h1 for screen readers and search without showing it. */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.featured-entry-list,
.register-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.article-file {
    min-width: 0;
}

.filing-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    padding: 6px 9px;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: #fff;
    color: var(--ink);
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    line-height: 1;
    white-space: nowrap;
}

.filing-label-glyph {
    width: 19px;
    height: 19px;
    flex: none;
}

.filing-label-feature {
    width: 126px;
    min-height: 126px;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    padding: 16px;
}

.filing-label-feature .filing-label-glyph {
    width: 52px;
    height: 52px;
}

.latest-entry .featured-entry-list {
    margin-top: 16px;
}

.featured-entry {
    display: grid;
    grid-template-columns: 126px minmax(0, 1fr);
    gap: clamp(28px, 5vw, 44px);
    align-items: center;
    padding: clamp(24px, 4vw, 36px);
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface);
    color: var(--ink);
    text-decoration: none;
    transition: background-color 150ms ease;
}

.featured-entry-copy {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    flex-direction: column;
}

.register-kicker {
    color: var(--blue);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.featured-entry strong {
    display: block;
    margin-top: 14px;
    font-size: clamp(2rem, 4.5vw, 3rem);
    line-height: 1.02;
    letter-spacing: -0.04em;
    transition: color 150ms ease;
}

.featured-description {
    margin-top: 16px;
    color: var(--muted);
    line-height: 1.58;
}

.featured-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 22px;
    color: var(--faint);
    font-size: 0.7rem;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.featured-link {
    margin-top: 14px;
    color: var(--blue);
    font-size: 0.76rem;
    font-weight: 700;
}

.earlier-entries,
.featured-articles {
    margin-top: clamp(32px, 5vw, 44px);
}

/* Featured: three cards between the latest card and the register rows. */
.featured-card-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
}

.featured-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface);
    color: var(--ink);
    text-decoration: none;
    transition: background-color 150ms ease;
}

.featured-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.featured-card strong {
    font-size: 1.12rem;
    line-height: 1.25;
    letter-spacing: -0.01em;
    transition: color 150ms ease;
}

.featured-card-description {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.5;
}

.featured-card .register-row-meta {
    margin-top: auto;
    text-align: left;
}

.featured-card:hover,
.featured-card:focus-visible {
    background: rgba(242, 232, 206, 0.34);
}

.featured-card:hover strong,
.featured-card:focus-visible strong {
    color: var(--blue);
}

.latest-entry > h2,
.featured-articles > h2,
.earlier-entries > h2 {
    margin: 0;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--ink);
    color: var(--muted);
    font-family: "Spline Sans Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.register-row {
    display: grid;
    grid-template-columns: 106px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    min-height: 72px;
    padding: 11px 4px;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    text-decoration: none;
    transition: background-color 150ms ease;
}

.register-row-index {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    color: var(--faint);
    font-size: 0.62rem;
    letter-spacing: 0.035em;
    line-height: 1.35;
    text-transform: uppercase;
    white-space: nowrap;
}

.register-row-index > span {
    color: var(--blue);
    font-weight: 700;
    letter-spacing: 0.06em;
}

.register-row strong {
    min-width: 0;
    font-size: clamp(1rem, 2vw, 1.18rem);
    line-height: 1.25;
    transition: color 150ms ease;
}

.register-row-meta {
    color: var(--faint);
    font-size: 0.65rem;
    letter-spacing: 0.04em;
    text-align: right;
    text-transform: uppercase;
}

.featured-entry:hover,
.featured-entry:focus-visible,
.register-row:hover,
.register-row:focus-visible,
.next-entry-row:hover,
.next-entry-row:focus-visible {
    background: rgba(242, 232, 206, 0.34);
}

.featured-entry:hover strong,
.featured-entry:focus-visible strong,
.register-row:hover strong,
.register-row:focus-visible strong,
.next-entry-row:hover strong,
.next-entry-row:focus-visible strong {
    color: var(--blue);
}

.empty-sheet {
    max-width: 72ch;
    padding: clamp(26px, 5vw, 52px);
    border: 1px solid var(--line);
    background: var(--surface);
    box-shadow: 8px 9px 0 var(--manila);
}

.post-main {
    width: min(760px, calc(100% - 40px));
    padding-top: clamp(24px, 4vw, 40px);
}

.back-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 700;
}

.article-top-back {
    font-family: "Spline Sans Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.7rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.paper-article {
    margin-top: 12px;
}

.article-register-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
}

.article-register-topic,
.article-register-reading {
    font-size: 0.69rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.article-register-topic {
    color: var(--blue);
}

.article-register-reading {
    color: var(--faint);
}

.article-header h1 {
    max-width: 24ch;
    margin-top: 18px;
    font-size: clamp(2.1rem, 4.6vw, 3.2rem);
    line-height: 1.06;
    letter-spacing: -0.035em;
}

.article-description {
    max-width: 61ch;
    margin: 16px 0 24px;
}

.article-ledger {
    display: grid;
    grid-template-columns: 1.35fr 1.15fr 1fr;
    gap: 22px;
    margin: 0;
    padding: 14px 0 15px;
    border-top: 2px solid var(--ink);
    border-bottom: 1px solid var(--line);
}

.article-ledger dt {
    color: var(--faint);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.article-ledger dd {
    margin: 6px 0 0;
    color: var(--ink);
    font-size: 0.72rem;
    line-height: 1.45;
}

.article-ledger-label .filing-label-glyph {
    display: none;
}

.ledger-updated {
    display: block;
    margin-top: 4px;
    color: var(--muted);
}

.article-body {
    margin: clamp(28px, 4vw, 40px) auto 0;
    font-size: clamp(1.02rem, 1.5vw, 1.1rem);
    line-height: 1.78;
}

.article-body h2,
.article-body h3 {
    line-height: 1.16;
    scroll-margin-top: 96px;
}

.article-body h2 {
    position: relative;
    margin: 1.1em 0 0.6em;
    padding-top: 13px;
    font-size: clamp(1.85rem, 4vw, 2.45rem);
}

.article-body h2::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 34px;
    height: 4px;
    background: var(--manila);
}

.article-body h3 {
    margin: 1.55em 0 0.65em;
    font-size: clamp(1.35rem, 3vw, 1.75rem);
}

.article-body p,
.article-body ul,
.article-body ol {
    margin: 1.15em 0;
}

.article-body li + li {
    margin-top: 0.55em;
}

.article-body blockquote {
    position: relative;
    margin: 2.2em 0;
    padding: 20px 24px 20px 30px;
    border: 0;
    background: var(--manila);
    color: var(--ink);
    transform: rotate(-0.35deg);
}

.article-body blockquote::before {
    content: "";
    position: absolute;
    top: -5px;
    left: 26px;
    width: 58px;
    height: 13px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(23, 24, 26, 0.08);
}

.article-body pre {
    max-width: 100%;
    overflow-x: auto;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #f5f3ec;
    color: var(--ink);
    font-size: 0.86rem;
    line-height: 1.6;
}

.article-body :not(pre) > code {
    padding: 0.12em 0.35em;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: #f5f3ec;
}

.article-body .table-wrapper,
.article-body table {
    max-width: 100%;
}

.article-body table {
    display: block;
    overflow-x: auto;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.article-body th,
.article-body td {
    min-width: 10rem;
    padding: 11px 14px;
    border: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.article-body figure {
    margin: 2em 0;
}

.article-body figure > a {
    display: block;
    cursor: zoom-in;
}

.article-body figure > a:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 3px;
}

.article-body .figure-portrait {
    width: min(320px, 100%);
    margin-inline: auto;
}

.article-body img,
.article-body video {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--surface);
}

.article-body figcaption {
    margin-top: 10px;
    color: var(--muted);
    font-size: 0.76rem;
    line-height: 1.55;
}

.article-end {
    margin: 64px auto 0;
    color: var(--muted);
}

.next-entry-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    min-height: 72px;
    padding: 11px 4px;
    border-top: 2px solid var(--ink);
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    text-decoration: none;
    transition: background-color 150ms ease;
}

.next-entry-row strong {
    min-width: 0;
    font-size: 1rem;
    line-height: 1.25;
    transition: color 150ms ease;
}

.next-entry-cue {
    color: var(--blue);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-align: right;
    text-transform: uppercase;
}

.article-bottom-back {
    margin-top: 22px;
}

.faq-main {
    width: min(960px, calc(100% - 40px));
    padding: clamp(28px, 5vw, 48px) 0 64px;
}

.faq-intro {
    margin-bottom: clamp(24px, 4vw, 36px);
}

.faq-intro h1 {
    max-width: none;
    margin: 0;
    font-size: clamp(2rem, 4vw, 2.75rem);
    line-height: 1.08;
    letter-spacing: -0.035em;
}

/* Topic index, styled like the homepage's numbered section links. */
.faq-index {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 18px;
}

.faq-index a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 550;
    text-decoration: none;
}

.faq-index a:hover {
    border-color: var(--line-strong);
    color: var(--ink);
}

.faq-index b,
.faq-meta b {
    color: var(--blue);
    font-family: "Spline Sans Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.7rem;
    font-weight: 600;
}

.faq-list {
    border-top: 2px solid var(--ink);
}

/* Desktop: number and topic in a narrow left column, question and answer beside it. */
.faq-item {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    column-gap: 32px;
    padding: 26px 0;
    border-bottom: 1px solid var(--line);
    scroll-margin-top: 84px;
}

.faq-meta {
    grid-row: span 2;
    margin: 4px 0 0;
    color: var(--muted);
    font-family: "Spline Sans Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.faq-meta b {
    margin-right: 6px;
}

.faq-item h2 {
    margin: 0;
    font-size: clamp(1.12rem, 1.6vw, 1.3rem);
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.faq-answer {
    max-width: 68ch;
    margin-top: 8px;
    color: var(--ink);
    font-size: 0.98rem;
    line-height: 1.62;
}

.faq-answer p {
    margin: 0 0 0.7em;
}

.faq-answer > div > :last-child {
    margin-bottom: 0;
}

.faq-answer code {
    padding: 0.08em 0.32em;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: #f5f3ec;
    font-size: 0.88em;
}

.faq-answer a {
    color: var(--blue);
}

@media (max-width: 640px) {
    .faq-index a {
        min-height: 32px;
        padding: 0 10px;
        font-size: 0.78rem;
    }

    .faq-item {
        grid-template-columns: minmax(0, 1fr);
        padding: 20px 0;
    }

    .faq-meta {
        grid-row: auto;
        margin: 0 0 6px;
    }
}

/* Same footer as the homepage (footer.base in landing.css). */
.blog-footer {
    padding: 44px 0 56px;
    border-top: 1px solid var(--line);
    background: var(--surface);
}

.blog-footer .footer-inner {
    min-height: 0;
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    font-size: 0.82rem;
}

.blog-footer .footer-inner > a {
    color: var(--muted);
    text-decoration: none;
}

.blog-footer .footer-inner > a:hover {
    color: var(--ink);
    text-decoration: underline;
}

.foot-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--ink);
    font-weight: 700;
}

.foot-brand .dev {
    color: var(--blue);
    font-family: ui-serif, Georgia, serif;
}

.jd-note {
    margin: 0 0 0 auto;
    color: var(--muted);
    font-size: 0.74rem;
}

.jd-note a {
    color: var(--blue);
}

@media (max-width: 640px) {
    /* The homepage header has no vertical padding at this width. */
    .blog-top .top-inner {
        padding: 0;
    }

    .jd-note {
        flex-basis: 100%;
        margin-left: 0;
    }
}

@media (max-width: 760px) {
    .blog-top {
        position: static;
        backdrop-filter: none;
    }

    .featured-card-list {
        grid-template-columns: minmax(0, 1fr);
    }

    .featured-entry {
        grid-template-columns: 1fr;
        gap: 22px;
        padding: 28px 24px;
    }

    .filing-label-feature {
        width: auto;
        min-height: 0;
        flex-direction: row;
        justify-content: flex-start;
        gap: 8px;
        padding: 7px 10px;
    }

    .filing-label-feature .filing-label-glyph {
        width: 22px;
        height: 22px;
    }

    .article-header h1 {
        font-size: clamp(1.9rem, 8vw, 2.6rem);
    }

    .article-body blockquote {
        margin-right: 0;
        margin-left: 0;
        transform: none;
    }

}

@media (max-width: 460px) {
    .blog-main,
    .post-main,
    .faq-main {
        width: min(100% - 28px, 1120px);
    }

    .blog-intro h1 {
        font-size: clamp(2.5rem, 15vw, 4rem);
    }

    .register-row {
        grid-template-columns: auto auto minmax(0, 1fr);
        gap: 6px 8px;
        padding: 14px 0;
    }

    .register-row-index {
        display: contents;
    }

    .register-row-index > time {
        grid-column: 1 / -1;
        grid-row: 1;
    }

    .register-row strong {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .register-row-index > span {
        grid-column: 1;
        grid-row: 3;
    }

    .register-row > .register-row-meta {
        grid-column: 2 / -1;
        grid-row: 3;
        text-align: left;
    }

    .register-row > .register-row-meta::before {
        margin-right: 8px;
        content: "·";
    }

    .article-ledger {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .article-ledger > div:last-child {
        grid-column: 1 / -1;
    }

    .next-entry-row {
        grid-template-columns: auto minmax(0, 1fr);
        gap: 10px 12px;
        padding: 14px 0;
    }

    .next-entry-cue {
        grid-column: 2;
        text-align: left;
    }

}

@media (prefers-reduced-motion: reduce) {
    .featured-entry,
    .featured-entry strong,
    .featured-card,
    .featured-card strong,
    .register-row,
    .register-row strong,
    .next-entry-row,
    .next-entry-row strong {
        transition: none;
    }
}
