/*
  Article Visual Fix v16
  価格設計コラムの記事上部・要点ボックス・図解の見た目を落ち着かせるための上書きCSSです。
  診断機能、フォーム、決済導線、計測タグには触れません。
*/

:root {
  --article-fix-paper: #f3f0e8;
  --article-fix-panel: #fffefa;
  --article-fix-soft: #f8f5ef;
  --article-fix-ink: #171813;
  --article-fix-text: #34352f;
  --article-fix-muted: #747269;
  --article-fix-line: #d8d3c8;
  --article-fix-line-strong: #c9c2b4;
  --article-fix-accent: #20211d;
  --article-fix-accent-soft: #ece7dd;
  --article-fix-shadow: 0 18px 42px rgba(29, 31, 24, .075);
  --article-fix-shadow-soft: 0 10px 24px rgba(29, 31, 24, .055);
}

/* 1. 記事ファーストビュー：タイトルを主役に戻します */
.article-hero {
  padding: clamp(34px, 5vw, 62px) 0 clamp(28px, 4vw, 44px) !important;
  overflow: hidden;
}

.article-hero-grid {
  grid-template-columns: minmax(0, 1fr) clamp(260px, 29vw, 440px) !important;
  gap: clamp(28px, 4.5vw, 58px) !important;
  align-items: center !important;
}

.article-hero h1 {
  max-width: 880px !important;
  margin: 18px 0 16px !important;
  font-size: clamp(40px, 5.7vw, 86px) !important;
  line-height: 1.22 !important;
  letter-spacing: .005em !important;
  overflow-wrap: anywhere;
}

.article-hero .hero-lead {
  max-width: 720px !important;
  font-size: clamp(13px, 1.15vw, 15px) !important;
  line-height: 2 !important;
  color: #646259 !important;
}

.article-hero .eyebrow,
.article-hero .category-pill {
  padding: 6px 13px !important;
  border-color: var(--article-fix-line-strong) !important;
  background: rgba(255, 254, 250, .72) !important;
  color: #5f5d55 !important;
  letter-spacing: .18em !important;
  box-shadow: none !important;
}

.article-meta {
  margin-top: 20px !important;
}

.article-hero-visual {
  min-height: clamp(210px, 25vw, 310px) !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
  isolation: isolate;
}

.article-hero-visual::after {
  display: none !important;
}

.hero-estimate,
.hero-high,
.hero-price,
.hero-quote {
  background: transparent !important;
}

.article-hero-visual .paper,
.hero-estimate .paper,
.hero-high .paper,
.hero-price .paper,
.hero-quote .paper,
.article-hero-visual .sheet,
.hero-estimate .sheet,
.hero-high .sheet,
.hero-price .sheet,
.hero-quote .sheet {
  left: auto !important;
  right: clamp(0px, 1.2vw, 18px) !important;
  top: 50% !important;
  width: min(88%, 390px) !important;
  height: clamp(170px, 18vw, 225px) !important;
  transform: translateY(-50%) rotate(1.25deg) !important;
  border: 1px solid rgba(216, 211, 200, .78) !important;
  border-radius: 16px !important;
  background: rgba(255, 254, 250, .96) !important;
  box-shadow: var(--article-fix-shadow) !important;
}

.article-hero-visual .paper::before,
.hero-estimate .paper::before,
.hero-high .paper::before,
.hero-price .paper::before,
.hero-quote .paper::before,
.article-hero-visual .sheet::before,
.hero-estimate .sheet::before,
.hero-high .sheet::before,
.hero-price .sheet::before,
.hero-quote .sheet::before {
  left: 20px !important;
  top: 18px !important;
  color: var(--article-fix-ink) !important;
  font-size: clamp(16px, 1.55vw, 21px) !important;
  letter-spacing: .02em !important;
}

