/*
Theme Name: Champions Build Database
Theme URI: https://champions.gcxxblog.com/
Author: GCXX
Version: 1.0.0
Text Domain: champions-db
*/

:root {
    --ink: #132235;
    --muted: #5e6b78;
    --line: #d9e1e8;
    --soft: #f3f6f8;
    --paper: #ffffff;
    --yellow: #f5c518;
    --green: #0d7a5f;
    --blue: #1769aa;
    --red: #d5453d;
    --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", sans-serif;
    font-size: 16px;
    line-height: 1.75;
}
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
img { display: block; max-width: 100%; height: auto; }
.site-shell { width: min(100% - 32px, var(--max)); margin-inline: auto; }
.screen-reader-text {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.site-header { border-bottom: 1px solid var(--line); background: #fff; }
.site-header__top {
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
    min-height: 76px;
}
.site-brand { color: var(--ink); text-decoration: none; line-height: 1.2; }
.site-brand strong { display: block; font-size: 1.18rem; }
.site-brand small { color: var(--muted); font-size: .72rem; }
.site-nav { display: flex; align-items: center; gap: 22px; font-weight: 700; font-size: .9rem; }
.site-nav a { color: var(--ink); text-decoration: none; white-space: nowrap; }
.site-nav a:hover { color: var(--green); }
.site-nav__network {
    display: inline-flex; align-items: center; gap: 7px; padding-left: 20px;
    border-left: 1px solid var(--line); color: var(--blue) !important;
}
.network-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 3px #fff3b3; }

.site-main { min-height: 60vh; }
.home-hero {
    position: relative; min-height: 360px; display: grid; align-items: end;
    overflow: hidden; background: #dfeffc;
}
.home-hero::before {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(6,28,50,.94) 0%, rgba(6,28,50,.78) 42%, rgba(6,28,50,.08) 76%);
    z-index: 1;
}
.home-hero__image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 42%; }
.home-hero__content { position: relative; z-index: 2; width: min(100% - 32px, var(--max)); margin: 0 auto; padding: 54px 0 46px; color: #fff; }
.home-hero h1 { max-width: 760px; margin: 0 0 8px; font-size: clamp(2rem, 4.2vw, 3rem); line-height: 1.2; letter-spacing: 0; }
.home-hero p { max-width: 640px; margin: 0 0 22px; color: #e9f3fa; }
.hero-search { display: flex; width: min(620px, 100%); }
.hero-search input {
    min-width: 0; flex: 1; height: 52px; padding: 0 16px; border: 0; border-radius: 4px 0 0 4px;
    font: inherit; background: #fff; color: var(--ink);
}
.hero-search button {
    min-width: 112px; border: 0; border-radius: 0 4px 4px 0; background: var(--yellow);
    color: #1f2b35; font: inherit; font-weight: 800; cursor: pointer;
}

.content-band { padding: 48px 0; }
.content-band--soft { background: var(--soft); border-block: 1px solid var(--line); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.section-heading h2 { margin: 0; font-size: 1.55rem; line-height: 1.35; }
.section-heading p { margin: 3px 0 0; color: var(--muted); font-size: .9rem; }
.section-heading a { font-weight: 700; font-size: .9rem; white-space: nowrap; }

.build-list { border-top: 2px solid var(--ink); }
.build-row {
    display: grid; grid-template-columns: minmax(0, 1fr) 180px; gap: 28px;
    padding: 24px 0; border-bottom: 1px solid var(--line);
}
.build-row__meta { display: flex; flex-wrap: wrap; gap: 7px 14px; color: var(--muted); font-size: .78rem; font-weight: 700; }
.build-row h3 { margin: 7px 0 8px; font-size: 1.18rem; line-height: 1.5; }
.build-row h3 a { color: var(--ink); text-decoration: none; }
.build-row h3 a:hover { color: var(--green); }
.build-row p { margin: 0; color: var(--muted); font-size: .9rem; }
.build-row__thumb { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; border-radius: 4px; background: #e7edf2; }
.member-strip { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 13px; }
.member-pill {
    display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 2px 9px 2px 4px;
    border: 1px solid #bcd0dd; border-radius: 3px; background: #fff; color: var(--ink);
    font-size: .75rem; font-weight: 700; text-decoration: none;
}
.member-pill img { width: 27px; height: 27px; object-fit: contain; flex: 0 0 27px; }
.member-pill:hover { border-color: var(--green); color: var(--green); }

.pokemon-index { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.pokemon-card {
    min-width: 0; display: grid; grid-template-rows: 1fr auto;
    border: 1px solid var(--line); border-top: 4px solid var(--green);
    background: #fff;
}
.pokemon-card__main {
    min-width: 0; display: grid; grid-template-columns: 76px minmax(0, 1fr); align-items: center; gap: 9px;
    padding: 9px 10px; color: var(--ink); text-decoration: none;
}
.pokemon-card__main:hover strong { color: var(--green); }
.pokemon-card__image {
    display: grid; place-items: center; width: 76px; height: 76px;
    background: #f7fafc; border-radius: 4px;
}
.pokemon-card__image img { width: 68px; height: 68px; object-fit: contain; }
.pokemon-card__copy { min-width: 0; }
.pokemon-card__copy strong { display: block; line-height: 1.4; overflow-wrap: anywhere; }
.pokemon-card__copy small { display: block; margin-top: 3px; color: var(--muted); font-weight: 500; }
.pokemon-card__detail {
    display: flex; align-items: center; justify-content: space-between; gap: 6px;
    padding: 7px 10px; border-top: 1px solid var(--line); color: var(--blue);
    font-size: .75rem; font-weight: 700; text-decoration: none;
}
.pokemon-card__detail:hover { background: #f3f8fb; }

.archive-header { padding: 38px 0 22px; border-bottom: 1px solid var(--line); }
.archive-header h1 { margin: 0 0 5px; font-size: 2rem; letter-spacing: 0; }
.archive-header p { margin: 0; color: var(--muted); }
.archive-header__pokemon {
    display: grid; grid-template-columns: 128px minmax(0, 1fr); align-items: center; gap: 22px;
}
.archive-header__pokemon-image {
    display: grid; place-items: center; width: 128px; height: 128px;
    border: 1px solid var(--line); background: var(--soft);
}
.archive-header__pokemon-image img { width: 116px; height: 116px; object-fit: contain; }
.archive-header__detail-link {
    display: inline-flex; align-items: center; gap: 7px; margin-top: 10px;
    font-size: .86rem; font-weight: 800; text-decoration: none;
}
.pokemon-selector { padding: 24px 0 10px; }
.pokemon-selector__heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 12px; }
.pokemon-selector__heading h2 { margin: 0; font-size: 1.18rem; line-height: 1.4; }
.pokemon-selector__heading p { margin: 0; color: var(--muted); font-size: .82rem; }
.pokemon-selector__grid {
    display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 7px;
}
.pokemon-selector__item,.pokemon-selector__all {
    min-width: 0; height: 86px; display: grid; place-items: center; align-content: center;
    border: 1px solid var(--line); border-radius: 3px; background: #fff; color: var(--ink);
    text-align: center; text-decoration: none; font-size: .72rem; font-weight: 800;
}
.pokemon-selector__item img { width: 56px; height: 56px; object-fit: contain; }
.pokemon-selector__item span { max-width: 100%; padding-inline: 4px; overflow-wrap: anywhere; line-height: 1.25; }
.pokemon-selector__item:hover,.pokemon-selector__all:hover { border-color: var(--green); color: var(--green); }
.pokemon-selector__item.is-current,.pokemon-selector__all.is-current {
    border-color: var(--green); box-shadow: inset 0 0 0 2px var(--green); background: #f1faf7;
}
.filters {
    display: grid; grid-template-columns: minmax(220px, 1fr) repeat(2, minmax(140px, .55fr)) auto;
    gap: 10px; padding: 18px 0 24px;
}
.filters input,.filters select,.filters button {
    min-width: 0; height: 44px; border: 1px solid #b9c5ce; border-radius: 3px; background: #fff;
    padding: 0 12px; color: var(--ink); font: inherit;
}
.filters button { border-color: var(--green); background: var(--green); color: #fff; font-weight: 800; cursor: pointer; }

.article-shell { width: min(100% - 32px, 920px); margin: 0 auto; padding: 42px 0 64px; }
.article-header { border-bottom: 1px solid var(--line); padding-bottom: 24px; margin-bottom: 26px; }
.article-header__kicker { color: var(--green); font-weight: 800; font-size: .8rem; }
.article-header h1 {
    margin: 6px 0 12px; font-size: clamp(1.8rem, 4.5vw, 2.65rem);
    line-height: 1.35; letter-spacing: 0; text-wrap: balance;
}
.article-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: .82rem; }
.article-lead { font-size: 1.06rem; color: #314253; }
.build-summary {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 28px 0;
    border-block: 2px solid var(--ink);
}
.build-summary div { padding: 13px 12px; border-right: 1px solid var(--line); }
.build-summary div:last-child { border-right: 0; }
.build-summary dt { color: var(--muted); font-size: .72rem; font-weight: 700; }
.build-summary dd { margin: 3px 0 0; font-weight: 800; }
.team-heading { margin: 38px 0 16px; padding-left: 12px; border-left: 5px solid var(--yellow); font-size: 1.55rem; }
.team-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.member-card { border: 1px solid var(--line); border-radius: 5px; overflow: hidden; background: #fff; }
.member-card__head { display: flex; align-items: center; gap: 13px; min-height: 108px; padding: 11px 14px; background: #edf5f9; border-bottom: 1px solid var(--line); }
.member-card__image {
    display: grid; place-items: center; flex: 0 0 82px; width: 82px; height: 82px;
    background: #fff; border: 1px solid #d4e2ea; border-radius: 4px;
}
.member-card__image img { width: 76px; height: 76px; object-fit: contain; }
.member-card__identity { min-width: 0; }
.member-card__number { color: var(--green); font-size: .75rem; font-weight: 900; }
.member-card h3 { margin: 1px 0 4px; font-size: 1.08rem; line-height: 1.4; overflow-wrap: anywhere; }
.member-card__links { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.member-card__links a { font-size: .72rem; font-weight: 700; text-decoration: none; }
.member-card dl { display: grid; grid-template-columns: 86px 1fr; margin: 0; }
.member-card dt,.member-card dd { margin: 0; padding: 8px 12px; border-bottom: 1px solid #e9eef2; }
.member-card dt { color: var(--muted); font-size: .75rem; font-weight: 700; background: #fafbfc; }
.member-card dd { font-size: .85rem; font-weight: 600; overflow-wrap: anywhere; }
.member-card__notes { margin: 0; padding: 12px 15px; color: #334454; font-size: .88rem; }
.article-content h2 { margin-top: 2.2em; padding: 10px 14px; border-left: 5px solid var(--blue); background: var(--soft); font-size: 1.38rem; }
.article-content h3 { margin-top: 1.8em; font-size: 1.14rem; }
.article-content iframe { max-width: 100%; }
.article-content figure { margin: 26px 0; }
.article-content figcaption { color: var(--muted); font-size: .78rem; text-align: center; }
.source-box { margin-top: 36px; padding: 16px 18px; border: 1px solid var(--line); border-left: 5px solid var(--green); background: var(--soft); }
.source-box strong { display: block; margin-bottom: 4px; }

.site-footer { padding: 32px 0; border-top: 1px solid var(--line); background: #102233; color: #dce7ee; font-size: .82rem; }
.site-footer__inner { display: flex; justify-content: space-between; gap: 24px; }
.site-footer a { color: #fff; }
.site-footer p { margin: 0; }

.empty-state { padding: 36px 0; border-block: 1px solid var(--line); color: var(--muted); }
.pagination { margin-top: 28px; }
.pagination .page-numbers { display: inline-flex; min-width: 36px; min-height: 36px; align-items: center; justify-content: center; border: 1px solid var(--line); text-decoration: none; }
.pagination .current { background: var(--ink); color: #fff; }

@media (max-width: 900px) {
    .site-header__top { align-items: flex-start; flex-direction: column; padding: 16px 0; gap: 12px; }
    .site-nav { width: 100%; overflow-x: auto; padding-bottom: 4px; }
    .site-nav__network { margin-left: auto; }
    .home-hero { min-height: 340px; }
    .home-hero::before { background: linear-gradient(90deg, rgba(6,28,50,.92), rgba(6,28,50,.62)); }
    .home-hero__image { object-position: 62% center; }
    .pokemon-index { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .pokemon-selector__grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .filters { grid-template-columns: 1fr 1fr; }
    .filters input { grid-column: 1 / -1; }
    .team-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    body { font-size: 15px; }
    .site-shell,.home-hero__content,.article-shell { width: min(100% - 24px, var(--max)); }
    .site-nav { gap: 17px; overflow-x: visible; font-size: .82rem; }
    .site-nav__about { display: none; }
    .site-nav__network { padding-left: 0; border-left: 0; }
    .home-hero { display: block; min-height: 0; background: #061c32; }
    .home-hero__image {
        position: relative; inset: auto; width: 100%; height: 180px;
        object-fit: cover; object-position: center;
    }
    .home-hero::before { display: none; }
    .home-hero__content { padding: 24px 0 30px; }
    .home-hero h1 { font-size: 2rem; }
    .hero-search button { min-width: 82px; }
    .content-band { padding: 34px 0; }
    .section-heading { align-items: flex-start; }
    .build-row { grid-template-columns: 1fr; gap: 14px; padding: 20px 0; }
    .build-row__media { order: -1; }
    .pokemon-index { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pokemon-card__main { grid-template-columns: 62px minmax(0, 1fr); }
    .pokemon-card__image { width: 62px; height: 62px; }
    .pokemon-card__image img { width: 56px; height: 56px; }
    .archive-header__pokemon { grid-template-columns: 88px minmax(0, 1fr); gap: 14px; }
    .archive-header__pokemon-image { width: 88px; height: 88px; }
    .archive-header__pokemon-image img { width: 82px; height: 82px; }
    .pokemon-selector__heading { align-items: flex-start; flex-direction: column; gap: 2px; }
    .pokemon-selector__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .pokemon-selector__item,.pokemon-selector__all { height: 80px; font-size: .68rem; }
    .pokemon-selector__item img { width: 50px; height: 50px; }
    .filters { grid-template-columns: 1fr; }
    .filters input { grid-column: auto; }
    .archive-header h1 { font-size: 1.75rem; }
    .article-shell { padding-top: 28px; }
    .article-header h1 { font-size: 1.75rem; }
    .build-summary { grid-template-columns: 1fr 1fr; }
    .build-summary div:nth-child(2) { border-right: 0; }
    .build-summary div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
    .member-card dl { grid-template-columns: 78px 1fr; }
    .member-card__image { flex-basis: 72px; width: 72px; height: 72px; }
    .member-card__image img { width: 66px; height: 66px; }
    .site-footer__inner { flex-direction: column; }
}

@media (max-width: 390px) {
    .pokemon-index { grid-template-columns: 1fr; }
    .pokemon-selector__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
