:root {
    --theme-bg: #ffffff;
    --theme-surface: #fbfaf6;
    --theme-border: #d8d1c3;
    --theme-text: #1f252d;
    --theme-muted: #697485;
    --theme-blue: #245ea8;
    --theme-green: #24734c;
    --theme-gold: #bd8a24;
    --theme-radius: 10px;
    --theme-shadow: 0 10px 30px rgba(31, 37, 45, .08);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--theme-bg);
    color: var(--theme-text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.55;
    margin: 0;
    text-rendering: optimizeLegibility;
}

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

a {
    color: var(--theme-blue);
    text-underline-offset: 3px;
}

a:hover,
a:focus {
    color: #123d73;
}

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal;
}

.screen-reader-text:focus {
    background: #fff;
    border: 2px solid var(--theme-blue);
    clip: auto;
    clip-path: none;
    color: var(--theme-text);
    height: auto;
    left: 16px;
    padding: 10px 12px;
    top: 16px;
    width: auto;
    z-index: 100000;
}

.site-header {
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid var(--theme-border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.site-header__inner {
    align-items: center;
    display: flex;
    gap: 24px;
    justify-content: space-between;
    margin: 0 auto;
    max-width: 1240px;
    min-height: 72px;
    padding: 12px 24px;
}

.site-branding {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
}

.custom-logo-link {
    display: inline-flex;
}

.custom-logo {
    max-height: 46px;
    width: auto;
}

.site-title {
    color: var(--theme-text);
    font-size: 1.25rem;
    font-weight: 850;
    letter-spacing: 0;
    text-decoration: none;
    white-space: nowrap;
}

.site-navigation {
    align-items: center;
    display: flex;
    justify-content: flex-end;
    min-width: 0;
}

.menu-toggle {
    align-items: center;
    background: #fff;
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    color: var(--theme-text);
    cursor: pointer;
    display: none;
    font: inherit;
    font-weight: 750;
    gap: 8px;
    min-height: 40px;
    padding: 8px 11px;
}

.menu-toggle__bar,
.menu-toggle__bar::before,
.menu-toggle__bar::after {
    background: currentColor;
    border-radius: 999px;
    display: block;
    height: 2px;
    width: 18px;
}

.menu-toggle__bar {
    position: relative;
}

.menu-toggle__bar::before,
.menu-toggle__bar::after {
    content: "";
    left: 0;
    position: absolute;
}

.menu-toggle__bar::before {
    top: -6px;
}

.menu-toggle__bar::after {
    top: 6px;
}

.primary-menu,
.footer-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.primary-menu {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: flex-end;
}

.primary-menu a {
    border-radius: 999px;
    color: var(--theme-text);
    display: block;
    font-weight: 700;
    padding: 8px 10px;
    text-decoration: none;
    white-space: nowrap;
}

.primary-menu a:hover,
.primary-menu a:focus,
.primary-menu .current-menu-item > a,
.primary-menu .current_page_item > a {
    background: #f3f0e8;
    color: var(--theme-blue);
}

.site-content {
    margin: 0 auto;
    max-width: 1240px;
    min-height: 60vh;
    padding: 0 24px;
}

.site-main {
    margin: 0 auto;
    padding: 42px 0 64px;
}

.site-main--front {
    padding-top: 24px;
}

.site-main--page,
.site-main--single,
.site-main--archive,
.site-main--search,
.site-main--index,
.site-main--404 {
    max-width: 920px;
}

.tcgportal-theme-plugin-page .site-content {
    max-width: none;
    padding: 0;
}

.tcgportal-theme-plugin-page .tcgportal {
    margin-left: auto;
    margin-right: auto;
}

.page-content__header,
.archive-header,
.single-post-content__header {
    border-bottom: 1px solid var(--theme-border);
    margin-bottom: 28px;
    padding-bottom: 22px;
}

.page-content__title,
.archive-title,
.single-post-content__title,
.empty-state h1 {
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.05;
    margin: 0;
}

.single-post-content__meta,
.content-card__meta,
.archive-description,
.empty-state p {
    color: var(--theme-muted);
}

.page-content__body > *:first-child,
.single-post-content__body > *:first-child {
    margin-top: 0;
}

.page-content__body > *:last-child,
.single-post-content__body > *:last-child {
    margin-bottom: 0;
}

.post-list {
    display: grid;
    gap: 18px;
}

.content-card {
    background: #fff;
    border: 1px solid var(--theme-border);
    border-radius: var(--theme-radius);
    box-shadow: var(--theme-shadow);
    display: grid;
    gap: 0;
    grid-template-columns: minmax(160px, 260px) minmax(0, 1fr);
    overflow: hidden;
}

.content-card__media {
    background: var(--theme-surface);
    display: block;
}

.content-card__media img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.content-card__body {
    padding: 20px;
}

.content-card__title {
    font-size: 1.35rem;
    line-height: 1.2;
    margin: 0 0 6px;
}

.content-card__title a {
    color: var(--theme-text);
    text-decoration: none;
}

.content-card__title a:hover,
.content-card__title a:focus {
    color: var(--theme-blue);
}

.content-card__meta {
    font-size: .9rem;
    margin: 0 0 10px;
}

.single-post-content__media {
    margin: 0 0 28px;
}

.single-post-content__media img {
    border-radius: var(--theme-radius);
    display: block;
    width: 100%;
}

.empty-state {
    background: var(--theme-surface);
    border: 1px solid var(--theme-border);
    border-radius: var(--theme-radius);
    padding: 32px;
}

.theme-button {
    align-items: center;
    background: var(--theme-blue);
    border-radius: 8px;
    color: #fff;
    display: inline-flex;
    font-weight: 750;
    min-height: 42px;
    padding: 9px 14px;
    text-decoration: none;
}

.theme-button:hover,
.theme-button:focus {
    color: #fff;
}

.navigation.pagination {
    margin-top: 30px;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.page-numbers {
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    min-width: 40px;
    padding: 8px 11px;
    text-align: center;
    text-decoration: none;
}

.page-numbers.current {
    background: var(--theme-blue);
    border-color: var(--theme-blue);
    color: #fff;
}

.site-footer {
    background: #151b23;
    color: #d9e2ea;
    margin-top: 40px;
}

.site-footer__inner {
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, 1fr) auto;
    margin: 0 auto;
    max-width: 1240px;
    padding: 30px 24px;
}

.site-footer__brand p {
    color: #aeb9c6;
    margin: 6px 0 0;
}

.footer-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
}

.footer-menu a {
    color: #d9e2ea;
}

@media (max-width: 900px) {
    .site-header__inner {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
    }

    .site-navigation {
        align-items: stretch;
        display: block;
    }

    .menu-toggle {
        display: inline-flex;
        width: 100%;
    }

    .primary-menu {
        display: none;
        justify-content: flex-start;
        margin-top: 10px;
    }

    .site-navigation.is-open .primary-menu {
        display: flex;
    }

    .primary-menu li {
        flex: 1 1 140px;
    }

    .primary-menu a {
        background: #f8f6f0;
        text-align: center;
    }

    .content-card {
        grid-template-columns: 1fr;
    }

    .content-card__media {
        aspect-ratio: 16 / 9;
    }

    .site-footer__inner {
        grid-template-columns: 1fr;
    }

    .footer-menu {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .site-header__inner,
    .site-content,
    .site-footer__inner {
        padding-left: 16px;
        padding-right: 16px;
    }

    .site-main {
        padding-bottom: 44px;
        padding-top: 28px;
    }

    .site-title {
        font-size: 1.12rem;
    }

    .primary-menu li {
        flex-basis: 100%;
    }
}

