/* =============================================================
   診断ハブページ・業種ページ 専用スタイル
   ============================================================= */

/* -------------------------------------------------------
   デザイントークン
------------------------------------------------------- */
:root {
    --h-bg:        #f7f8fa;
    --h-surface:   #ffffff;
    --h-text:      #111827;
    --h-muted:     #6b7280;
    --h-subtle:    #9ca3af;
    --h-border:    #e5e7eb;
    --h-accent:    #2563eb;
    --h-accent-dk: #1d4ed8;
    --h-accent-bg: #eff6ff;
    --h-radius:    8px;
    --h-font:      -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', sans-serif;
}

/* -------------------------------------------------------
   ページ全体ラッパー
------------------------------------------------------- */
.hub-page {
    min-height: 100vh;
    background: var(--h-bg);
    font-family: var(--h-font);
    color: var(--h-text);
    -webkit-font-smoothing: antialiased;
}

/* -------------------------------------------------------
   トップバー（ブランドのみ、ナビなし）
------------------------------------------------------- */
.hub-topbar {
    background: var(--h-surface);
    border-bottom: 1px solid var(--h-border);
    padding: 0 32px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.hub-topbar__brand {
    font-size: 14px;
    font-weight: 700;
    color: var(--h-text);
    text-decoration: none;
    letter-spacing: -0.01em;
}

.hub-topbar__brand:hover {
    color: var(--h-accent);
}

.hub-topbar__badge {
    font-size: 11px;
    font-weight: 600;
    color: var(--h-accent);
    background: var(--h-accent-bg);
    border: 1px solid #bfdbfe;
    border-radius: 20px;
    padding: 3px 10px;
    letter-spacing: 0.02em;
}

/* -------------------------------------------------------
   ヒーローセクション
------------------------------------------------------- */
.hub-hero {
    padding: 64px 32px 52px;
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
}

.hub-hero__eyebrow {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--h-accent);
    margin-bottom: 20px;
}

.hub-hero__title {
    font-size: clamp(26px, 4.5vw, 40px);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.025em;
    color: var(--h-text);
    margin: 0 0 18px;
}

.hub-hero__desc {
    font-size: clamp(14px, 2vw, 16px);
    color: var(--h-muted);
    line-height: 1.8;
    margin: 0 auto 36px;
    max-width: 540px;
}

/* 検索 */
.hub-search {
    max-width: 440px;
    margin: 0 auto;
    position: relative;
}

.hub-search__input {
    width: 100%;
    height: 48px;
    padding: 0 48px 0 20px;
    border: 1.5px solid var(--h-border);
    border-radius: 100px;
    font-size: 14px;
    font-family: var(--h-font);
    background: var(--h-surface);
    color: var(--h-text);
    box-sizing: border-box;
    transition: border-color .15s, box-shadow .15s;
    outline: none;
}

.hub-search__input::placeholder {
    color: var(--h-subtle);
}

.hub-search__input:focus {
    border-color: var(--h-accent);
    box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

.hub-search__icon {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--h-subtle);
    pointer-events: none;
    line-height: 1;
    font-size: 16px;
}

/* -------------------------------------------------------
   メインコンテナ
------------------------------------------------------- */
.hub-body {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 32px 80px;
}

/* -------------------------------------------------------
   カテゴリセクション
------------------------------------------------------- */
.hub-section {
    margin-top: 60px;
}

.hub-section__head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding-bottom: 16px;
    border-bottom: 1.5px solid var(--h-text);
    margin-bottom: 24px;
}

.hub-section__icon {
    font-size: 20px;
    line-height: 1;
    flex-shrink: 0;
}

.hub-section__title {
    font-size: 17px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.01em;
    color: var(--h-text);
}

.hub-section__count {
    margin-left: auto;
    font-size: 12px;
    color: var(--h-subtle);
    flex-shrink: 0;
}

/* -------------------------------------------------------
   カードグリッド
------------------------------------------------------- */
.hub-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--h-border);
    border: 1px solid var(--h-border);
    border-radius: var(--h-radius);
    overflow: hidden;
    list-style: none;
    margin: 0;
    padding: 0;
}

@media (max-width: 860px) {
    .hub-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 520px) {
    .hub-grid {
        grid-template-columns: 1fr;
    }
}

/* -------------------------------------------------------
   カード
------------------------------------------------------- */
.hub-card {
    background: var(--h-surface);
    padding: 22px 22px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    cursor: pointer;
    transition: background .12s;
}

.hub-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--h-accent-bg);
    opacity: 0;
    transition: opacity .12s;
    pointer-events: none;
}

.hub-card:hover::after {
    opacity: 1;
}

.hub-card.is-hidden {
    display: none;
}

.hub-card__title {
    font-size: 14px;
    font-weight: 700;
    margin: 0;
    position: relative;
    z-index: 1;
    line-height: 1.4;
}

.hub-card__title a {
    color: var(--h-text);
    text-decoration: none;
}

/* stretched link: タイトルリンクをカード全面に引き伸ばす */
.hub-card__title a::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
}

.hub-card__title a:hover {
    color: var(--h-accent);
}

/* キーボードフォーカス時のリング */
.hub-card__title a:focus-visible::after {
    outline: 2px solid var(--h-accent);
    outline-offset: -2px;
    border-radius: var(--h-radius);
}

