/* ============================================================
   記事テンプレート（WordPress子テーマとプレビューで共用）
   ブランドA（body[data-brand=travel]）：駅名標・路線図。BIZ UDPゴシック。アクセントはエリアの路線色
   ブランドB（body[data-brand=biz]）  ：報告書。見出しは BIZ UDP明朝、図に番号
   大胆にするのは1か所だけ：A＝路線図の目次、B＝番号つきの図
   ============================================================ */
:root{
  --ink:#25282C; --sub:#62666C; --rule:#D5D8DC; --paper:#FFFFFF; --plate:#F2F3F4;
  --accent:#80C241; --accent-ink:#2E7D32;
  --head:'BIZ UDPGothic',sans-serif; --body:'BIZ UDPGothic',sans-serif;
  --radius:4px; --w:720px;
}
body[data-brand=biz]{
  --ink:#262626; --sub:#5F6368; --rule:#C9CED6; --plate:#EEF2F7;
  --accent:#1D4E89; --accent-ink:#1D4E89;
  --head:'BIZ UDPMincho',serif; --radius:0;
}

/* 2026-11-23 ダーク配色は廃止（親テーマが白背景のまま文字だけ薄くなり読めなかった）。常にライト表示 */
:root{color-scheme:light}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--paper);color:var(--ink);font:17px/1.9 var(--body);font-feature-settings:'palt' 1;-webkit-font-smoothing:antialiased}
html[lang=en] body{font-size:18px;line-height:1.7;font-feature-settings:normal}
a{color:var(--accent-ink);text-underline-offset:3px}
img{max-width:100%;height:auto;display:block}
:focus-visible{outline:3px solid var(--accent);outline-offset:2px}

