/* ==========================================
   Insights（/insights/）専用スタイル
   正本: scripts/insights/templates/insights.css（build で insights/insights.css にコピーされる）
   色は common.css の :root 変数を再利用し、独自の16進値を足さない（例外: 既存ページで使われている本文グレー #555 / 罫線 #e6e2da 系）
========================================== */

.insights-main {
    flex: 1 0 auto;
    padding: calc(var(--header-height) + 24px) 20px 96px;
    background-color: #fff;
}

/* ---------- 共通 ---------- */
.insights-breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 0;
    list-style: none;
    font-size: 12px;
    color: #555;
    margin-bottom: 28px;
}
.insights-breadcrumb li:not(:last-child)::after {
    content: "/";
    margin: 0 10px;
    color: var(--color-gold-dark);
}
.insights-breadcrumb a { color: var(--color-gold-text); }
.insights-breadcrumb li[aria-current="page"] {
    max-width: 32em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.insights-category {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: var(--color-gold-text);
    border-left: 2px solid var(--color-gold);
    padding-left: 10px;
    line-height: 1.4;
}

.insights-text-link {
    color: var(--color-gold-text);
    font-weight: 600;
    border-bottom: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}
.insights-text-link:hover {
    border-bottom-color: var(--color-gold-text);
    opacity: 1;
}

.insights-lead {
    font-size: 16px;
    color: #555;
    line-height: 1.9;
}

/* ---------- 一覧 ---------- */
.insights-hub {
    max-width: 1100px;
    margin: 0 auto;
}
.insights-hub-header {
    max-width: 760px;
    margin-bottom: 56px;
}
.insights-hub-header h1 {
    font-size: 30px;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.5;
    color: var(--color-navy);
    margin-bottom: 20px;
}
.insights-card-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px 32px;
}
.insights-card {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--color-gold);
    padding-top: 20px;
}
.insights-card-thumb {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background-color: #fcfbf9;
    margin-bottom: 18px;
}
.insights-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.insights-card-thumb-missing {
    background:
        linear-gradient(135deg, transparent 49.5%, rgba(201, 162, 75, 0.35) 50%, transparent 50.5%),
        #fcfbf9;
}
.insights-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
    font-size: 12px;
    color: #555;
    margin-bottom: 10px;
}
.insights-card h2 {
    font-size: 18px;
    letter-spacing: 0.04em;
    line-height: 1.6;
    margin-bottom: 12px;
    color: var(--color-navy);
}
.insights-card h2 a:hover { color: var(--color-gold-text); opacity: 1; }
.insights-card-desc {
    font-size: 14px;
    color: #555;
    line-height: 1.8;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.insights-card-more {
    margin-top: auto;
    font-size: 14px;
    align-self: flex-start;
}
.insights-card-status {
    font-family: monospace;
    font-size: 11px;
    padding: 0 6px;
    border: 1px solid var(--color-navy);
    color: var(--color-navy);
}

/* ---------- 記事 ---------- */
.insights-article {
    max-width: 760px;
    margin: 0 auto;
}
.insights-article-header h1 {
    font-size: 30px;
    font-weight: 700;
    line-height: 1.55;
    letter-spacing: 0.04em;
    color: var(--color-navy);
    margin: 14px 0 18px;
}
/* 見出しの行末で語や「（2026年9月時点）」が不自然に切れないようにする。
   対応ブラウザだけに効く段階的な強化（非対応ブラウザは従来どおりの折り返し） */
.insights-article-header h1,
.insights-body h2,
.insights-body h3,
.insights-card h2 {
    text-wrap: balance;
    word-break: auto-phrase;
}
.insights-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 20px;
    font-size: 13px;
    color: #555;
    padding-bottom: 20px;
    border-bottom: 1px solid #e6e2da;
    margin-bottom: 24px;
}
.insights-meta a { color: var(--color-gold-text); }
.insights-featured {
    margin: 32px 0 0;
}
.insights-featured img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
}
.insights-featured-missing {
    aspect-ratio: 16 / 9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 13px;
    color: #555;
    border: 1px dashed var(--color-gold-dark);
    background-color: #fcfbf9;
    padding: 20px;
}

