/*
Theme Name: Kaiaku
Description: 金融・ポイント・決済サービスの変更履歴を「台帳」として見せる専用テーマ
Version: 0.3.0
Author: yabea
Text Domain: kaiaku
*/

:root {
  --paper: #fbfbf9;
  --paper-2: #f2f3ef;
  --ink: #1a1d21;
  --ink-2: #4b5157;
  --ink-3: #7d848b;
  --rule: #d9dcd6;
  --rule-2: #e8eae5;
  --worse: #c8102e;
  --worse-bg: #fbeef0;
  --better: #1f6f5c;
  --better-bg: #e9f3ef;
  --neutral: #6b7280;
  --neutral-bg: #eef0f2;
  --link: #1e4fa3;
  --font: "Zen Kaku Gothic New", "Hiragino Sans", "Noto Sans JP", sans-serif;
  --wrap: 1040px;
  --gutter: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 500;
  font-size: 15px;
  line-height: 1.75;
  font-feature-settings: "palt" 1, "tnum" 1;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
h1, h2, h3 { font-weight: 700; line-height: 1.35; margin: 0; letter-spacing: 0.01em; }
p { margin: 0; }
ol, ul { margin: 0; padding: 0; list-style: none; }
dl, dt, dd { margin: 0; }
small { font-size: 12px; }
b { font-weight: 700; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 6px 12px; z-index: 10; }
.skip:focus { left: 8px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- 方向マーク（角印） ---------- */
.mark {
  display: inline-block;
  min-width: 2.6em;
  padding: 0 0.35em;
  border: 1.5px solid currentColor;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.7;
  text-align: center;
  letter-spacing: 0.08em;
  vertical-align: 0.15em;
  white-space: nowrap;
}
.mark-worse { color: var(--worse); background: var(--worse-bg); }
.mark-better { color: var(--better); background: var(--better-bg); }
.mark-neutral { color: var(--neutral); background: var(--neutral-bg); }

/* ---------- ヘッダー ---------- */
.site-head { border-bottom: 1px solid var(--rule); background: var(--paper); }
.site-head-in {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 60px;
  flex-wrap: wrap;
  padding-top: 10px;
  padding-bottom: 10px;
}
.site-name { color: var(--ink); font-weight: 700; font-size: 18px; letter-spacing: 0.02em; display: inline-flex; align-items: center; gap: 8px; }
.site-mark { display: inline-block; border: 2px solid var(--worse); color: var(--worse); border-radius: 4px; font-size: 11px; line-height: 1; padding: 3px 4px; letter-spacing: 0.05em; }
.site-name:hover { text-decoration: none; }
.site-nav { display: flex; gap: 20px; font-size: 14px; }
.site-nav a { color: var(--ink-2); }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--ink); }
.site-nav a[aria-current] { box-shadow: inset 0 -2px 0 var(--ink); }
.site-tools { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.site-search { margin-left: 0; }
.site-search input {
  width: 240px;
  max-width: 100%;
  padding: 7px 12px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: #fff;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
}
.site-search input::placeholder { color: var(--ink-3); }

main.wrap { padding-top: 36px; padding-bottom: 72px; }

/* ---------- 見出し・セクション ---------- */
.sec-title { font-size: 16px; color: var(--ink); }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.sec-more { font-size: 13px; white-space: nowrap; }
section + section { margin-top: 56px; }
.page-head { margin-bottom: 24px; }
.page-title { font-size: 26px; }
.page-lead { color: var(--ink-2); margin-top: 6px; }
.crumb { font-size: 13px; color: var(--ink-3); margin-bottom: 10px; }
.crumb a { color: var(--ink-3); }
.crumb ol { display: flex; flex-wrap: wrap; gap: 4px; }
.crumb li + li::before { content: "/"; margin: 0 6px 0 2px; color: var(--rule); }
.empty { color: var(--ink-2); padding: 32px 0; }

/* ---------- トップ：導入 ---------- */
.intro { max-width: 720px; margin-bottom: 44px; }
.intro-title { font-size: 28px; line-height: 1.4; text-wrap: balance; }
/* 文節単位で折り返す（途中で切れないように） */
.nb { display: inline-block; }
.intro-lead { text-wrap: pretty; }
.intro-lead { margin-top: 14px; color: var(--ink-2); font-size: 15px; }
.intro-cta { margin-top: 18px; }

/* ---------- トップ：適用日が近い変更 ---------- */
.upcoming-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 10px 20px;
  margin-top: 14px;
}
.up a {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 12px 0;
  border-top: 1px solid var(--rule);
  color: var(--ink);
}
.up a:hover { text-decoration: none; }
.up a:hover .up-title { text-decoration: underline; text-underline-offset: 3px; }
.up-when { display: flex; flex-direction: column; align-items: flex-start; min-width: 56px; line-height: 1.2; }
.up-when b { font-size: 20px; }
.up-when small { color: var(--ink-3); margin-top: 4px; }
.up-worse .up-when b { color: var(--worse); }
.up-better .up-when b { color: var(--better); }
.up-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.up-brand { font-size: 12px; color: var(--ink-2); display: flex; gap: 8px; align-items: center; }
.up-title { font-weight: 700; line-height: 1.45; }