.hub-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
    z-index: 1;
}

.hub-card__tags li {
    font-size: 10px;
    color: var(--h-muted);
    background: var(--h-bg);
    border: 1px solid var(--h-border);
    border-radius: 3px;
    padding: 1px 7px;
    letter-spacing: 0.01em;
}

.hub-card__desc {
    font-size: 12px;
    color: var(--h-muted);
    margin: 0;
    line-height: 1.65;
    flex: 1;
    position: relative;
    z-index: 1;
}

.hub-card__arrow {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
    color: var(--h-accent);
    background: var(--h-accent-bg);
    border: 1px solid #bfdbfe;
    border-radius: 4px;
    padding: 4px 10px;
    margin-top: 6px;
    position: relative;
    z-index: 3;          /* stretched link より手前 */
    pointer-events: auto;
    width: fit-content;
    transition: background .12s, border-color .12s;
}

.hub-card__arrow::after {
    content: '→';
    transition: transform .15s;
}

.hub-card:hover .hub-card__arrow {
    background: #dbeafe;
    border-color: #93c5fd;
}

.hub-card:hover .hub-card__arrow::after {
    transform: translateX(3px);
}

/* -------------------------------------------------------
   FAQ
------------------------------------------------------- */
.hub-faq {
    margin-top: 80px;
    padding-top: 56px;
    border-top: 1px solid var(--h-border);
}

.hub-faq__title {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 32px;
}

.hub-faq__item {
    border-bottom: 1px solid var(--h-border);
}

.hub-faq__q {
    font-size: 14px;
    font-weight: 600;
    padding: 18px 36px 18px 0;
    cursor: pointer;
    list-style: none;
    margin: 0;
    position: relative;
    line-height: 1.5;
    color: var(--h-text);
    user-select: none;
}

.hub-faq__q::-webkit-details-marker { display: none; }

.hub-faq__q::before {
    content: 'Q.';
    color: var(--h-accent);
    font-weight: 800;
    margin-right: 8px;
}

.hub-faq__q::after {
    content: '+';
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    font-weight: 300;
    color: var(--h-subtle);
    line-height: 1;
    transition: transform .2s, color .2s;
}

details[open] .hub-faq__q::after {
    transform: translateY(-50%) rotate(45deg);
    color: var(--h-accent);
}

.hub-faq__a {
    font-size: 14px;
    color: var(--h-muted);
    line-height: 1.8;
    padding: 0 0 20px 28px;
    margin: 0;
}

/* -------------------------------------------------------
   ミニフッター
------------------------------------------------------- */
.hub-footer {
    border-top: 1px solid var(--h-border);
    padding: 24px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    background: var(--h-surface);
}

.hub-footer__copy {
    font-size: 12px;
    color: var(--h-subtle);
    margin: 0;
}

.hub-footer__nav {
    display: flex;
    gap: 20px;
}

.hub-footer__nav a {
    font-size: 12px;
    color: var(--h-muted);
    text-decoration: none;
}

.hub-footer__nav a:hover {
    color: var(--h-text);
}

/* -------------------------------------------------------
   業種個別ページ ヘッダー
------------------------------------------------------- */
.ind-hero {
    background: var(--h-surface);
    border-bottom: 1px solid var(--h-border);
    padding: 40px 0 36px;
}

.ind-hero__inner {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 32px;
}

.ind-breadcrumb {
    font-size: 12px;
    color: var(--h-muted);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.ind-breadcrumb a {
    color: var(--h-muted);
    text-decoration: none;
}

.ind-breadcrumb a:hover {
    color: var(--h-accent);
    text-decoration: underline;
}

.ind-breadcrumb__sep {
    color: var(--h-border);
}

.ind-hero__category {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--h-accent);
    margin-bottom: 12px;
}

.ind-hero__title {
    font-size: clamp(22px, 3.5vw, 30px);
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -0.02em;
    margin: 0 0 16px;
    color: var(--h-text);
}

.ind-hero__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    margin: 0 0 18px;
    padding: 0;
}

.ind-hero__tags li {
    font-size: 11px;
    color: var(--h-muted);
    background: var(--h-bg);
    border: 1px solid var(--h-border);
    border-radius: 4px;
    padding: 3px 10px;
}

.ind-hero__desc {
    font-size: 14px;
    color: var(--h-muted);
    line-height: 1.8;
    margin: 0;
    max-width: 100%;
}

/* 業種ページ：ツール埋め込みエリア */
.ind-body {
    max-width: 860px;
    margin: 40px auto 80px;
    padding: 0 32px;
}

/* -------------------------------------------------------
   レスポンシブ共通
------------------------------------------------------- */
@media (max-width: 640px) {
    .hub-topbar { padding: 0 20px; }
    .hub-hero   { padding: 48px 20px 40px; }
    .hub-body   { padding: 0 20px 60px; }
    .hub-footer { padding: 20px; }
    .ind-hero   { padding: 32px 0 28px; }
    .ind-hero__inner { padding: 0 20px; }
    .ind-body   { padding: 0 20px; margin-top: 32px; }
}

/* -------------------------------------------------------
   検索で全カードが消えたセクション
------------------------------------------------------- */
.hub-section[data-empty="true"] {
    display: none;
}
