/* =========================================================
   TOP (/): custom UI (scoped)
   ※SWELL全体に影響させないため、トップページだけに限定
========================================================= */

/* ✅ body.home 依存をやめて、front-page.php の .top-main にスコープ */
.top-main {
    --text: #0b1b2b;
    --muted: #5b6b7a;
    --line: #dddddd;
    --brand: #4477a1;
    --card: #ffffff;
    --radius: 18px;
    --radius2: 3px;
    --shadow: 0 2px 8px rgba(12, 19, 32, 0.15);
}

/* Hero (FV) */
.top-main .page-h1 {
    margin: 0 auto 12px;
    text-align: center;
    font-weight: 800;
    font-size: clamp(26px, 4.2vw, 40px);
    line-height: 1.2;
    color: var(--text);
}

.top-main .page-h1__accent {
    color: #07178A;
    white-space: nowrap;
}

/* Utility */
.top-main .sp-only {
    display: inline;
}

@media (min-width:768px) {
    .top-main .sp-only {
        display: none;
    }
}

/* Menu grid (6 tiles) */
.top-main .grid6 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    max-width: 700px;
    margin: 0 auto;
}

/* Card */
.top-main .chipcard {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    min-height: 80px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform .15s ease, box-shadow .15s ease;
    text-decoration: none;
    color: var(--text);
}

.top-main .chipcard:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 48px rgba(16, 24, 40, .12);
}

/* icon--network only */
.top-main .icon--network {
    width: 31px !important;
    height: 31px !important;
}

/* Icon (circle) */
.top-main .chipicon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e9f2fd;
    display: grid;
    place-items: center;
    color: var(--brand);
}

.top-main .chipicon .icon {
    width: 36px;
    height: 36px;
    display: block;
    object-fit: contain;
}

/* Label */
.top-main .chiplabel {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.15;
    text-align: center;
    white-space: nowrap;
}

/* Desktop adjustments */
@media (min-width:900px) {
    .top-main .page-h1 {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    .top-main .grid6 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
    }
}

/* ===============================
   12分割コンテンツ
================================ */
.top-main .hub12 {
    margin-top: 28px;
}

.top-main .hub12__title {
    margin: 0 0 -14px;
    font-size: clamp(20px, 3vw, 26px) !important;
    font-weight: 800;
    text-align: center;
}

.top-main .hub12__lead {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 14px;
    text-align: center;
}

/* 3カラム手動配置 */
.top-main .hubblock-grid {
    display: block;
}

.top-main .hub-col {
    margin-bottom: 14px;
}

.top-main .hub-col:last-child {
    margin-bottom: 0;
}

@media (min-width: 900px) {
    .top-main .hubblock-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 18px;
        align-items: start;
    }
}

/* 1ブロック=1テーブル */
.top-main .hubblock {
    width: 100%;
    table-layout: fixed;
    border-collapse: separate !important;
    border-spacing: 0;
    border: none !important;
    border-radius: var(--radius2);
    overflow: hidden;
    background: #fff;
    font-size: 14px;
    margin-bottom: 14px;
}

@media (min-width: 900px) {
    .top-main .hubblock {
        margin-bottom: 18px;
    }

    .top-main .hub12__title {
        font-size: 24px !important;
    }
}

.top-main .hubblock:last-child {
    margin-bottom: 0;
}

/* 見出し（th） */
.top-main .hubblock thead th {
    padding: 6px 6px;
    font-weight: 600;
    text-align: center;
    background: #535353;
    color: var(--card);
    border-top: 1px solid #535353 !important;
    border-bottom: none !important;
    border-left: none !important;
    border-right: none !important;
}

.top-main .hubblock thead th:first-child {
    border-left: 1px solid #535353 !important;
}

.top-main .hubblock thead th:last-child {
    border-right: 1px solid #535353 !important;
}

/* データ部分（td） */
.top-main .hubblock tbody td {
    padding: 6px 6px;
    text-align: center;
    vertical-align: top;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    border-top: none !important;
    border-left: none !important;
}

.top-main .hubblock tbody td:first-child {
    border-left: 1px solid var(--line) !important;
}

.top-main .hubblock tbody td:last-child {
    border-right: 1px solid var(--line) !important;
}

.top-main .hubblock tbody tr:last-child td {
    border-bottom: 1px solid var(--line) !important;
}

/* リンク */
.top-main .hubblock a {
    display: block;
    text-decoration: underline;
    text-underline-offset: .18em;
    color: var(--brand);
}

/* リンク部分のホバーを明示 */
.top-main .hubblock a:hover {
    color: #2f5f87;
}

.top-main .hubblock tbody td:has(a:hover) {
    background: #fbfdff;
}

/* hover */
.top-main .hubblock tbody td:hover {
    background: #fbfdff;
}

.top-main .page-lead {
    margin: 0 auto 28px;
    max-width: 560px;
    text-align: center;
    font-size: 14px;
    line-height: 1.7;
    color: var(--muted);
}

.top-main .pc-only {
    display: none;
}

@media (min-width: 768px) {
    .top-main .pc-only {
        display: inline;
    }
}