/* 関連記事カード（トップ／ツール下層で共用） */

.yt-articles {
  max-width: 1180px;
  margin: 0 auto;
}

.yt-articles-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 23px;
}

.yt-heading-main {
  display: flex;
  align-items: center;
  gap: 15px;
  min-width: 0;
}

.yt-heading-main svg {
  width: 42px;
  height: 42px;
  fill: none;
  stroke: #102b4d;
  stroke-width: 2.4;
  stroke-linejoin: round;
  flex: none;
}

.yt-heading-main h2,
.yt-heading-main h3 {
  font-size: clamp(22px, 2.5vw, 30px);
  letter-spacing: -0.04em;
  margin: 0;
  white-space: nowrap;
  color: var(--ink, #0b1b3b);
}

.yt-heading-main p {
  border-left: 1px solid #a4b6cb;
  padding-left: 18px;
  font-size: 14px;
  margin: 0;
}

.yt-articles-heading > .yt-articles-all {
  display: none;
}

/* トップと同じテキストリンク（home.css 非依存） */
a.yt-articles-all,
a.yt-articles-all:visited {
  display: block;
  width: max-content;
  margin: 27px auto 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: #183957;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

a.yt-articles-all span {
  font-size: 20px;
  font-weight: 600;
  display: inline-block;
  vertical-align: -1px;
  margin-left: 5px;
}


.yt-articles-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.yt-tool-details .yt-articles-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.yt-article {
  min-width: 0;
  background: #fff;
  border: 1px solid #e5edf5;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 12px #173d5c1d;
}

.yt-article-link {
  display: block;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.yt-article-link > img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  background: #e8f1f8;
}

.yt-article-body {
  padding: 15px 17px 17px;
}

.yt-article h3,
.yt-article .yt-article-title {
  font-size: 17px;
  line-height: 1.5;
  margin: 0 0 9px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.yt-article-excerpt {
  font-size: 13px;
  line-height: 1.65;
  color: #46576b;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  margin: 0 0 13px;
  min-height: 3.3em;
}

.yt-article-meta {
  display: flex;
  justify-content: flex-start;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
}

.yt-category {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 99px;
  background: #e9f4fd;
  color: #1d527c;
}

.yt-meta-separator {
  color: #a4b3c3;
  font-size: 12px;
}

.yt-date {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  font-size: 13px;
  color: #4a5d72;
}

.yt-date svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: #46617b;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.yt-article-arrow {
  display: grid;
  place-items: center;
  background: #4cbd29;
  color: #fff;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  font-size: 19px;
  font-weight: 700;
}

.yt-article-link:hover .yt-article-arrow {
  background: #318a18;
}

.yt-article-link:focus-visible {
  outline: 3px solid #ffce28;
  outline-offset: -3px;
}

@media (max-width: 1024px) {
  .yt-articles-grid,
  .yt-tool-details .yt-articles-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .yt-articles-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .yt-heading-main {
    flex-wrap: wrap;
    gap: 8px;
  }

  .yt-heading-main p {
    width: 100%;
    margin-left: 50px;
    border: 0;
    padding: 0;
  }

  .yt-articles-grid,
  .yt-tool-details .yt-articles-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  a.yt-articles-all,
  a.yt-articles-all:visited {
    margin-top: 23px;
  }
}
