/* コラム記事の冒頭に置く、記事ごとの動く図解(blog/visuals.py の内容から生成) */
.cv-wrap { padding: 0 var(--pad) clamp(16px, 3vw, 40px); }
.cv { position: relative; max-width: 980px; margin: 0 auto; min-height: 280px; border-radius: 24px; padding: 56px clamp(20px, 4vw, 48px) 32px; background: linear-gradient(120deg, #E6F0F8, #EEF5EA); overflow: hidden; display: flex; align-items: center; justify-content: center; color: var(--ink); }
.cv::before { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; border: 2px dashed rgba(31,111,178,.18); animation: cvSpin 40s linear infinite; }
.cv::after { content: ""; position: absolute; left: -40px; bottom: -70px; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, rgba(126,174,98,.22), transparent 70%); }
@keyframes cvSpin { to { transform: rotate(360deg); } }
.cv__tag { position: absolute; left: 24px; top: 20px; z-index: 1; display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--blue); }
.cv__tag::before { content: ""; width: 22px; height: 2px; background: linear-gradient(90deg, var(--sky), var(--leaf)); }
.cv__stage { position: relative; z-index: 1; width: 100%; }
.cv b, .cv strong { font-weight: 700; }

/* 流れ */
.cv-flow { display: flex; align-items: flex-start; justify-content: center; gap: 0; list-style: none; padding: 0; margin: 0; counter-reset: cvf; }
.cv-flow li { position: relative; flex: 1 1 0; max-width: 200px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.cv-flow li + li::before { content: ""; position: absolute; top: 30px; right: 50%; width: 100%; height: 3px; margin-right: 34px; background: var(--pale); }
.cv-flow li + li::after { content: ""; position: absolute; top: 30px; right: 50%; width: calc(100% - 68px); height: 3px; margin-right: 34px; background: linear-gradient(90deg, var(--sky), var(--leaf)); transform-origin: left; animation: cvLine 7s var(--ease) infinite; }
.cv-flow i { position: relative; z-index: 1; width: 62px; height: 62px; border-radius: 18px; background: var(--white); border: 2px solid var(--line); display: grid; place-items: center; font: 800 18px var(--en); font-style: normal; color: var(--mute); counter-increment: cvf; animation: cvNode 7s var(--ease) infinite; }
.cv-flow i::before { content: counter(cvf, decimal-leading-zero); }
.cv-flow span { font-size: clamp(13px, 1.4vw, 16px); font-weight: 700; line-height: 1.45; animation: cvTxt 7s infinite; }
.cv-flow li:nth-child(2) i, .cv-flow li:nth-child(2) span, .cv-flow li:nth-child(2)::after { animation-delay: 1.1s; }
.cv-flow li:nth-child(3) i, .cv-flow li:nth-child(3) span, .cv-flow li:nth-child(3)::after { animation-delay: 2.2s; }
.cv-flow li:nth-child(4) i, .cv-flow li:nth-child(4) span, .cv-flow li:nth-child(4)::after { animation-delay: 3.3s; }
@keyframes cvNode { 0%, 6% { background: var(--white); color: var(--mute); border-color: var(--line); transform: scale(1); } 12% { transform: scale(1.12); } 16%, 70% { background: var(--ink); color: var(--white); border-color: var(--ink); transform: scale(1); } 80%, 100% { background: var(--white); color: var(--mute); border-color: var(--line); } }
@keyframes cvTxt { 0%, 6% { opacity: .45; } 16%, 70% { opacity: 1; } 80%, 100% { opacity: .45; } }
@keyframes cvLine { 0%, 2% { transform: scaleX(0); } 12%, 70% { transform: scaleX(1); } 80%, 100% { transform: scaleX(0); } }

/* 会話 */
.cv-chat { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.cv-chat p { max-width: 86%; padding: 12px 16px; border-radius: 16px; font-size: clamp(13px, 1.4vw, 15px); line-height: 1.7; box-shadow: 0 6px 16px rgba(10,38,66,.07); }
.cv-chat p b { display: block; font-size: 11px; margin-bottom: 2px; }
.cv-chat .q { align-self: flex-end; background: var(--ink); color: var(--white); border-bottom-right-radius: 4px; animation: cvQ 8s infinite both; }
.cv-chat .q b { color: var(--pale); }
.cv-chat .a { align-self: flex-start; background: var(--white); border-bottom-left-radius: 4px; animation: cvA 8s infinite both; }
.cv-chat .a b { color: #4E7F37; }
.cv-chat .t { display: flex; gap: 5px; padding: 6px 16px; animation: cvT 8s infinite both; }
.cv-chat .t i { width: 8px; height: 8px; border-radius: 50%; background: var(--mute); animation: cvDot 1s infinite; }
.cv-chat .t i:nth-child(2) { animation-delay: .15s; } .cv-chat .t i:nth-child(3) { animation-delay: .3s; }
@keyframes cvDot { 0%, 60%, 100% { transform: none; opacity: .4; } 30% { transform: translateY(-4px); opacity: 1; } }
@keyframes cvQ { 0% { opacity: 0; transform: translateY(10px); } 6%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes cvT { 0%, 12% { opacity: 0; height: 0; padding: 0 16px; } 16%, 36% { opacity: 1; height: 20px; padding: 6px 16px; } 40%, 100% { opacity: 0; height: 0; padding: 0 16px; } }
@keyframes cvA { 0%, 38% { opacity: 0; transform: translateY(10px); } 46%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; } }

/* 比較(棒グラフ) */
.cv-bars { max-width: 640px; margin: 0 auto; display: grid; gap: 18px; }
.cv-bars p { display: grid; grid-template-columns: 7em minmax(0, 1fr) 5.5em; align-items: center; gap: 14px; font-size: 14px; font-weight: 700; }
.cv-bars s { text-decoration: none; display: block; height: 22px; border-radius: 99px; background: var(--pale); }
.cv-bars .b s { background: linear-gradient(90deg, var(--blue), var(--sky), var(--leaf)); transform-origin: left; animation: cvBar 6s var(--ease) infinite; }
.cv-bars em { font: 800 18px var(--en); font-style: normal; text-align: right; }
.cv-bars .b em { color: var(--blue); animation: cvNum 6s infinite; }
.cv-bars small { grid-column: 1 / -1; font-size: 11px; color: var(--mute); font-weight: 500; }
@keyframes cvBar { 0%, 15% { transform: scaleX(1); } 45%, 88% { transform: scaleX(var(--to, .4)); } 100% { transform: scaleX(1); } }
@keyframes cvNum { 0%, 32% { opacity: 0; } 45%, 88% { opacity: 1; } 100% { opacity: 0; } }

/* チェックリスト */
.cv-check { max-width: 560px; margin: 0 auto; list-style: none; padding: 0; display: grid; gap: 12px; }
.cv-check li { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 14px; background: rgba(255,255,255,.75); font-size: clamp(13px, 1.4vw, 15px); font-weight: 700; animation: cvRow 8s infinite; }
.cv-check li::before { content: "✓"; flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; border: 2px solid var(--line); background: var(--white); color: transparent; animation: cvTick 8s infinite; }
.cv-check li:nth-child(2), .cv-check li:nth-child(2)::before { animation-delay: .9s; }
.cv-check li:nth-child(3), .cv-check li:nth-child(3)::before { animation-delay: 1.8s; }
.cv-check li:nth-child(4), .cv-check li:nth-child(4)::before { animation-delay: 2.7s; }
@keyframes cvTick { 0%, 8% { color: transparent; background: var(--white); border-color: var(--line); } 14%, 80% { color: #fff; background: var(--leaf); border-color: var(--leaf); } 90%, 100% { color: transparent; background: var(--white); border-color: var(--line); } }
@keyframes cvRow { 0%, 8% { box-shadow: none; } 14%, 80% { box-shadow: 0 6px 16px rgba(10,38,66,.07); background: var(--white); } 90%, 100% { box-shadow: none; } }

/* 文書化(メモ → 書類) */
.cv-doc { display: grid; grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1.2fr); align-items: center; gap: 12px; max-width: 700px; margin: 0 auto; }
.cv-doc .memo, .cv-doc .paper { border-radius: 14px; padding: 16px 18px; min-height: 170px; }
.cv-doc .memo { background: #FFF8DC; transform: rotate(-2deg); box-shadow: 0 6px 16px rgba(10,38,66,.08); }
.cv-doc .memo b, .cv-doc .paper b { display: block; font-size: 13px; margin-bottom: 12px; }
.cv-doc .memo i { display: block; height: 7px; margin: 10px 0; border-radius: 4px; background: rgba(10,38,66,.18); }
.cv-doc .memo i:nth-of-type(1) { width: 80%; transform: rotate(-1deg); } .cv-doc .memo i:nth-of-type(2) { width: 55%; transform: rotate(1.5deg); } .cv-doc .memo i:nth-of-type(3) { width: 70%; } .cv-doc .memo i:nth-of-type(4) { width: 40%; transform: rotate(-2deg); }
.cv-doc .arrow { height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--sky), var(--leaf)); position: relative; transform-origin: left; animation: cvLine 7s var(--ease) infinite; }
.cv-doc .arrow::after { content: ""; position: absolute; right: -2px; top: -6px; border: 8px solid transparent; border-left-color: var(--leaf); border-right: 0; }
.cv-doc .paper { background: var(--white); box-shadow: 0 10px 28px rgba(10,38,66,.10); }
.cv-doc .paper b { color: var(--blue); }
.cv-doc .paper span { display: flex; align-items: center; gap: 8px; margin: 9px 0; font-size: 12px; font-weight: 700; color: var(--ink-2); opacity: 0; animation: cvLineIn 7s infinite; }
.cv-doc .paper span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--leaf); flex-shrink: 0; }
.cv-doc .paper span:nth-of-type(2) { animation-delay: .5s; } .cv-doc .paper span:nth-of-type(3) { animation-delay: 1s; } .cv-doc .paper span:nth-of-type(4) { animation-delay: 1.5s; }
@keyframes cvLineIn { 0%, 18% { opacity: 0; transform: translateX(-8px); } 26%, 82% { opacity: 1; transform: none; } 92%, 100% { opacity: 0; } }

/* 仕分け */
.cv-sort { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; max-width: 700px; margin: 0 auto; }
.cv-sort > div { border-radius: 16px; padding: 14px 16px; min-height: 180px; background: rgba(255,255,255,.7); }
.cv-sort h4 { margin: 0 0 10px; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.cv-sort h4::before { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; color: #fff; }
.cv-sort .ok h4::before { content: "✓"; background: var(--leaf); }
.cv-sort .ng h4::before { content: "✕"; background: #C25B5B; }
.cv-sort span { display: block; margin: 7px 0; padding: 8px 12px; border-radius: 10px; font-size: 13px; font-weight: 700; background: var(--white); box-shadow: 0 4px 12px rgba(10,38,66,.06); opacity: 0; animation: cvSortIn 8s infinite; }
.cv-sort .ng span { color: #8A3F3F; animation-name: cvSortNg; }
.cv-sort .ok span:nth-of-type(1) { animation-delay: 0s; } .cv-sort .ng span:nth-of-type(1) { animation-delay: .6s; }
.cv-sort .ok span:nth-of-type(2) { animation-delay: 1.2s; } .cv-sort .ng span:nth-of-type(2) { animation-delay: 1.8s; }
.cv-sort .ok span:nth-of-type(3) { animation-delay: 2.4s; } .cv-sort .ng span:nth-of-type(3) { animation-delay: 3s; }
@keyframes cvSortIn { 0% { opacity: 0; transform: translateX(40px); } 8%, 86% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; } }
@keyframes cvSortNg { 0% { opacity: 0; transform: translateX(-40px); } 8%, 86% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; } }

/* 工程 */
.cv-steps { max-width: 760px; margin: 0 auto; }
.cv-steps .track { position: relative; height: 40px; margin: 0 6%; }
.cv-steps .track::before { content: ""; position: absolute; left: 0; right: 0; top: 18px; height: 4px; border-radius: 2px; background: var(--pale); }
.cv-steps .track s { text-decoration: none; position: absolute; left: 0; right: 0; top: 18px; height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--sky), var(--leaf)); transform-origin: left; animation: cvFill 7s var(--ease) infinite; }
.cv-steps .track u { position: absolute; top: 8px; left: 0; width: 24px; height: 24px; margin-left: -12px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 6px rgba(31,111,178,.18); animation: cvRun 7s var(--ease) infinite; }
.cv-steps ol { list-style: none; padding: 0; margin: 14px 0 0; display: flex; justify-content: space-between; gap: 8px; }
.cv-steps li { flex: 1 1 0; text-align: center; font-size: clamp(12px, 1.3vw, 14px); font-weight: 700; padding: 10px 6px; border-radius: 12px; background: rgba(255,255,255,.7); animation: cvStep 7s infinite; }
.cv-steps li:nth-child(2) { animation-delay: 1.2s; } .cv-steps li:nth-child(3) { animation-delay: 2.4s; } .cv-steps li:nth-child(4) { animation-delay: 3.6s; } .cv-steps li:nth-child(5) { animation-delay: 4.8s; }
@keyframes cvRun { 0% { left: 0; } 80%, 92% { left: 100%; } 100% { left: 100%; opacity: 0; } }
@keyframes cvFill { 0% { transform: scaleX(0); } 80%, 92% { transform: scaleX(1); } 100% { transform: scaleX(1); opacity: 0; } }
@keyframes cvStep { 0%, 4% { background: rgba(255,255,255,.7); color: var(--ink); } 10%, 70% { background: var(--ink); color: var(--white); } 80%, 100% { background: rgba(255,255,255,.7); color: var(--ink); } }

/* 検索 */
.cv-search { max-width: 600px; margin: 0 auto; display: grid; gap: 14px; }
.cv-search .box { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-radius: 999px; background: var(--white); box-shadow: 0 6px 16px rgba(10,38,66,.08); font-size: clamp(13px, 1.4vw, 15px); font-weight: 700; }
.cv-search .box::before { content: ""; width: 14px; height: 14px; border: 2.5px solid var(--blue); border-radius: 50%; flex-shrink: 0; box-shadow: 4px 4px 0 -1px transparent; }
.cv-search .box span { display: inline-block; overflow: hidden; white-space: nowrap; max-width: 0; vertical-align: bottom; border-right: 2px solid var(--blue); animation: cvType 8s steps(24, end) infinite; }
.cv-search .hit { padding: 16px 18px; border-radius: 16px; background: var(--white); border-left: 4px solid var(--leaf); box-shadow: 0 8px 22px rgba(10,38,66,.08); animation: cvHit 8s infinite both; }
.cv-search .hit b { display: block; font-size: 14px; color: var(--blue); }
.cv-search .hit small { display: block; margin-top: 4px; font-size: 12px; color: var(--ink-2); }
@keyframes cvType { 0% { max-width: 0; } 30%, 90% { max-width: 100%; } 100% { max-width: 0; } }
@keyframes cvHit { 0%, 34% { opacity: 0; transform: translateY(12px); } 44%, 90% { opacity: 1; transform: none; } 100% { opacity: 0; } }

/* カード */
.cv-cards { display: flex; justify-content: center; gap: clamp(10px, 2vw, 18px); flex-wrap: wrap; }
.cv-cards div { flex: 1 1 150px; max-width: 220px; padding: 18px 16px; border-radius: 18px; background: var(--white); box-shadow: 0 8px 22px rgba(10,38,66,.08); text-align: center; animation: cvCard 8s infinite both; }
.cv-cards div:nth-child(2) { animation-delay: .5s; } .cv-cards div:nth-child(3) { animation-delay: 1s; } .cv-cards div:nth-child(4) { animation-delay: 1.5s; }
.cv-cards i { display: grid; place-items: center; width: 46px; height: 46px; margin: 0 auto 10px; border-radius: 14px; background: linear-gradient(135deg, var(--blue), var(--sky)); color: #fff; font: 800 16px var(--en); font-style: normal; }
.cv-cards div:nth-child(2) i { background: linear-gradient(135deg, var(--sky), var(--leaf)); } .cv-cards div:nth-child(3) i { background: linear-gradient(135deg, var(--leaf), #9ED0C0); } .cv-cards div:nth-child(4) i { background: linear-gradient(135deg, var(--ink), var(--blue)); }
.cv-cards b { display: block; font-size: 15px; }
.cv-cards small { display: block; margin-top: 6px; font-size: 12px; line-height: 1.6; color: var(--ink-2); }
@keyframes cvCard { 0% { opacity: 0; transform: translateY(18px) scale(.96); } 8%, 88% { opacity: 1; transform: none; } 98%, 100% { opacity: 0; } }

/* 見比べ */
.cv-vs { display: grid; grid-template-columns: minmax(0, 1fr) 54px minmax(0, 1fr); align-items: stretch; gap: 10px; max-width: 720px; margin: 0 auto; }
.cv-vs > div { padding: 16px 18px; border-radius: 18px; background: var(--white); box-shadow: 0 8px 22px rgba(10,38,66,.08); }
.cv-vs > div:first-child { animation: cvVsL 8s infinite both; } .cv-vs > div:last-child { animation: cvVsR 8s infinite both; }
.cv-vs h4 { margin: 0 0 10px; font-size: 15px; color: var(--blue); }
.cv-vs > div:last-child h4 { color: #4E7F37; }
.cv-vs span { display: block; padding: 6px 0; font-size: 13px; font-weight: 700; border-top: 1px dashed var(--line); }
.cv-vs em { align-self: center; justify-self: center; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; font: 800 14px var(--en); font-style: normal; animation: cvPulse 2s infinite; }
@keyframes cvVsL { 0% { opacity: 0; transform: translateX(-20px); } 8%, 90% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes cvVsR { 0%, 10% { opacity: 0; transform: translateX(20px); } 18%, 90% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes cvPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }

/* 一覧のサムネイル(縮小表示) */
.cv--mini { min-height: 0; height: 230px; padding: 40px 14px 12px; margin: 0 0 16px; border-radius: 18px; }
.cv--mini .cv__stage { transform: scale(.72); transform-origin: center; width: 139%; flex-shrink: 0; }
.cv--mini .cv__tag { left: 18px; top: 14px; }
@media (max-width: 640px) { .cv--mini { height: 250px; } .cv--mini .cv__stage { transform: scale(.66); width: 152%; } }

@media (max-width: 640px) {
  .cv { min-height: 240px; padding: 50px 16px 22px; }
  .cv-doc { grid-template-columns: 1fr; } .cv-doc .arrow { width: 60%; justify-self: center; transform: rotate(90deg); margin: 6px 0; animation: none; }
  .cv-sort, .cv-vs { grid-template-columns: 1fr; } .cv-vs em { display: none; }
  .cv-flow li + li::before, .cv-flow li + li::after { margin-right: 28px; }
  .cv-flow i { width: 48px; height: 48px; border-radius: 14px; font-size: 14px; }
  .cv-bars p { grid-template-columns: 5.5em minmax(0, 1fr) 4.5em; font-size: 12px; }
  .cv-cards div { flex-basis: 40%; }
}
@media (prefers-reduced-motion: reduce) {
  .cv *, .cv::before, .cv *::before, .cv *::after { animation: none !important; opacity: 1 !important; max-width: none !important; }
}
@media (max-width: 640px) {
  .cv--mini .cv-doc { grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1.2fr); }
  .cv--mini .cv-doc .arrow { width: auto; transform: none; margin: 0; animation: cvLine 7s var(--ease) infinite; }
  .cv--mini .cv-sort { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .cv--mini .cv-vs { grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr); }
  .cv--mini .cv-vs em { display: grid; }
}