.insights-toc {
    margin: 40px 0 8px;
    padding: 24px 28px;
    background-color: #fcfbf9;
    border-left: 3px solid var(--color-gold);
}
.insights-toc-title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--color-navy);
    margin-bottom: 8px;
}
.insights-toc ol {
    padding-left: 1.4em;
    font-size: 14px;
}
.insights-toc a:hover { color: var(--color-gold-text); }

/* 本文 */
.insights-body {
    font-size: 16px;
    line-height: 2;
    color: #2b2b2b;
    margin-top: 40px;
}
.insights-body h2 {
    font-size: 23px;
    line-height: 1.6;
    letter-spacing: 0.04em;
    color: var(--color-navy);
    margin: 64px 0 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--color-gold);
    scroll-margin-top: calc(var(--header-height) + 20px);
}
.insights-body h3 {
    font-size: 18px;
    line-height: 1.6;
    color: var(--color-navy);
    margin: 40px 0 16px;
    padding-left: 12px;
    border-left: 3px solid var(--color-navy);
    scroll-margin-top: calc(var(--header-height) + 20px);
}
.insights-body p { margin-bottom: 1.4em; }
.insights-body ul,
.insights-body ol {
    margin: 0 0 1.6em 1.5em;
}
.insights-body li { margin-bottom: 0.4em; }
.insights-body a:not(.insights-cite a) {
    color: var(--color-gold-text);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.insights-body strong { color: var(--color-navy); }
.insights-body code {
    font-size: 0.9em;
    background-color: #fcfbf9;
    border: 1px solid #e6e2da;
    padding: 0 4px;
}
.insights-cite {
    font-size: 11px;
    margin-left: 1px;
}
.insights-cite a {
    color: var(--color-gold-text);
    text-decoration: none;
}
.insights-body blockquote {
    margin: 0 0 1.6em;
    padding: 16px 20px;
    border-left: 3px solid #e6e2da;
    color: #555;
    background-color: #fcfbf9;
}
.insights-body blockquote p:last-child { margin-bottom: 0; }

.insights-table-wrap {
    overflow-x: auto;
    margin: 0 0 1.8em;
    -webkit-overflow-scrolling: touch;
}
.insights-body table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    line-height: 1.7;
}
/* 3列以上の表だけ最小幅を持たせ、狭い画面では枠内で横スクロールさせる（2列の表は折り返しで収める） */
.insights-body table.insights-table-wide { min-width: 520px; }
.insights-body th,
.insights-body td {
    border-bottom: 1px solid #e6e2da;
    padding: 12px 14px;
    text-align: left;
    vertical-align: top;
}
.insights-body thead th {
    background-color: var(--color-navy);
    color: #fff;
    font-weight: 600;
    border-bottom: none;
}
.insights-body tbody th {
    color: var(--color-navy);
    font-weight: 600;
    white-space: nowrap;
}

.insights-callout {
    margin: 0 0 1.8em;
    padding: 20px 24px;
    border: 1px solid #e6e2da;
    background-color: #fcfbf9;
}
.insights-callout-title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--color-navy);
    margin-bottom: 8px !important;
}
.insights-callout-point { border-top: 3px solid var(--color-gold); }
.insights-callout-opinion { border-left: 3px solid var(--color-navy); }
.insights-callout-experience { border-left: 3px solid var(--color-gold); }
.insights-callout-caution { border-top: 3px solid var(--color-navy); }
.insights-callout > :last-child { margin-bottom: 0; }

