/* お役立ち記事（コラム・SEO記事）の共通レイアウト。templates/articles/_article_base.html から読み込む。
   guide.css（ヘルプ）の色・文字・余白をそのまま使い、記事に必要な部品だけをここに足す。
   色付きの背景＋左の太い線の囲み、飾りのアイコン、グラデーションは使わない（docs/ui-redesign-inventory.md）。
   クラス名は art- で始める。記事ごとの <style> はなるべく作らず、ここの部品で組む。 */

/* ---- 全体 ---- */
body:has(.article) { background: #fff; }
.guide.article { max-width: 800px; padding-top: 28px; }
.guide.article.is-wide { max-width: 1080px; }
.article .guide-crumb a { color: var(--g-muted); }

.article .guide-header h1 { font-size: clamp(25px, 3.6vw, 34px); }
.article .guide-eyebrow { letter-spacing: .08em; }
.art-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 16px 0 0; padding: 0; list-style: none; color: var(--g-muted); font-size: 13px; }
.art-meta li { white-space: nowrap; }

/* ---- 目次 ---- */
.art-toc { margin: 0 0 40px; padding: 18px 0; border-top: 1px solid var(--g-line); border-bottom: 1px solid var(--g-line); }
.art-toc > p { margin: 0 0 6px; font-size: 13px; font-weight: 700; color: var(--g-muted); letter-spacing: .08em; }
.art-toc ol { margin: 0; padding-left: 1.6em; font-size: 15px; line-height: 1.7; }
.art-toc li { margin: 4px 0; }
.art-toc a { font-weight: 400; text-decoration: none; }
.art-toc a:hover { text-decoration: underline; }

/* ---- 本文 ---- */
.art-body > h2 { margin: 64px 0 16px; padding-top: 28px; border-top: 1px solid var(--g-line); font-size: 24px; font-weight: 800; line-height: 1.5; scroll-margin-top: 90px; }
.art-body > h2:first-child { margin-top: 0; }
.art-body h3 { margin: 32px 0 10px; font-size: 19px; font-weight: 800; line-height: 1.5; scroll-margin-top: 90px; }
.art-body h4 { margin: 0 0 6px; font-size: 17px; font-weight: 800; line-height: 1.5; }
.art-body p { margin: 0 0 16px; }
.art-body ul, .art-body ol { margin: 0 0 16px; padding-left: 1.4em; }
.art-body li { margin-bottom: 6px; }
.art-body strong { font-weight: 700; }
/* 部品として並べる ul は、本文の箇条書きの字下げを外す */
.art-body :is(.art-filter, .art-cards, .art-related-list) { padding-left: 0; }

/* 要点（この記事でわかること・結論・この記事のポイント）。囲まず、上下の線と小さな見出しだけ */
.art-points { margin: 28px 0 32px; padding: 16px 0 0; border-top: 2px solid var(--g-ink); }
.art-points-title { margin: 0 0 6px !important; font-size: 14px; font-weight: 800; color: var(--g-ink); }
.art-points ul, .art-points ol { margin-bottom: 12px; }

