:root {
    --topcar-gold: #d3ae54;
    --topcar-ink: #171717;
    --topcar-muted: #686868;
    --topcar-line: #e9e4d9;
    --topcar-soft: #faf9f6;
}

/* Blog owns its vertical flow. Keeping the header in normal flow removes the
   fragile gap created by a fixed header combined with hard-coded body padding. */
body.topcar-blog-view {
    padding-top: 0;
}

body.topcar-blog-view,
body.topcar-blog-view #page,
body.topcar-blog-view .site-content {
    max-width: 100%;
    overflow-x: clip;
}

body.topcar-blog-view .topcar-header,
body.topcar-blog-view .topcar-header.scrolled {
    position: sticky;
    padding: 15px 0;
    transition: box-shadow .3s ease;
}

body.topcar-blog-view .site-content {
    margin: 0;
    padding: 0;
}

.topcar-blog-container,
.topcar-article-container {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

.topcar-blog-hero,
.topcar-article-header {
    padding: clamp(54px, 7vw, 96px) 0 clamp(44px, 6vw, 76px);
    background: var(--topcar-soft);
    border-bottom: 1px solid var(--topcar-line);
}

.topcar-blog-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 26px;
    color: #777;
    font-size: 13px;
}

.topcar-blog-breadcrumbs a {
    color: #555;
    text-decoration: none;
}

.topcar-blog-breadcrumbs a:hover,
.topcar-blog-breadcrumbs a:focus-visible {
    color: var(--topcar-gold);
    text-decoration: underline;
}

.topcar-blog-eyebrow {
    margin: 0 0 14px;
    color: #9c7625;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.topcar-blog-hero h1,
.topcar-article-header h1 {
    max-width: 950px;
    margin: 0;
    color: var(--topcar-ink);
    font-size: clamp(2.35rem, 5.4vw, 4.75rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -.04em;
}

.topcar-blog-lead,
.topcar-article-lead {
    max-width: 820px;
    margin: 22px 0 0;
    color: #5f5f5f;
    font-size: clamp(1rem, 1.8vw, 1.2rem);
    line-height: 1.75;
}

.topcar-blog-search {
    display: flex;
    width: min(660px, 100%);
    margin-top: 30px;
}

.topcar-blog-search input[type="search"] {
    min-width: 0;
    flex: 1;
    min-height: 54px;
    padding: 0 18px;
    border: 1px solid #d9d4c8;
    border-right: 0;
    border-radius: 7px 0 0 7px;
    background: #fff;
    color: var(--topcar-ink);
}

.topcar-blog-search button,
.topcar-blog-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0 24px;
    border: 2px solid var(--topcar-gold);
    border-radius: 6px;
    background: var(--topcar-gold);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.topcar-blog-search button {
    border-radius: 0 7px 7px 0;
}

.topcar-blog-search button:hover,
.topcar-blog-button:hover,
.topcar-blog-search button:focus-visible,
.topcar-blog-button:focus-visible {
    background: var(--topcar-ink);
    border-color: var(--topcar-ink);
    color: #fff;
}

.topcar-blog-layout,
.topcar-article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: clamp(38px, 6vw, 72px);
    padding-top: clamp(48px, 7vw, 82px);
    padding-bottom: clamp(60px, 8vw, 100px);
    align-items: start;
}

.topcar-blog-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px;
}

.topcar-blog-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--topcar-line);
    border-radius: 12px;
    background: #fff;
}

.topcar-blog-card-image {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--topcar-ink);
    text-decoration: none;
}

.topcar-blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.topcar-blog-card:hover .topcar-blog-card-image img {
    transform: scale(1.035);
}

.topcar-blog-card-placeholder {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 22px;
    gap: 6px;
    text-decoration: none;
}

.topcar-blog-card-placeholder strong {
    color: var(--topcar-gold);
}

.topcar-blog-card-body {
    padding: 25px;
}

.topcar-blog-category {
    display: inline-block;
    margin-bottom: 12px;
    color: #9c7625;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .09em;
    text-decoration: none;
    text-transform: uppercase;
}

.topcar-blog-category:hover,
.topcar-blog-category:focus-visible {
    color: var(--topcar-ink);
    text-decoration: underline;
}

