:root {
    --site-max: 1488px;
    --site-pad: 24px;
    --grid-gap: 16px;
    --home-content-max: 890px;
    --text: #111;
    --muted: #666;
    --border: #e8e8e8;
    --bg: #fff;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: var(--bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
}

.site-shell {
    width: min(100% - (var(--site-pad) * 2), var(--site-max));
    margin-inline: auto;
}

.site-header {
    border-bottom: 1px solid var(--border);
}

.site-header__inner {
    min-height: 72px;
    display: flex;
    align-items: center;
}

.site-nav {
    margin-left: auto;
    padding-left: 20px;
    flex-shrink: 0;
}

.site-nav a {
    text-decoration: none;
}

.site-nav a:hover {
    text-decoration: underline;
}

.site-brand {
    color: inherit;
    text-decoration: none;
    font-size: 20px;
    font-weight: 700;
}

.site-main {
    min-height: 60vh;
}

/* Homepage grid and SEO body share the same outer line on every breakpoint. */
#post-grid,
.lpc-main-html {
    width: min(100% - (var(--site-pad) * 2), var(--home-content-max));
    margin-inline: auto;
}

#post-grid {
    padding: 28px 0;
}

#post-grid ul {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px var(--grid-gap);
    margin: 0;
    padding: 0;
    list-style: none;
}

#post-grid .item {
    min-width: 0;
    margin: 0;
    padding: 0;
}

#post-grid a {
    display: block;
    color: inherit;
    text-decoration: none;
}

#post-grid .thumb {
    width: 100%;
    background: #f4f4f4;
}

#post-grid .thumb img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    margin-inline: auto;
}

#post-grid .title {
    display: -webkit-box;
    margin-top: 10px;
    overflow: hidden;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    text-overflow: ellipsis;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

#post-grid a:hover .title {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.screen-reader-text {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.content-shell {
    max-width: 880px;
    padding-top: 48px;
    padding-bottom: 64px;
}

.entry-card + .entry-card {
    margin-top: 32px;
}

.entry-title,
.single-entry__title {
    line-height: 1.25;
}

.entry-title a {
    text-decoration: none;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumbs a {
    color: inherit;
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.single-entry__image {
    margin: 24px 0;
}

.single-entry__content {
    font-size: 17px;
}

.site-footer {
    border-top: 1px solid var(--border);
    padding: 28px 0;
    color: var(--muted);
    font-size: 14px;
}

.site-footer p {
    margin: 0;
}

@media (max-width: 1024px) {
    #post-grid ul {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    :root {
        --site-pad: 16px;
        --grid-gap: 10px;
    }

    .site-header__inner {
        min-height: 60px;
    }

    #post-grid {
        padding: 18px 0;
    }

    #post-grid ul {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px var(--grid-gap);
    }
}