/* ---------- 台帳 ---------- */
.ledger { margin-top: 12px; border-top: 1px solid var(--rule); }
.row {
  display: grid;
  grid-template-columns: 84px 52px 1fr 160px;
  gap: 0 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
  align-items: start;
}
.row-date { color: var(--ink-3); font-size: 13px; padding-top: 3px; }
.row-mark { padding-top: 2px; }
.row-brand { display: inline-block; font-size: 12px; color: var(--ink-2); margin-bottom: 2px; }
.row-title { font-size: 15px; font-weight: 700; }
.row-title a { color: var(--ink); }
.row-diff { margin-top: 4px; font-size: 13px; color: var(--ink-2); line-height: 1.6; }
.row-diff .before { text-decoration: line-through; text-decoration-color: var(--ink-3); text-decoration-thickness: 1px; }
.row-diff .arrow { margin: 0 8px; color: var(--ink-3); }
.row-worse .row-diff .after { color: var(--worse); font-weight: 700; }
.row-better .row-diff .after { color: var(--better); font-weight: 700; }
.row-summary { color: var(--ink-2); }
.row-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 12px; color: var(--ink-3); text-align: right; padding-top: 3px; }
.row-eff { color: var(--ink-2); font-weight: 700; }

/* ---------- 絞り込み ---------- */
.filters { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.filter-group { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-block;
  padding: 3px 10px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-size: 13px;
  color: var(--ink-2);
  background: #fff;
}
.chip small { color: var(--ink-3); margin-left: 2px; }
.chip:hover { text-decoration: none; border-color: var(--ink-3); color: var(--ink); }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip.is-on small { color: rgba(255, 255, 255, 0.7); }
.chip-worse.is-on { background: var(--worse); border-color: var(--worse); }
.chip-better.is-on { background: var(--better); border-color: var(--better); }

/* ---------- ブランド一覧（控えめなカード） ---------- */
.brands-cat { font-size: 13px; color: var(--ink-3); margin: 22px 0 8px; font-weight: 500; }
.brand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
}
.brand {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "name name" "last stat";
  gap: 4px 10px;
  align-items: baseline;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  min-width: 0;
}
.brand:hover { text-decoration: none; border-color: var(--ink-3); }
.brand:hover .brand-name { text-decoration: underline; text-underline-offset: 3px; }
/* 1行目：ブランド名（折り返さず末尾を省略） */
.brand-name { grid-area: name; font-weight: 700; font-size: 14px; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 2行目：左に最終更新、右に件数 */
.brand-last { grid-area: last; font-size: 11px; color: var(--ink-3); }
.brand-stat { grid-area: stat; font-size: 11px; color: var(--ink-3); white-space: nowrap; text-align: right; }
.brand-stat b { font-size: 14px; color: var(--ink-2); margin-right: 1px; }
.brand-stat b.is-worse { color: var(--worse); }

/* ---------- ブランド別ページ ---------- */
.brand-kpi { display: flex; gap: 40px; margin-top: 18px; padding: 16px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.brand-kpi dt { font-size: 12px; color: var(--ink-3); }
.brand-kpi dd { font-size: 28px; font-weight: 700; line-height: 1.2; }
.brand-kpi dd small { font-size: 13px; font-weight: 500; margin-left: 3px; color: var(--ink-2); }
.brand-kpi .kpi-worse dd { color: var(--worse); }
.brand-kpi .kpi-date { font-size: 20px; padding-top: 5px; }
.tl-month + .tl-month { margin-top: 32px; }
.tl-month-title { font-size: 14px; color: var(--ink-2); }
.tl-month .ledger { margin-top: 8px; }
.brand-lead { max-width: 760px; }
.brand-lead b { color: var(--ink); }
.brand-kpi .kpi-better dd { color: var(--better); }
.brand-source { margin-top: 12px; font-size: 13px; color: var(--ink-2); }
.brand-source small { margin-left: 10px; color: var(--ink-3); }
.brand-head .notify-cta { margin-top: 20px; }
/* 方向・種別・サービス分類ページの前置きの文章 */
.tax-intro { max-width: 760px; margin: 14px 0 18px; color: var(--ink-2); font-size: 14px; line-height: 1.9; }
.tax-intro p + p { margin-top: 8px; }
.tax-intro b { color: var(--ink); }
.brand-history .timeline { margin-top: 14px; }
/* 種別の内訳（横棒。濃い赤＝うち改悪） */
.type-bars { margin-top: 12px; border-top: 1px solid var(--rule); }
.type-bars li { display: grid; grid-template-columns: 180px 1fr 120px; gap: 0 16px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--rule-2); font-size: 14px; }
.type-name { color: var(--ink); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.type-bar { display: block; height: 10px; background: var(--paper-2); border-radius: 5px; overflow: hidden; }
.type-bar-all { display: block; height: 100%; min-width: 6px; background: var(--rule); border-radius: 5px; overflow: hidden; }
.type-bar-worse { display: block; height: 100%; background: var(--worse); }
.type-count { text-align: right; color: var(--ink-2); white-space: nowrap; }
.type-count small { display: block; color: var(--worse); line-height: 1.3; }

/* ---------- 撤回・延期の告知 ---------- */
.revision { margin-top: 20px; padding: 14px 18px; border-radius: 8px; border: 1px solid var(--rule); background: var(--paper-2); }
.revision-withdrawn { border-color: var(--better); background: var(--better-bg); }
.revision-head { font-size: 13px; color: var(--ink-2); display: flex; align-items: center; gap: 10px; }
.revision-note { margin-top: 6px; font-weight: 700; }
.revision-date { margin-top: 4px; font-size: 13px; color: var(--ink-2); }
.row-revision { margin-top: 4px; font-size: 12px; color: var(--better); font-weight: 700; }

/* ---------- 記事（記録カード） ---------- */
.record { max-width: 820px; }
.record-brand { font-size: 14px; color: var(--ink-2); }
.record-service { margin-left: 10px; color: var(--ink-3); }
.record-title { font-size: 28px; line-height: 1.4; margin-top: 6px; }
.record-title .mark { font-size: 13px; margin-right: 12px; vertical-align: 0.35em; }
.record-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px 24px;
  margin-top: 26px;
  padding: 18px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.fact dt { font-size: 12px; color: var(--ink-3); }
.fact dd { font-weight: 700; margin-top: 2px; }
.fact dd small { font-weight: 500; color: var(--ink-3); margin-left: 8px; }
.fact-wide { grid-column: 1 / -1; }
.fact-wide dd { font-weight: 500; }
.record-worse .fact-eff dd { color: var(--worse); }
.record-better .fact-eff dd { color: var(--better); }

.diff {
  display: grid;
  grid-template-columns: 1fr 40px 1fr;
  gap: 0 8px;
  margin-top: 28px;
  align-items: stretch;
}
.diff-col { padding: 16px 18px; border-radius: 8px; background: var(--paper-2); }
.diff-col h2 { font-size: 12px; color: var(--ink-3); font-weight: 500; }
.diff-col p { margin-top: 6px; font-size: 16px; font-weight: 700; line-height: 1.55; }
.diff-before p { color: var(--ink-2); }
.diff-arrow { align-self: center; text-align: center; color: var(--ink-3); font-size: 22px; }
.record-worse .diff-after { background: var(--worse-bg); }
.record-worse .diff-after p { color: var(--worse); }
.record-better .diff-after { background: var(--better-bg); }
.record-better .diff-after p { color: var(--better); }

.record-summary, .record-source { margin-top: 32px; }
.record-summary h2, .record-source h2 { font-size: 13px; color: var(--ink-3); font-weight: 500; margin-bottom: 6px; }
.record-summary p { font-size: 16px; line-height: 1.8; }
.record-source small { color: var(--ink-3); }
.record-note { margin-top: 12px; font-size: 13px; color: var(--ink-2); padding: 12px 14px; background: var(--paper-2); border-radius: 6px; }
.record-related { margin-top: 48px; }
.record-columns { margin-top: 44px; }
.record-columns .post-grid { margin-top: 14px; }

/* ---------- ページ送り・フッター ---------- */
.pagination { margin-top: 28px; font-size: 14px; }
.pagination .nav-links { display: flex; gap: 6px; flex-wrap: wrap; }
.pagination .page-numbers { padding: 4px 10px; border: 1px solid var(--rule); border-radius: 6px; color: var(--ink-2); background: #fff; }
.pagination .page-numbers.current { background: var(--ink); color: #fff; border-color: var(--ink); }
.pagination .page-numbers.dots { border: 0; background: none; }
.site-foot { border-top: 1px solid var(--rule); padding: 28px 0 40px; color: var(--ink-2); font-size: 13px; }
.site-foot p + p { margin-top: 8px; }
.foot-meta { color: var(--ink-3); margin-top: 16px !important; }
.prose { max-width: 720px; }
.prose p + p { margin-top: 1em; }

/* ---------- レスポンシブ ---------- */
@media (max-width: 760px) {
  body { font-size: 14px; }
  .site-head-in { gap: 12px 20px; }
  .site-nav { order: 3; width: 100%; gap: 16px; overflow-x: auto; white-space: nowrap; padding-bottom: 2px; }
  .site-tools { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.site-search { margin-left: 0; }
  .site-search input { width: 150px; }
  .intro-title { font-size: 22px; }
  /* スマホ：1カラム。1行目＝マーク＋掲載日、2行目＝本文、3行目＝種別・適用日 */
  .row { grid-template-columns: auto 1fr; grid-template-areas: "mark date" "body body" "meta meta"; gap: 6px 10px; align-items: center; padding: 14px 0; }
  .row-mark { grid-area: mark; padding: 0; }
  .row-date { grid-area: date; padding: 0; font-size: 12px; }
  .row-body { grid-area: body; }
  .row-brand { margin-bottom: 0; }
  .row-title { font-size: 15px; }
  .row-meta { grid-area: meta; flex-direction: row; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; text-align: left; padding: 0; }
  .row-meta .row-eff { font-weight: 500; color: var(--ink-2); }
  .row-meta .row-eff::before { content: "適用 "; color: var(--ink-3); }
  .row-meta .row-eff-label { display: none; }
  .record-facts { grid-template-columns: 1fr 1fr; }
  .record-title { font-size: 22px; }
  .diff { grid-template-columns: 1fr; gap: 6px; }
  .diff-arrow { transform: rotate(90deg); }
  .brand-kpi { gap: 24px; }
  .brand-kpi dd { font-size: 22px; }
  .brand-kpi { flex-wrap: wrap; gap: 12px 24px; }
  .brand-source small { display: block; margin-left: 0; }
  .type-bars li { grid-template-columns: 1fr 88px; grid-template-areas: "name count" "bar bar"; gap: 4px 12px; }
  .type-name { grid-area: name; }
  .type-bar { grid-area: bar; }
  .type-count { grid-area: count; }
}

@media (prefers-reduced-motion: no-preference) {
  .chip, .site-search input { transition: border-color 0.15s, color 0.15s; }
}

/* ==========================================================================
   v0.2 追加：通知導線／コラム（一覧・記事・サイドバー）／記事本文の型／埋め込み
   ========================================================================== */

/* ---------- メール通知の導線・登録フォーム ---------- */
.notify-btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 0; border-radius: 6px; background: var(--ink); color: #fff; font: inherit; font-weight: 700; font-size: 13px; white-space: nowrap; cursor: pointer; }
.notify-btn:hover { text-decoration: none; background: #000; color: #fff; }
.notify-btn-mark { display: inline-block; background: var(--worse); color: #fff; font-size: 11px; padding: 1px 5px; border-radius: 3px; line-height: 1.3; }
.notify-cta { margin-top: 40px; padding: 22px 24px; border: 1px solid var(--rule); border-left: 4px solid var(--worse); border-radius: 10px; background: #fff; }
.notify-cta-title { font-size: 17px; font-weight: 700; line-height: 1.45; }
.notify-cta-lead { margin-top: 8px; font-size: 13px; color: var(--ink-2); }
.notify-cta .notify-btn { margin-top: 14px; padding: 11px 18px; font-size: 14px; }
.notify-cta-note { margin-top: 10px; font-size: 12px; color: var(--ink-3); }
.notify-cta-side { margin-top: 0; padding: 18px; }
.notify-cta-side .notify-cta-title { font-size: 15px; }
.notify-cta-brand { margin-top: 32px; }
.kw-sub-wrap { margin: 1.5em 0; }
.kw-sub-msg { padding: 12px 16px; border-radius: 6px; font-weight: 700; }
.kw-sub-msg-ok { background: var(--better-bg); color: var(--better); }
.kw-sub-msg-error { background: var(--worse-bg); color: var(--worse); }
.kw-sub { margin-top: 16px; }
.kw-sub-email label, .kw-sub-label { display: block; font-weight: 700; margin-bottom: 6px; }
.kw-sub-email input { width: 100%; max-width: 420px; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 6px; font: inherit; background: #fff; }
.kw-sub-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.kw-sub-label { margin-top: 20px; }
.kw-sub-group { margin: 0 0 12px; padding: 12px 14px; border: 1px solid var(--rule-2); border-radius: 8px; background: #fff; }
.kw-sub-group legend { padding: 0 6px; font-size: 13px; color: var(--ink-2); font-weight: 700; }
.kw-sub-brands { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px 16px; }
.kw-sub-brands label, .kw-sub-digest label { cursor: pointer; font-size: 14px; }
.kw-sub-digest small { margin-left: 6px; color: var(--ink-3); }
.kw-sub-submit { margin-top: 16px; }
.kw-sub-submit .notify-btn { padding: 12px 22px; font-size: 15px; }
.kw-sub-note { margin-top: 12px; font-size: 12px; color: var(--ink-3); }
.kw-sub-unsub, .kw-sub-delete { margin-top: 20px; }
.notify-btn-sub { padding: 9px 16px; border: 1px solid var(--rule); border-radius: 6px; background: #fff; color: var(--ink-2); font: inherit; font-size: 13px; cursor: pointer; }
.notify-btn-link { padding: 0; border: 0; background: none; color: var(--ink-3); font: inherit; font-size: 12px; text-decoration: underline; cursor: pointer; }
.kw-sub-after { margin-top: 12px; font-size: 13px; }

/* ---------- 2カラム（コンテンツ＋サイドバー） ---------- */
.layout-side { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; }
.layout-narrow, .layout-wide { display: block; }
.layout-narrow .content { max-width: 760px; margin: 0 auto; }
.layout-wide .content { max-width: none; }
.content { min-width: 0; }
.side { position: sticky; top: 20px; }
.widget + .widget { margin-top: 28px; }
.widget-title { font-size: 14px; color: var(--ink); padding-bottom: 8px; border-bottom: 1px solid var(--rule); margin-bottom: 10px; }
.side-posts li, .side-changes li, .side-brands li, .side-archive li { border-bottom: 1px solid var(--rule-2); }
.side-posts a, .side-changes a, .side-brands a { display: flex; gap: 10px; padding: 9px 0; color: var(--ink); align-items: flex-start; }
.side-posts a:hover .side-title, .side-changes a:hover .side-title { text-decoration: underline; text-underline-offset: 3px; }
.side-posts a:hover, .side-changes a:hover, .side-brands a:hover { text-decoration: none; }
.side-thumb img { width: 64px; height: 64px; object-fit: cover; border-radius: 4px; display: block; }
.side-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.side-title { font-size: 13px; font-weight: 700; line-height: 1.45; }
.side-body time, .side-brand { font-size: 11px; color: var(--ink-3); }
.side-changes .mark { flex: none; margin-top: 1px; }
.side-brands a { justify-content: space-between; align-items: center; font-size: 13px; }
.side-brands b { font-size: 15px; color: var(--ink-2); }
.side-brands b small { font-size: 10px; margin-left: 2px; font-weight: 500; color: var(--ink-3); }
.side-brands b.is-worse { color: var(--worse); }
.side-archive li { display: flex; justify-content: space-between; padding: 7px 0; font-size: 13px; }
.side-archive li a { color: var(--ink); }
.side-archive span { color: var(--ink-3); }
.side-more { margin-top: 10px; font-size: 13px; }

/* ---------- コラム一覧 ---------- */
.blog-tools { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.blog-search input { width: 100%; max-width: 420px; padding: 9px 12px; border: 1px solid var(--rule); border-radius: 6px; background: #fff; font: inherit; font-size: 14px; }
.chip-cat small { font-weight: 500; }
.blog-result { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--ink-3); }
.blog-result .chip { font-size: 12px; }
.post-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 24px; margin-top: 8px; }
.post-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.post-grid[aria-busy="true"] { opacity: 0.5; pointer-events: none; }
.post-card-link { display: block; color: var(--ink); }
.post-card-link:hover { text-decoration: none; }
.post-card-link:hover .post-card-title { text-decoration: underline; text-underline-offset: 3px; }
.post-card-thumb { aspect-ratio: 16 / 9; overflow: hidden; border-radius: 8px; border: 1px solid var(--rule-2); background: var(--paper-2); }
.post-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card-noimg { width: 100%; height: 100%; display: grid; place-items: center; }
.post-card-noimg span { border: 2px solid var(--rule); color: var(--ink-3); border-radius: 6px; padding: 6px 10px; font-weight: 700; letter-spacing: 0.1em; }
.post-card-body { padding: 10px 2px 0; }
.post-card-meta { display: flex; gap: 10px; align-items: center; font-size: 12px; color: var(--ink-3); }
.post-card-cat { color: var(--ink-2); border: 1px solid var(--rule); border-radius: 999px; padding: 1px 8px; }
.post-card-title { font-size: 16px; line-height: 1.45; margin-top: 6px; }
.post-card-excerpt { margin-top: 6px; font-size: 13px; color: var(--ink-2); line-height: 1.6; }
.search-sec + .search-sec { margin-top: 48px; }

/* ---------- 記事 ---------- */
.article-head { margin-top: 6px; }
.article-head-hero { position: relative; border-radius: 10px; overflow: hidden; background-size: cover; background-position: center; color: #fff; min-height: 300px; display: flex; align-items: flex-end; }
.article-head-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0.05) 30%, rgba(0,0,0,0.65)); }
.article-head-hero .article-head-in { position: relative; padding: 28px; }
.article-head-hero .article-title, .article-head-hero .article-meta, .article-head-hero .article-cats a { color: #fff; }
.article-head-hero .article-cats a { border-color: rgba(255,255,255,0.6); }
.article-cats { display: flex; gap: 6px; flex-wrap: wrap; }
.article-cats a { font-size: 12px; color: var(--ink-2); border: 1px solid var(--rule); border-radius: 999px; padding: 1px 10px; }
.article-title { font-size: 28px; line-height: 1.4; margin-top: 10px; }
.article-meta { margin-top: 10px; font-size: 13px; color: var(--ink-3); display: flex; gap: 14px; }
.article-eyecatch { margin: 22px 0 0; }
.article-eyecatch img { width: 100%; height: auto; border-radius: 10px; display: block; }
.article-body { margin-top: 28px; }
.article-tags { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; }
.article-tags a { color: var(--ink-2); }
.share { display: flex; align-items: center; gap: 8px; margin-top: 20px; font-size: 13px; color: var(--ink-3); flex-wrap: wrap; }
.share a { padding: 5px 12px; border: 1px solid var(--rule); border-radius: 6px; color: var(--ink-2); background: #fff; }
.share a:hover { text-decoration: none; border-color: var(--ink-3); color: var(--ink); }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--rule); }
.post-nav a { color: var(--ink); font-weight: 700; font-size: 14px; line-height: 1.45; }
.post-nav a small { display: block; font-weight: 500; color: var(--ink-3); margin-bottom: 4px; }
.post-nav-next { text-align: right; }
.related { margin-top: 48px; }
.related .post-grid { margin-top: 14px; }

/* ---------- 記事本文の型（prose） ---------- */
.prose { font-size: 16px; line-height: 1.95; color: var(--ink); }
.prose > * + * { margin-top: 1.4em; }
.prose h2 { font-size: 22px; line-height: 1.45; margin-top: 2.4em; padding: 0 0 10px; border-bottom: 2px solid var(--ink); }
.prose h3:not(.row-title) { font-size: 18px; margin-top: 2em; padding-left: 12px; border-left: 4px solid var(--worse); }
.prose h4 { font-size: 16px; margin-top: 1.6em; }
.prose ul:not(.ledger), .prose ol:not(.ledger) { padding-left: 1.5em; }
.prose ul:not(.ledger) { list-style: disc; }
.prose ol:not(.ledger) { list-style: decimal; }
.prose li + li { margin-top: 0.4em; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose img { max-width: 100%; height: auto; border-radius: 8px; }
.prose figure { margin: 1.6em 0; }
.prose figcaption { font-size: 13px; color: var(--ink-3); text-align: center; margin-top: 6px; }
.prose blockquote { margin: 1.6em 0; padding: 14px 18px; border-left: 4px solid var(--rule); background: var(--paper-2); color: var(--ink-2); border-radius: 0 8px 8px 0; }
.prose blockquote p { margin: 0; }
.prose .b { font-weight: 700; }
.prose .b.blue { color: var(--better); background: linear-gradient(transparent 60%, var(--better-bg) 60%); }
.prose .b.orange { color: var(--worse); background: linear-gradient(transparent 60%, var(--worse-bg) 60%); }
.prose table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.6; }
.prose th, .prose td { padding: 10px 12px; border: 1px solid var(--rule); text-align: left; vertical-align: top; }
.prose th { background: var(--paper-2); font-weight: 700; white-space: nowrap; }
.prose .wp-table-responsive { margin: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; position: relative; border-radius: 8px; }
.prose .wp-table-responsive table { margin: 0; min-width: 560px; }
.prose .wp-table-responsive.can-scroll:not(.at-end) { box-shadow: inset -24px 0 20px -20px rgba(0,0,0,0.25); }
.prose .wp-table-responsive.can-scroll:not(.at-start) { box-shadow: inset 24px 0 20px -20px rgba(0,0,0,0.25); }
.prose .wp-table-responsive.can-scroll:not(.at-start):not(.at-end) { box-shadow: inset 24px 0 20px -20px rgba(0,0,0,0.25), inset -24px 0 20px -20px rgba(0,0,0,0.25); }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2.4em 0; }
.prose .kw-embed { margin: 1.8em 0; }
.prose .kw-embed .ledger { margin-top: 0; font-size: 14px; list-style: none; padding: 0; }
.prose .kw-embed .ledger > * + * { margin-top: 0; }
/* 記事幅では台帳を1カラム配置（マーク＋掲載日／本文／種別・適用日） */
.kw-embed .row { grid-template-columns: auto 1fr; grid-template-areas: "mark date" "body body" "meta meta"; gap: 6px 10px; align-items: center; }
.kw-embed .row-mark { grid-area: mark; padding: 0; }
.kw-embed .row-date { grid-area: date; padding: 0; }
.kw-embed .row-body { grid-area: body; }
.kw-embed .row-meta { grid-area: meta; flex-direction: row; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; text-align: left; padding: 0; }
.kw-embed .row-title { font-size: 15px; margin: 0; padding: 0; border: 0; }
.kw-embed .row-diff { margin-top: 4px; }
.prose .kw-embed .row-title a { text-decoration: none; }
.kw-embed-title { font-size: 13px; color: var(--ink-3); margin-bottom: 6px; }
.kw-embed-more { margin-top: 10px; font-size: 13px; }
.prose .brand-kpi-embed { margin: 1.6em 0; flex-wrap: wrap; }
.brand-kpi .kpi-link { align-self: center; margin-left: auto; font-size: 13px; }

/* ---------- 記事内のメール通知導線 ---------- */
.notify-cta-article { margin-top: 44px; }
.notify-cta-embed { margin: 2em 0; }

/* ---------- フッター（2カラム） ---------- */
.foot-in { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 40px; }
.foot-name { font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.foot-nav { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.foot-nav a { color: var(--ink-2); }

/* ---------- トップ：コラム ---------- */
.home-posts .post-grid { margin-top: 14px; }

@media (max-width: 960px) {
  .layout-side { grid-template-columns: 1fr; }
  .side { position: static; margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--rule); }
  .post-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .site-tools { width: 100%; order: 4; justify-content: space-between; }
  .site-search input { width: 100%; }
  .notify-btn-head { font-size: 12px; padding: 7px 10px; }
  .post-grid, .post-grid-3 { grid-template-columns: 1fr; gap: 24px; }
  .notify-cta { padding: 18px; }
  .article-title { font-size: 22px; }
  .prose { font-size: 15px; }
  .prose h2 { font-size: 19px; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav-next { text-align: left; }
  .foot-in { grid-template-columns: 1fr; gap: 20px; }
  .foot-nav { flex-direction: row; flex-wrap: wrap; gap: 8px 16px; }
}

/* ---------- 影響額シミュレーター ---------- */
.kw-calc { margin: 1.8em 0; padding: 18px 20px; border: 1px solid var(--rule); border-radius: 10px; background: #fff; }
.kw-calc-title { font-weight: 700; font-size: 15px; }
.kw-calc-input { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; font-size: 14px; }
.kw-calc-field { display: inline-flex; align-items: center; gap: 6px; }
.kw-calc-field input { width: 140px; padding: 8px 10px; border: 1px solid var(--rule); border-radius: 6px; font: inherit; font-size: 16px; text-align: right; font-feature-settings: "tnum" 1; }
.kw-calc-field em { font-style: normal; color: var(--ink-2); }
.kw-calc-out { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.kw-calc-out > div { padding: 10px 12px; border-radius: 8px; background: var(--paper-2); }
.kw-calc-out small { display: block; font-size: 11px; color: var(--ink-3); }
.kw-calc-out b { display: block; font-size: 20px; margin-top: 2px; font-feature-settings: "tnum" 1; }
.kw-calc-out em { display: block; font-style: normal; font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.kw-calc-diff b.is-worse { color: var(--worse); }
.kw-calc-diff b.is-better { color: var(--better); }
.kw-calc-note { margin-top: 10px; font-size: 12px; color: var(--ink-3); }
@media (max-width: 760px) { .kw-calc-out { grid-template-columns: 1fr; } .kw-calc-input { flex-direction: column; align-items: flex-start; } }

/* 解説記事（ブランドページ・分類ページ） */
.brand-articles { margin-top: 36px; }
.term-articles { margin-top: 18px; padding: 14px 16px; border: 1px solid var(--rule); border-radius: 10px; background: #fff; }
.term-articles .sec-title { font-size: 14px; }
.article-mini { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; }
.article-mini a { display: flex; gap: 10px; align-items: flex-start; color: var(--ink); text-decoration: none; }
.article-mini a:hover .article-mini-title { text-decoration: underline; }
.article-mini img, .article-mini-noimg { flex: 0 0 96px; width: 96px; height: 54px; object-fit: cover; border-radius: 4px; background: var(--paper-2); }
.article-mini-noimg { display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--ink-3); }
.article-mini-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.article-mini-title { font-size: 13.5px; font-weight: 700; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.article-mini time { font-size: 12px; color: var(--ink-3); }
@media (max-width: 860px) { .article-mini { grid-template-columns: 1fr; } }

/* ---------- 今後適用される変更（/upcoming/） ---------- */
.upx-tabs { margin: 4px 0 8px; }
.upx-tabs .chip { cursor: pointer; }
#upx-f-worse:disabled ~ .upx-tabs .chip-worse, #upx-f-better:disabled ~ .upx-tabs .chip-better, #upx-f-neutral:disabled ~ .upx-tabs .chip-neutral { opacity: 0.45; cursor: default; }
#upx-f-worse:checked ~ .upx-tabs .chip-worse { background: var(--worse); border-color: var(--worse); color: #fff; }
#upx-f-better:checked ~ .upx-tabs .chip-better { background: var(--better); border-color: var(--better); color: #fff; }
#upx-f-neutral:checked ~ .upx-tabs .chip-neutral { background: var(--neutral); border-color: var(--neutral); color: #fff; }
#upx-f-all:checked ~ .upx-tabs .chip-all { background: var(--ink); border-color: var(--ink); color: #fff; }
#upx-f-worse:checked ~ .upx-tabs .chip-worse small, #upx-f-better:checked ~ .upx-tabs .chip-better small, #upx-f-neutral:checked ~ .upx-tabs .chip-neutral small, #upx-f-all:checked ~ .upx-tabs .chip-all small { color: rgba(255, 255, 255, 0.75); }
#upx-f-worse:focus-visible ~ .upx-tabs .chip-worse, #upx-f-better:focus-visible ~ .upx-tabs .chip-better, #upx-f-neutral:focus-visible ~ .upx-tabs .chip-neutral, #upx-f-all:focus-visible ~ .upx-tabs .chip-all { outline: 2px solid var(--link); outline-offset: 2px; }
/* 選んだ方向以外の行と、該当行が無い月を隠す（JS なしで動く） */
#upx-f-worse:checked ~ .upx-list .upx-row:not(.row-worse),
#upx-f-better:checked ~ .upx-list .upx-row:not(.row-better),
#upx-f-neutral:checked ~ .upx-list .upx-row:not(.row-neutral),
#upx-f-worse:checked ~ .upx-list .upx-month:not(.has-worse),
#upx-f-better:checked ~ .upx-list .upx-month:not(.has-better),
#upx-f-neutral:checked ~ .upx-list .upx-month:not(.has-neutral) { display: none; }
.upx-month { margin-top: 28px; }
section.upx-month + section.upx-month { margin-top: 28px; }
.upx-month-title { font-size: 18px; display: flex; align-items: baseline; gap: 10px; }
.upx-month-title small { font-size: 12px; font-weight: 500; color: var(--ink-3); }
.upx-date b { font-size: 16px; color: var(--ink); }
.upx-date small { font-size: 11px; }
.row-worse .upx-date b { color: var(--worse); }
.upx-more { font-size: 12px; }
.upx-note { max-width: 760px; margin-top: 48px; }
.upx-note p { margin-top: 8px; color: var(--ink-2); font-size: 13px; line-height: 1.9; }
@media (max-width: 760px) {
  .upx-row .row-meta .row-eff::before { content: none; }
}

/* 記事から /upcoming/ への案内 */
.upcoming-cta { margin: 28px 0 0; padding: 14px 16px; border: 1px solid var(--rule); border-left: 4px solid var(--worse); border-radius: 6px; background: #fff; }
.upcoming-cta-title { font-weight: 700; }
.upcoming-cta-lead { margin-top: 4px; font-size: 13px; color: var(--ink-2); }
.page-lead-link { display: inline-block; margin-left: 6px; }

/* ---------- 記事末尾：運営者紹介 ---------- */
.author-box { margin-top: 36px; padding: 18px 20px; border: 1px solid var(--rule); border-radius: 10px; background: #fff; font-size: 14px; }
.author-box-label { font-size: 12px; color: var(--ink-3); }
.author-box-name { margin-top: 2px; font-size: 16px; font-weight: 700; }
.author-box-name small { margin-left: 4px; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.author-box-policy { margin-top: 8px; color: var(--ink-2); line-height: 1.8; }
.author-box-dates { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; font-size: 12.5px; color: var(--ink-3); }
.author-box-dates div { display: flex; gap: 6px; }
.author-box-more { margin-top: 8px; font-size: 13px; }

/* ---------- ブランドページ：監視開始前の主な改悪 ---------- */
.brand-past { margin-top: 44px; }
.brand-past-body { margin-top: 10px; font-size: 14.5px; }
.brand-past-note { margin-top: 10px; font-size: 12px; color: var(--ink-3); }

/* 記事冒頭の短いメール導線 */
.notify-inline { margin: 14px 0 6px; padding: 10px 14px; border-left: 3px solid #9a1f2e; background: #faf5f5; font-size: .93em; }
.notify-inline-mark { margin-right: .4em; }
.notify-inline a { font-weight: 700; text-decoration: underline; }
/* 運営者メモ（影響と対処） */
.record-note-editor { margin: 24px 0; padding: 16px 18px; border: 1px solid #e3dcdc; border-radius: 8px; background: #fffdf8; }
.record-note-editor h2 { font-size: 1.05em; margin: 0 0 8px; }