.topcar-blog-card h2 {
    margin: 0;
    font-size: clamp(1.25rem, 2.2vw, 1.55rem);
    line-height: 1.25;
    letter-spacing: -.02em;
}

.topcar-blog-card h2 a {
    color: var(--topcar-ink);
    text-decoration: none;
}

.topcar-blog-card h2 a:hover,
.topcar-blog-card h2 a:focus-visible {
    color: #9c7625;
}

.topcar-blog-card-body > p {
    margin: 15px 0;
    color: var(--topcar-muted);
    font-size: 15px;
    line-height: 1.7;
}

.topcar-blog-card-meta,
.topcar-article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    color: #777;
    font-size: 12px;
}

.topcar-blog-read-more {
    display: inline-block;
    margin-top: 20px;
    color: var(--topcar-ink);
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

.topcar-blog-read-more:hover,
.topcar-blog-read-more:focus-visible {
    color: #9c7625;
}

.topcar-blog-sidebar {
    display: grid;
    gap: 24px;
}

.topcar-blog-widget {
    padding: 25px;
    border: 1px solid var(--topcar-line);
    border-radius: 10px;
    background: #fff;
}

.topcar-blog-widget h2 {
    margin: 0 0 18px;
    color: var(--topcar-ink);
    font-size: 18px;
}

.topcar-blog-category-list,
.topcar-blog-recent {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.topcar-blog-category-list li + li,
.topcar-blog-recent li + li {
    border-top: 1px solid var(--topcar-line);
}

.topcar-blog-category-list a {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 11px 0;
    color: #333;
    text-decoration: none;
}

.topcar-blog-category-list small {
    color: #888;
}

.topcar-blog-recent li {
    padding: 13px 0;
}

.topcar-blog-recent a {
    display: block;
    color: #292929;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
    text-decoration: none;
}

.topcar-blog-recent time {
    display: block;
    margin-top: 5px;
    color: #888;
    font-size: 11px;
}

.topcar-blog-category-list a:hover,
.topcar-blog-recent a:hover,
.topcar-blog-category-list a:focus-visible,
.topcar-blog-recent a:focus-visible {
    color: #9c7625;
}

.topcar-blog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.topcar-blog-tags a {
    padding: 7px 10px;
    border: 1px solid #ded8ca;
    border-radius: 4px;
    color: #4c4c4c;
    text-decoration: none;
}

.topcar-blog-tags a:hover,
.topcar-blog-tags a:focus-visible {
    border-color: var(--topcar-gold);
    color: #8d691d;
}

.topcar-blog-cta {
    background: var(--topcar-ink);
    color: #ddd;
}

.topcar-blog-cta h2 {
    color: #fff;
}

.topcar-blog-cta p {
    margin: 0 0 18px;
    font-size: 14px;
    line-height: 1.65;
}

.topcar-blog-cta .topcar-blog-button {
    width: 100%;
    padding: 0 14px;
    font-size: 13px;
}

.topcar-blog-cta .topcar-blog-button:hover,
.topcar-blog-cta .topcar-blog-button:focus-visible {
    border-color: #fff;
    background: #fff;
    color: var(--topcar-ink);
}

.topcar-blog-pagination {
    margin-top: 48px;
}

.topcar-blog-pagination ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.topcar-blog-pagination a,
.topcar-blog-pagination span {
    display: inline-flex;
    min-width: 42px;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border: 1px solid var(--topcar-line);
    border-radius: 5px;
    color: #333;
    text-decoration: none;
}

.topcar-blog-pagination .current {
    border-color: var(--topcar-gold);
    background: var(--topcar-gold);
    color: #fff;
}

.topcar-blog-empty {
    padding: clamp(32px, 6vw, 64px);
    border: 1px solid var(--topcar-line);
    border-radius: 10px;
    text-align: center;
}

.topcar-blog-empty h2 {
    margin-top: 0;
    color: var(--topcar-ink);
}

.topcar-blog-empty p {
    margin-bottom: 25px;
    color: var(--topcar-muted);
}

.topcar-article-header .topcar-blog-category {
    margin-bottom: 18px;
}

.topcar-article-meta {
    margin-top: 25px;
    font-size: 13px;
}

.topcar-article-featured {
    margin: clamp(42px, 6vw, 72px) 0 0;
}

.topcar-article-featured img {
    display: block;
    width: 100%;
    max-height: 680px;
    object-fit: cover;
    border-radius: 12px;
}

.topcar-article-featured figcaption {
    margin-top: 9px;
    color: #777;
    font-size: 12px;
    text-align: center;
}

.topcar-article-content {
    color: #303030;
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1rem, 1.2vw, 1.08rem);
    line-height: 1.85;
}

.topcar-article-content > *:first-child {
    margin-top: 0;
}

.topcar-article-content h2,
.topcar-article-content h3,
.topcar-article-content h4 {
    color: var(--topcar-ink);
    line-height: 1.25;
    letter-spacing: -.025em;
    scroll-margin-top: 105px;
}

.topcar-article-content h2 {
    margin: 2.3em 0 .65em;
    font-size: clamp(1.65rem, 3vw, 2.35rem);
}

.topcar-article-content h3 {
    margin: 1.9em 0 .55em;
    font-size: clamp(1.3rem, 2.2vw, 1.65rem);
}

.topcar-article-content p,
.topcar-article-content ul,
.topcar-article-content ol {
    margin: 0 0 1.35em;
}

.topcar-article-content a {
    color: #886418;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.topcar-article-content img {
    border-radius: 8px;
}

.topcar-article-content blockquote {
    margin: 2em 0;
    padding: 20px 24px;
    border-left: 4px solid var(--topcar-gold);
    background: var(--topcar-soft);
    color: #454545;
}

.topcar-article-content table {
    width: 100%;
    margin: 2em 0;
    border-collapse: collapse;
    font-size: 14px;
}

.topcar-article-content th,
.topcar-article-content td {
    padding: 12px;
    border: 1px solid var(--topcar-line);
    text-align: left;
}

.topcar-article-content th {
    background: var(--topcar-soft);
}

.topcar-article-taxonomy {
    display: grid;
    gap: 10px;
    margin-top: 44px;
    padding-top: 24px;
    border-top: 1px solid var(--topcar-line);
    color: #666;
    font-size: 14px;
}

.topcar-article-taxonomy a {
    color: #73520f;
}

.topcar-post-navigation {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 36px;
}

.topcar-post-navigation > div:last-child {
    text-align: right;
}

.topcar-post-navigation a {
    display: block;
    padding: 18px;
    border: 1px solid var(--topcar-line);
    border-radius: 8px;
    color: var(--topcar-ink);
    text-decoration: none;
}

.topcar-post-navigation small,
.topcar-post-navigation span {
    display: block;
}

.topcar-post-navigation small {
    margin-bottom: 6px;
    color: #8a671e;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.topcar-post-navigation span {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
}

.topcar-related-posts {
    padding: clamp(60px, 8vw, 100px) 0;
    background: var(--topcar-soft);
    border-top: 1px solid var(--topcar-line);
}

.topcar-related-posts > .topcar-blog-container > h2 {
    margin: 0 0 30px;
    color: var(--topcar-ink);
    font-size: clamp(1.9rem, 3.5vw, 2.8rem);
}

.topcar-related-posts .topcar-blog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 980px) {
    body.topcar-blog-view .topcar-header,
    body.topcar-blog-view .topcar-header.scrolled {
        padding: 12px 0;
    }

    .topcar-blog-layout,
    .topcar-article-layout {
        grid-template-columns: 1fr;
    }

    .topcar-blog-sidebar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .topcar-blog-container,
    .topcar-article-container {
        width: min(calc(100% - 28px), 1180px);
    }

    .topcar-blog-grid,
    .topcar-related-posts .topcar-blog-grid,
    .topcar-blog-sidebar,
    .topcar-post-navigation {
        grid-template-columns: 1fr;
    }

    .topcar-post-navigation > div:last-child {
        text-align: left;
    }

    .topcar-blog-search input[type="search"] {
        font-size: 14px;
    }

    .topcar-blog-search button {
        padding: 0 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .topcar-blog-card-image img {
        transition: none;
    }
}