/* ---------- ヘッダー ---------- */
.site-head{border-bottom:1px solid var(--rule)}
.site-head .in{max-width:1040px;margin:0 auto;padding:12px 16px;display:flex;align-items:center;justify-content:space-between;gap:16px}
.logo{display:flex;align-items:center;gap:10px;color:var(--ink);text-decoration:none;font-weight:700;font-size:17px}
.logo .mk{display:inline-flex;border:2px solid var(--accent);border-radius:4px;overflow:hidden;font-size:12px;line-height:1}
.logo .mk span{padding:3px 5px}.logo .mk span:first-child{background:var(--accent);color:#fff}
body[data-brand=biz] .logo .mk{border:none;width:6px;height:22px;background:var(--accent)}
body[data-brand=biz] .logo .mk span{display:none}
.head-cta{font-size:14px;font-weight:700;color:var(--ink);border:1.5px solid var(--ink);border-radius:var(--radius);padding:7px 14px;text-decoration:none;white-space:nowrap}

.wrap{max-width:var(--w);margin:0 auto;padding:0 16px 96px}

/* ---------- ファーストビュー ---------- */
.crumbs{font-size:13px;color:var(--sub);margin:18px 0 0;line-height:1.6}
.crumbs a{color:var(--sub);text-decoration:none}
.crumbs a:hover{text-decoration:underline}
.crumbs span+span::before{content:"/";margin:0 8px;color:var(--rule)}
.hero h1{font-family:var(--head);font-weight:700;font-size:clamp(28px,5.2vw,40px);line-height:1.32;letter-spacing:-.005em;margin:14px 0 0}
html[lang=en] .hero h1{line-height:1.18;letter-spacing:-.012em}
.dek{font-size:18px;color:var(--sub);margin:14px 0 0;line-height:1.7}
.byline{margin:16px 0 0;font-size:14px;color:var(--sub);display:flex;flex-wrap:wrap;gap:2px 20px;line-height:1.6}
.byline b{color:var(--ink);font-weight:700}
.cover{margin:16px 0 0;border-radius:6px;overflow:hidden;box-shadow:0 0 0 1px var(--rule)}
.hero .cover+h1{margin-top:24px}
.cover img{width:100%;aspect-ratio:1200/630;object-fit:cover}

.lede{margin:28px 0 0;font-size:19px;line-height:1.8}
body[data-brand=biz] .lede{font-size:18px;line-height:1.95}
.lede p{margin:0 0 14px}
.entry{margin:6px 0 0;font-size:15px;color:var(--sub)}

/* ---------- 目次 ---------- */
.toc{margin:36px 0 0}
.toc h2{font-family:var(--head);font-size:16px;font-weight:700;margin:0 0 12px;color:var(--sub)}
.toc ol{list-style:none;margin:0;padding:0}
.toc a{color:var(--ink);text-decoration:none}
.toc a:hover{color:var(--accent-ink);text-decoration:underline}
/* A：路線図。各H2が駅 */
body[data-brand=travel] .toc>ol{position:relative;padding-left:34px}
body[data-brand=travel] .toc>ol::before{content:"";position:absolute;left:9px;top:12px;bottom:12px;width:6px;background:var(--accent);border-radius:3px}
body[data-brand=travel] .toc>ol>li{position:relative;padding:5px 0;font-weight:700;font-size:16px;line-height:1.5}
body[data-brand=travel] .toc>ol>li::before{content:"";position:absolute;left:-32px;top:8px;width:18px;height:18px;border-radius:50%;background:var(--paper);border:5px solid var(--accent);box-sizing:border-box}
body[data-brand=travel] .toc ol ol{padding:2px 0 4px}
body[data-brand=travel] .toc ol ol li{font-weight:400;font-size:14px;color:var(--sub)}
body[data-brand=travel] .toc ol ol a{color:var(--sub)}
/* B：報告書の目次 */
body[data-brand=biz] .toc{border-top:2px solid var(--ink);border-bottom:1px solid var(--rule);padding:14px 0 10px}
body[data-brand=biz] .toc>ol{counter-reset:ch}
body[data-brand=biz] .toc>ol>li{counter-increment:ch;display:flex;gap:14px;padding:5px 0;font-size:16px;line-height:1.6}
body[data-brand=biz] .toc>ol>li::before{content:counter(ch);color:var(--accent);font-weight:700;min-width:1.2em;font-variant-numeric:tabular-nums}
body[data-brand=biz] .toc>ol>li.nonum::before{content:"";}
body[data-brand=biz] .toc ol ol{display:none}

/* ---------- 本文 ---------- */
.body{counter-reset:ch fig}
.body h2{font-family:var(--head);font-weight:700;font-size:clamp(22px,4vw,27px);line-height:1.4;margin:64px 0 18px;scroll-margin-top:16px}
html[lang=en] .body h2{line-height:1.25;letter-spacing:-.01em}
body[data-brand=travel] .body h2{padding-top:22px;border-top:1px solid var(--rule)}
body[data-brand=biz] .body h2{counter-increment:ch;padding-bottom:12px;border-bottom:1px solid var(--ink)}
body[data-brand=biz] .body h2::before{content:counter(ch);color:var(--accent);margin-right:16px;font-family:var(--body);font-variant-numeric:tabular-nums}
body[data-brand=biz] .body h2.nonum{counter-increment:none}
body[data-brand=biz] .body h2.nonum::before{content:none}
.body h3{font-family:var(--head);font-size:20px;line-height:1.45;margin:40px 0 8px;scroll-margin-top:16px}
.body p{margin:0 0 20px}
.body ul,.body ol{padding-left:1.4em;margin:0 0 20px}
.body li{margin:6px 0}
.body li::marker{color:var(--sub)}
.body strong{font-weight:700}

/* 図：番号つき。Bはタイトルを上に（報告書の作法）、Aは下に */
.body figure{counter-increment:fig;margin:28px 0 32px;display:flex;flex-direction:column}
.body figure img{width:100%;border:1px solid var(--rule);border-radius:var(--radius)}
.body figcaption{font-size:14px;line-height:1.65;color:var(--sub);margin-top:10px}
.body figcaption::before{content:"Fig. " counter(fig) "　";font-weight:700;color:var(--ink)}
body[data-brand=biz] .body figcaption{order:-1;margin:0 0 10px;font-size:15px;color:var(--ink)}
body[data-brand=biz] .body figcaption::before{content:"図" counter(fig) "　";color:var(--accent)}

/* 表 */
.tbl{margin:24px 0 30px;overflow-x:auto;-webkit-overflow-scrolling:touch}
.tbl table{width:100%;border-collapse:collapse;font-size:15px;line-height:1.65;min-width:520px;table-layout:auto;font-variant-numeric:tabular-nums}
.tbl th,.tbl td{padding:11px 12px;text-align:left;vertical-align:top}
body[data-brand=travel] .tbl thead th{border-bottom:4px solid var(--accent);font-size:13px;color:var(--sub);padding-bottom:8px}
body[data-brand=travel] .tbl td{border-bottom:1px solid var(--rule)}
body[data-brand=travel] .tbl td:first-child{font-weight:700}
body[data-brand=biz] .tbl table{border:1px solid var(--rule)}
body[data-brand=biz] .tbl th,body[data-brand=biz] .tbl td{border:1px solid var(--rule)}
body[data-brand=biz] .tbl thead th{background:var(--plate);font-weight:700}
body[data-brand=biz] .tbl td:first-child{font-weight:700;width:9em;min-width:7em}
body[data-brand=biz] .tbl td,body[data-brand=biz] .tbl th{line-height:1.75}

/* 中間CTA */
.cta-mid{margin:40px 0;padding:20px 22px;display:flex;flex-wrap:wrap;align-items:center;gap:12px 20px;border:1.5px solid var(--ink);border-radius:var(--radius)}
body[data-brand=biz] .cta-mid{border:none;background:var(--plate);border-left:6px solid var(--accent)}
.cta-mid p{margin:0;flex:1 1 280px;font-weight:700;line-height:1.6}
.btn{display:inline-flex;align-items:center;justify-content:center;min-height:46px;padding:10px 22px;border-radius:var(--radius);background:var(--accent-ink);color:#fff;font-weight:700;text-decoration:none;font-size:15px;border:none;cursor:pointer;font-family:var(--body)}
.btn.ghost{background:none;color:var(--ink);border:1.5px solid var(--ink)}

/* 現場メモ待ち（下書きだけに出る。公開前に必ず消す） */
.body blockquote{margin:24px 0;padding:14px 18px;border:2px dashed #D9822B;background:#FFF6EC;color:#7A420C;font-size:15px;border-radius:0}
.body blockquote p{margin:0}

/* FAQ */
.faq{margin:0}
.faq dt{font-weight:700;margin-top:22px;font-size:17px}
.faq dd{margin:6px 0 0;padding-bottom:20px;border-bottom:1px solid var(--rule)}
body[data-brand=biz] .faq dt::before{content:"Q.";color:var(--accent);margin-right:10px}

/* 引用用の埋め込みコード */
.body pre{background:var(--plate);color:var(--ink);padding:14px;overflow-x:auto;font-size:12.5px;line-height:1.6;border:1px solid var(--rule)}

/* 出典 */
.sources{margin:56px 0 0;padding-top:16px;border-top:1px solid var(--rule);font-size:14px;color:var(--sub);line-height:1.7}
.sources p{margin:0 0 6px;font-weight:700;color:var(--ink)}
.sources ul{margin:0;padding-left:1.2em}
.body hr{display:none}

/* 監修者 */
.person{margin:48px 0 0;padding:20px 0;border-top:1px solid var(--rule);border-bottom:1px solid var(--rule);display:grid;grid-template-columns:72px 1fr;gap:16px;align-items:start}
.person .ph{width:72px;height:72px;border-radius:50%;background:var(--plate)}
.person .role{font-size:13px;color:var(--sub)}
.person .nm{font-family:var(--head);font-weight:700;font-size:18px;margin-top:2px}
.person p{margin:6px 0 0;font-size:14px;color:var(--sub);line-height:1.75}

/* 関連記事 */
.related{margin:40px 0 0}
.related h2{font-family:var(--head);font-size:17px;margin:0 0 6px}
.related ul{list-style:none;margin:0;padding:0}
.related li{border-bottom:1px solid var(--rule)}
.related a{display:flex;justify-content:space-between;gap:16px;padding:14px 0;color:var(--ink);text-decoration:none;font-weight:700;font-size:15px}
.related a:hover{color:var(--accent-ink)}
.related small{color:var(--sub);font-weight:400;white-space:nowrap}

.site-foot{border-top:1px solid var(--rule);padding:28px 16px;text-align:center;font-size:13px;color:var(--sub)}

@media (max-width:540px){
  body{font-size:16px} html[lang=en] body{font-size:17px}
  .lede{font-size:17px} body[data-brand=biz] .lede{font-size:16.5px}
  .cta-mid .btn{width:100%}
}
@media (prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}