.article-hero-visual .paper::after,
.hero-estimate .paper::after,
.hero-high .paper::after,
.hero-price .paper::after,
.hero-quote .paper::after,
.article-hero-visual .sheet::after,
.hero-estimate .sheet::after,
.hero-high .sheet::after,
.hero-price .sheet::after,
.hero-quote .sheet::after {
  left: 20px !important;
  right: 20px !important;
  top: 58px !important;
  height: calc(100% - 88px) !important;
  background: repeating-linear-gradient(
    to bottom,
    rgba(191, 184, 169, .58) 0 1px,
    transparent 1px 25px
  ) !important;
}

.article-hero-visual .big-number,
.hero-estimate .big-number,
.hero-high .big-number,
.hero-price .big-number,
.hero-quote .big-number,
.article-hero-visual [class*="big"],
.article-hero-visual [class*="label"] {
  display: none !important;
}

/* 2. HIGHのような巨大装飾を、実務的な要点ボックスへ寄せます */
.lede-card {
  position: relative;
  margin: 0 0 34px !important;
  padding: 20px 22px 20px 24px !important;
  border: 1px solid var(--article-fix-line) !important;
  border-left: 4px solid var(--article-fix-accent) !important;
  border-radius: 16px !important;
  background: var(--article-fix-panel) !important;
  color: var(--article-fix-text) !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

.lede-card::before {
  content: "要点";
  display: inline-flex;
  width: max-content;
  margin: 0 0 10px;
  padding: 4px 9px;
  border: 1px solid var(--article-fix-line);
  border-radius: 999px;
  background: var(--article-fix-soft);
  color: #5b5951;
  font: 700 10px/1 var(--number, sans-serif);
  letter-spacing: .12em;
}

.lede-card .lede-kicker {
  display: none !important;
}

.lede-card p,
.lede-card li {
  margin: 0 !important;
  color: var(--article-fix-text) !important;
  font-size: clamp(13px, 1vw, 14px) !important;
  line-height: 1.9 !important;
}

.lede-card strong {
  color: var(--article-fix-ink) !important;
}

/* 3. 図解：横並びの浮遊カードではなく、意味が伝わるステップへ変更します */
.editorial-figure {
  margin: 30px 0 34px !important;
  border: 1px solid var(--article-fix-line) !important;
  border-radius: 18px !important;
  background: var(--article-fix-panel) !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

.editorial-figure figcaption {
  padding: 13px 18px !important;
  border-top: 1px solid var(--article-fix-line) !important;
  background: var(--article-fix-panel) !important;
  color: var(--article-fix-muted) !important;
  font-size: 11px !important;
  line-height: 1.7 !important;
}

.figure-canvas {
  min-height: 0 !important;
  padding: clamp(18px, 2.6vw, 28px) !important;
  background: linear-gradient(180deg, #f6f2ea 0%, #f9f7f1 100%) !important;
}

.figure-canvas::before {
  display: none !important;
}

.figure-flow {
  position: relative !important;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: clamp(12px, 1.6vw, 18px) !important;
  align-items: stretch !important;
  counter-reset: article-step;
}

.figure-flow .node {
  counter-increment: article-step;
  min-height: 138px !important;
  padding: 18px 18px 16px !important;
  border: 1px solid var(--article-fix-line) !important;
  border-radius: 14px !important;
  background: rgba(255, 254, 250, .94) !important;
  box-shadow: var(--article-fix-shadow-soft) !important;
  transform: none !important;
}

.figure-flow .node::before {
  content: counter(article-step, decimal-leading-zero);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 22px;
  margin: 0 0 14px;
  border-radius: 999px;
  background: var(--article-fix-accent-soft);
  color: #5a564c;
  font: 700 10px/1 var(--number, sans-serif);
  letter-spacing: .06em;
}

.figure-flow .node:not(:last-child)::after {
  content: "→";
  position: absolute;
  z-index: 2;
  top: 50%;
  right: calc(clamp(12px, 1.6vw, 18px) * -.84);
  transform: translate(50%, -50%);
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border: 1px solid var(--article-fix-line);
  border-radius: 999px;
  background: var(--article-fix-panel);
  color: #6b675d;
  font: 700 14px/1 var(--number, sans-serif);
  box-shadow: 0 4px 12px rgba(29, 31, 24, .045);
}

.figure-flow .node:nth-child(4),
.figure-flow .node.is-active,
.figure-flow .node.featured {
  border-color: #bbb4a7 !important;
  background: #f5f1e8 !important;
}

.figure-flow .node:nth-child(4)::before,
.figure-flow .node.is-active::before,
.figure-flow .node.featured::before {
  background: var(--article-fix-ink) !important;
  color: #fff !important;
}

.figure-flow .node b {
  display: block !important;
  margin: 0 0 8px !important;
  color: var(--article-fix-ink) !important;
  font-family: var(--serif, serif) !important;
  font-size: clamp(19px, 1.55vw, 24px) !important;
  font-weight: 500 !important;
  line-height: 1.35 !important;
}

.figure-flow .node small,
.figure-flow .node span,
.figure-flow .node p {
  display: block !important;
  color: var(--article-fix-muted) !important;
  font-size: 12px !important;
  line-height: 1.7 !important;
}

/* 4. 他の図解部品も蛍光色・過剰な影を抑えます */
.figure-matrix .cell,
.figure-panel,
.figure-route .stop,
.calendar-grid span {
  box-shadow: var(--article-fix-shadow-soft) !important;
}

.figure-matrix .cell.featured,
.figure-route .stop:nth-child(3),
.calendar-grid span.billable {
  background: #f5f1e8 !important;
  border-color: #bbb4a7 !important;
  color: var(--article-fix-ink) !important;
}

/* 5. タブレット・スマートフォン */
@media (max-width: 1060px) {
  .article-hero-grid {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  .article-hero-visual {
    min-height: 220px !important;
  }

  .article-hero-visual .paper,
  .hero-estimate .paper,
  .hero-high .paper,
  .hero-price .paper,
  .hero-quote .paper,
  .article-hero-visual .sheet,
  .hero-estimate .sheet,
  .hero-high .sheet,
  .hero-price .sheet,
  .hero-quote .sheet {
    position: relative !important;
    right: auto !important;
    top: auto !important;
    width: min(100%, 480px) !important;
    height: 170px !important;
    margin: 0 !important;
    transform: rotate(.8deg) !important;
  }

  .figure-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .figure-flow .node:not(:last-child)::after {
    display: none !important;
  }
}

@media (max-width: 760px) {
  .article-hero {
    padding: 30px 0 22px !important;
  }

  .article-hero h1 {
    font-size: clamp(34px, 10vw, 48px) !important;
    line-height: 1.25 !important;
  }

  .article-hero-visual {
    min-height: 0 !important;
  }

  .article-hero-visual .paper,
  .hero-estimate .paper,
  .hero-high .paper,
  .hero-price .paper,
  .hero-quote .paper,
  .article-hero-visual .sheet,
  .hero-estimate .sheet,
  .hero-high .sheet,
  .hero-price .sheet,
  .hero-quote .sheet {
    width: 100% !important;
    height: 150px !important;
    border-radius: 14px !important;
    transform: none !important;
  }

  .lede-card {
    margin-bottom: 26px !important;
    padding: 18px 18px 18px 20px !important;
    border-radius: 14px !important;
  }

  .editorial-figure {
    margin: 26px 0 30px !important;
    border-radius: 16px !important;
  }

  .figure-canvas {
    padding: 16px !important;
  }

  .figure-flow {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .figure-flow .node {
    min-height: 0 !important;
    padding: 16px !important;
    border-radius: 13px !important;
  }

  .figure-flow .node::before {
    margin-bottom: 10px !important;
  }

  .figure-flow .node:not(:last-child)::after {
    content: "↓";
    position: static;
    display: grid !important;
    width: 24px;
    height: 24px;
    margin: 12px auto -22px;
    transform: none;
  }
}