/* 「補足」「注意」の小さなラベルを頭に付けた段落（guide-note と同じ考え方） */
.art-note { position: relative; margin: 20px 0; padding-left: 4em; font-size: 15px; color: #3c4b46; }
.art-note::before { content: "補足"; position: absolute; left: 0; top: .2em; font-size: 12px; font-weight: 700; letter-spacing: .08em; line-height: 1.85; color: var(--g-muted); }
.art-note.art-warn::before { content: "注意"; color: #9a5b00; }
.art-note > strong:first-child { display: block; color: var(--g-ink); }
.art-note p:last-child, .art-note ul:last-child, .art-note ol:last-child { margin-bottom: 0; }
.art-note ul, .art-note ol { margin-top: 4px; }

/* ---- 数字の早見（3つの方法の費用など） ---- */
.art-figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 20px 0 24px; }
.art-figure { position: relative; padding: 18px 20px; border: 1px solid var(--g-line); border-radius: 12px; background: #fff; }
.art-figure.is-pick { border: 2px solid var(--g-ink); }
.art-figure h4 { margin: 0 0 4px; font-size: 15px; color: var(--g-muted); }
.art-figure-value { margin: 0 !important; font-size: 30px; font-weight: 800; line-height: 1.3; color: var(--g-ink); }
.art-figure-value small { margin-left: 2px; font-size: 14px; font-weight: 700; color: var(--g-muted); }
.art-figure-note { margin: 6px 0 0 !important; font-size: 13px; line-height: 1.6; color: var(--g-muted); }
/* おすすめの小さな札。文字は data-pick="おすすめ" に書く（見出しの文字を変えないため） */
.art-figure[data-pick]::before { content: attr(data-pick); position: absolute; top: -11px; left: 18px; padding: 1px 10px; border-radius: 999px; background: var(--g-ink); color: #fff; font-size: 11px; font-weight: 700; line-height: 1.8; letter-spacing: .04em; }

/* ---- 費用の内訳（料金のまとめ）。左に項目、右に金額、最後に合計 ---- */
.art-cost { margin: 16px 0 24px; padding: 18px 22px 8px; border: 1px solid var(--g-line); border-radius: 12px; background: #fff; }
.art-cost-title { margin: 0 0 6px !important; font-size: 15px; font-weight: 800; }
.art-cost dl { margin: 0; }
.art-cost dl > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 10px 0; border-top: 1px solid var(--g-line); font-size: 15px; }
.art-cost dt { font-weight: 400; color: #3c4b46; }
.art-cost dd { margin: 0; font-weight: 700; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.art-cost dl > div.is-total { border-top: 2px solid var(--g-ink); }
.art-cost .is-total dt { font-weight: 800; color: var(--g-ink); }
.art-cost .is-total dd { font-size: 18px; font-weight: 800; }

/* ---- 比較表（スマホでは横にスクロール。1列目は固定） ---- */
.art-table-wrap { position: relative; margin: 16px 0 24px; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--g-line); border-radius: 12px; background: #fff; }
.art-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 15px; line-height: 1.65; }
.art-table.is-wide { min-width: 720px; }
.art-table th, .art-table td { padding: 11px 14px; border-top: 1px solid var(--g-line); text-align: left; vertical-align: top; }
.art-table thead th { border-top: 0; background: var(--g-soft); font-size: 14px; font-weight: 700; line-height: 1.5; }
.art-table td { color: #3c4b46; }
/* guide.css の word-break: auto-phrase だと表のセルが語のまとまりで折り返さず、スマホで3列の表がはみ出す */
.art-table th, .art-table td { word-break: normal; overflow-wrap: anywhere; }
.art-table tbody th { font-weight: 700; color: var(--g-ink); }
.art-table.is-wide tbody th, .art-table.is-wide thead th:first-child { position: sticky; left: 0; z-index: 1; background: #fff; box-shadow: 1px 0 0 var(--g-line); }
.art-table.is-wide thead th:first-child { background: var(--g-soft); }
/* おすすめの列・行（LearnLoom など）。色で塗らず、薄い地と太字だけ */
.art-table .is-pick { background: #f6f9ee; color: var(--g-ink); }
.art-table thead .is-pick { background: #edf3dc; }
.art-table tr.is-pick > * { background: #f6f9ee; }
.art-table-hint { display: none; margin: -16px 0 24px !important; font-size: 12px; color: var(--g-muted); }

/* ---- 良いところ／気をつけたいところ ---- */
.art-proscons { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0 24px; }
.art-proscons > div { padding: 14px 18px 4px; border: 1px solid var(--g-line); border-radius: 12px; background: #fff; }
.art-proscons-title { margin: 0 0 4px !important; font-size: 14px; font-weight: 800; }
.art-proscons .is-cons .art-proscons-title { color: #7a4a00; }
.art-proscons ul { margin-bottom: 10px; padding-left: 1.2em; font-size: 15px; }

/* ---- 手順（番号つき） ---- */
.art-steps { margin: 16px 0 24px !important; padding: 0 !important; list-style: none; counter-reset: art-step; }
.art-steps > li { position: relative; margin: 0 !important; padding: 0 0 22px 56px; counter-increment: art-step; }
.art-steps > li::before { content: counter(art-step); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--g-ink); color: #fff; font-size: 16px; font-weight: 700; }
.art-steps > li:not(:last-child)::after { content: ""; position: absolute; left: 17px; top: 42px; bottom: 6px; width: 2px; background: var(--g-line); }
.art-steps h4 { padding-top: 5px; }
.art-steps p { margin: 0; color: #3c4b46; }

/* ---- 機能などの短い説明を並べる ---- */
.art-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 16px 0 24px; }
.art-grid > div { padding: 16px 18px; border: 1px solid var(--g-line); border-radius: 12px; background: #fff; }
.art-grid-title { margin: 0 0 4px !important; font-weight: 800; }
.art-grid > div p:not(.art-grid-title) { margin: 0; font-size: 14px; line-height: 1.7; color: var(--g-muted); }

/* ---- よくある質問（details / summary） ---- */
.art-faq { margin: 16px 0 24px; }
.art-faq details { margin: 0 0 10px; border: 1px solid var(--g-line); border-radius: 12px; background: #fff; }
.art-faq summary { position: relative; padding: 14px 44px 14px 18px; font-weight: 700; line-height: 1.6; cursor: pointer; list-style: none; }
.art-faq summary::-webkit-details-marker { display: none; }
.art-faq summary::after { content: "+"; position: absolute; right: 18px; top: 12px; font-size: 20px; font-weight: 400; color: var(--g-muted); }
.art-faq details[open] summary::after { content: "−"; }
.art-faq details > div { padding: 0 18px 16px; color: #3c4b46; }
.art-faq details > div p { margin: 0; }
.art-faq details > div p + p { margin-top: 10px; }

/* ---- 申し込みの案内（落ち着いた見た目。主ボタンは1つ） ---- */
.art-cta { margin: 48px 0; padding: 28px; border: 1px solid var(--g-line); border-radius: 16px; background: var(--g-soft); }
.art-cta h2, .art-cta h3 { margin: 0 0 8px !important; padding: 0 !important; border: 0 !important; font-size: 21px; font-weight: 800; line-height: 1.5; }
.art-cta p { margin: 0 0 18px; color: #3c4b46; }
.art-cta-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.art-btn { display: inline-block; padding: 12px 28px; border-radius: 999px; background: var(--g-ink); color: #fff !important; font-weight: 700; text-decoration: none !important; }
.art-btn:hover { background: #24423f; }
.art-cta-sub { font-size: 15px; }

/* ---- 関連記事 ---- */
.art-related { margin: 56px 0 0; }
.art-related > h2 { margin: 0 0 16px; font-size: 22px; font-weight: 800; }
.art-related-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; padding: 0; list-style: none; }
.art-related-list li { margin: 0; }
.art-related-list a { display: block; height: 100%; padding: 16px 18px; border: 1px solid var(--g-line); border-radius: 12px; background: #fff; line-height: 1.6; text-decoration: none; }
.art-related-list a:hover { border-color: #9fb87a; }
.art-related-list a span { display: block; margin-top: 4px; color: var(--g-muted); font-size: 13px; font-weight: 400; }

/* ---- シェア ---- */
.art-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 40px 0 0; padding-top: 20px; border-top: 1px solid var(--g-line); font-size: 14px; color: var(--g-muted); }
.art-share a { padding: 6px 14px; border: 1px solid var(--g-line); border-radius: 999px; background: #fff; color: var(--g-ink); font-size: 13px; text-decoration: none; }
.art-share a:hover { border-color: #9fb87a; }

/* ---- 料金の早見（articles/_pricing_summary.html）を記事の見た目にそろえる。部品の中身は変えない ---- */
.article .pq-box { margin: 48px 0; padding: 24px; border-color: var(--g-line); border-radius: 16px; background: #fff; }
.article .pq-box .pq-plan { border-color: var(--g-line); }
@media (min-width: 768px) {
    /* 本文の幅（800px）に5列を入れるので、金額の文字を少し小さくする */
    .article .pq-box .pq-plan { padding: .8rem .65rem; }
    .article .pq-box .pq-price { font-size: 1.15rem; }
}
.article .pq-box .pq-plan.is-pick { border-color: var(--g-ink); }
.article .pq-box .pq-btn { font-weight: 700; }
.article .pq-box .pq-btn-main { background: var(--g-ink); }
.article .pq-box .pq-btn-sub { border-color: var(--g-line); }

/* ---- 紹介動画（_movie_embed.html） ---- */
.article .ll-embed figcaption a { font-weight: 400; }

/* ---- 記事一覧（articles/index.html） ---- */
.art-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; padding: 0; list-style: none; }
.art-filter button { padding: 7px 16px; border: 1px solid var(--g-line); border-radius: 999px; background: #fff; color: var(--g-ink); font: inherit; font-size: 14px; font-weight: 700; line-height: 1.5; cursor: pointer; }
.art-filter button:hover { border-color: #9fb87a; }
.art-filter button.active { border-color: var(--g-ink); background: var(--g-ink); color: #fff; }
.art-filter button:focus-visible { outline: 3px solid #799d33; outline-offset: 3px; }
.art-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.art-cards > li { margin: 0; }
.art-cards > li.hidden { display: none; }
.art-card { display: flex; flex-direction: column; height: 100%; padding: 20px 22px; border: 1px solid var(--g-line); border-radius: 14px; background: #fff; color: var(--g-ink) !important; font-weight: 400 !important; text-decoration: none; transition: border-color .15s ease, box-shadow .15s ease; }
.art-card:hover { border-color: #9fb87a; box-shadow: 0 8px 22px rgba(20, 36, 38, .07); }
.art-card-cat { margin: 0 0 8px; font-size: 12px; font-weight: 700; color: #4d6b1f; letter-spacing: .04em; }
.art-card-title { margin: 0 0 8px; font-size: 17px; font-weight: 800; line-height: 1.55; }
.art-card-excerpt { flex: 1; margin: 0 0 14px; font-size: 14px; line-height: 1.75; color: var(--g-muted); }
.art-card-meta { display: flex; gap: 12px; margin: 0; padding-top: 12px; border-top: 1px solid var(--g-line); font-size: 12px; color: var(--g-muted); }

@media (max-width: 960px) {
    .art-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .guide.article { padding-top: 20px; }
    .art-body > h2 { margin-top: 48px; padding-top: 24px; font-size: 21px; }
    .art-body h3 { font-size: 18px; }
    .art-note { padding-left: 0; }
    .art-note::before { position: static; display: block; line-height: 1.6; }
    .art-cost { padding: 14px 16px 6px; }
    .art-cost dl > div { font-size: 14px; }
    .art-table { font-size: 14px; }
    .art-table th, .art-table td { padding: 9px 10px; }
    .art-table-hint { display: block; }
    .art-proscons { grid-template-columns: 1fr; }
    .art-steps > li { padding-left: 48px; }
    .art-cta { padding: 22px 18px; }
    .art-cta-actions .art-btn { width: 100%; text-align: center; }
    .art-related-list { grid-template-columns: 1fr; }
    .art-cards { grid-template-columns: 1fr; }
    .article .pq-box { padding: 18px 16px; }
}
/* おすすめ行の固定列にも薄い地を付ける（固定列の白より優先） */
.art-table.is-wide tr.is-pick > th { background: #f6f9ee; }