/* 出典・著者・CTA・関連記事 */
.insights-sources,
.insights-author,
.insights-service,
.insights-related {
    margin-top: 64px;
}
.insights-sources h2,
.insights-service h2,
.insights-related h2 {
    font-size: 18px;
    letter-spacing: 0.06em;
    color: var(--color-navy);
    margin-bottom: 20px;
}
.insights-sources ol {
    padding-left: 1.6em;
    font-size: 14px;
    line-height: 1.8;
}
.insights-sources li {
    margin-bottom: 10px;
    scroll-margin-top: calc(var(--header-height) + 20px);
    overflow-wrap: anywhere;
}
.insights-sources li a {
    color: var(--color-gold-text);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.insights-source-meta { color: #555; }
.insights-disclaimer {
    margin-top: 16px;
    font-size: 13px;
    color: #555;
}

.insights-author {
    padding: 28px;
    border-top: 1px solid var(--color-gold);
    border-bottom: 1px solid #e6e2da;
    font-size: 14px;
    color: #555;
}
.insights-author-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-navy);
    margin-bottom: 8px;
}
.insights-author-name span {
    font-size: 13px;
    font-weight: 400;
    color: #555;
}

.insights-service {
    padding: 36px 32px;
    background-color: var(--color-navy);
    color: #fff;
}
.insights-service h2 { color: #fff; }
.insights-service p { font-size: 15px; line-height: 1.9; }
.insights-service .insights-text-link { color: var(--color-gold); }
.insights-service .insights-text-link:hover { border-bottom-color: var(--color-gold); }
.insights-contact {
    margin-top: 20px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}
.insights-service .btn-secondary-outline {
    color: #fff;
    border-color: #fff;
    padding: 14px 28px;
    letter-spacing: 0.06em;
    line-height: 1.6;
}
.insights-service .btn-secondary-outline:hover {
    background-color: #fff;
    color: var(--color-navy);
}
.insights-contact-note {
    margin-top: 12px;
    font-size: 13px !important;
    color: rgba(255, 255, 255, 0.85);
}

.insights-related ul { list-style: none; }
.insights-related li { border-bottom: 1px solid #e6e2da; }
.insights-related a {
    display: block;
    padding: 16px 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--color-navy);
}
.insights-related a:hover { color: var(--color-gold-text); opacity: 1; }
.insights-related-category {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-gold-text);
    margin-bottom: 4px;
}
.insights-back { margin-top: 48px; }

/* プレビュー専用（本番 HTML には出力されない） */
.insights-preview-banner {
    max-width: 1100px;
    margin: 0 auto 32px;
    padding: 14px 18px;
    font-size: 13px;
    line-height: 1.7;
    border: 2px dashed var(--color-navy);
    background-color: #fcfbf9;
}
.insights-preview-banner ul { margin: 6px 0 0 1.4em; }
.insights-preview-errors { font-weight: 700; }

/* ---------- レスポンシブ ---------- */
@media screen and (max-width: 1024px) {
    .insights-card-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media screen and (max-width: 768px) {
    .insights-main {
        padding: calc(var(--header-height-sp) + 24px) 20px 120px; /* 120px: 追従CTAバーと重ならない余白 */
    }
    .insights-card-list { grid-template-columns: 1fr; gap: 36px; }
    .insights-hub-header { margin-bottom: 40px; }
    .insights-hub-header h1,
    .insights-article-header h1 { font-size: 24px; }
    .insights-body { font-size: 15px; line-height: 1.95; }
    .insights-body h2 { font-size: 20px; margin-top: 52px; scroll-margin-top: calc(var(--header-height-sp) + 20px); }
    .insights-body h3 { font-size: 17px; scroll-margin-top: calc(var(--header-height-sp) + 20px); }
    .insights-sources li { scroll-margin-top: calc(var(--header-height-sp) + 20px); }
    .insights-toc { padding: 20px; }
    .insights-service { padding: 28px 22px; }
    .insights-author { padding: 24px 4px; }
    .insights-breadcrumb li[aria-current="page"] { max-width: 16em; }
}
