/* FINOWA article cluster UI helpers / 2026-09-29
   Scope: article pages, B9 qualification clusters, mobile table readability. */

.article-shell .article-body table {
  width: 100%;
  border-collapse: collapse;
}

.article-shell .article-body th,
.article-shell .article-body td {
  vertical-align: top;
}

.article-cluster-box,
.article-next-box,
.article-check-box {
  margin: 34px 0;
  padding: 26px;
  border: 1px solid var(--line, #d9d4c9);
  border-radius: 12px;
  background: #fffefb;
}

.article-cluster-box {
  background: linear-gradient(135deg, #fffefb, #f2f7f3);
}

.article-choice-box {
  margin: 28px 0 36px;
  padding: 24px;
  border: 1px solid var(--line, #d9d4c9);
  border-radius: 12px;
  background: #f8faf8;
}

.article-choice-box .cluster-label {
  display: block;
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
  color: var(--teal, #2f6b57);
}

.article-choice-box h2 {
  margin: 0 0 18px;
}

.article-choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.article-choice-card {
  padding: 18px;
  border: 1px solid #dde5de;
  border-radius: 10px;
  background: #fff;
}

.article-choice-card small {
  display: block;
  margin-bottom: 8px;
  color: var(--teal, #2f6b57);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
}

.article-choice-card strong {
  display: block;
  color: var(--navy, #1e3a5f);
  font-size: 16px;
  line-height: 1.6;
}

.article-choice-card span {
  display: block;
  margin-top: 8px;
  color: #526674;
  font-size: 13px;
  line-height: 1.7;
}

.article-flow-box {
  margin: 28px 0 36px;
  padding: 24px;
  border: 1px solid var(--line, #d9d4c9);
  border-radius: 12px;
  background: #f8faf8;
}

.article-flow-box .cluster-label {
  display: block;
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
  color: var(--teal, #2f6b57);
}

.article-flow-box h2 {
  margin: 0 0 18px;
}

.article-flow {
  display: grid;
  grid-template-columns: repeat(var(--flow-columns, 4), minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: article-flow-step;
}

.article-flow-step {
  position: relative;
  min-height: 122px;
  padding: 16px 16px 16px 18px;
  border: 1px solid #dde5de;
  border-radius: 10px;
  background: #fff;
  counter-increment: article-flow-step;
}

.article-flow-step::before {
  content: counter(article-flow-step, decimal-leading-zero);
  display: block;
  margin-bottom: 8px;
  color: var(--teal, #2f6b57);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
}

.article-flow-step strong {
  display: block;
  color: var(--navy, #1e3a5f);
  font-size: 15px;
  line-height: 1.55;
}

.article-flow-step span {
  display: block;
  margin-top: 6px;
  color: #526674;
  font-size: 12px;
  line-height: 1.65;
}


.article-cluster-box .cluster-label,
.article-next-box .cluster-label,
.article-check-box .cluster-label {
  display: block;
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
  color: var(--teal, #2f6b57);
}

.article-cluster-box h2,
.article-next-box h2,
.article-check-box h2 {
  margin-top: 0;
}

.article-cluster-grid,
.article-next-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.article-cluster-grid.is-four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1020px) and (min-width: 781px) {
  .article-cluster-grid.is-four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

.article-cluster-card,
.article-next-card {
  display: block;
  min-height: 132px;
  padding: 18px;
  border: 1px solid #dde5de;
  border-radius: 10px;
  background: #fff;
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.article-cluster-card:hover,
.article-next-card:hover {
  transform: translateY(-2px);
  border-color: var(--teal, #2f6b57);
  box-shadow: 0 10px 26px rgba(23, 58, 51, .07);
}

.article-cluster-card:focus-visible,
.article-next-card:focus-visible {
  outline: 3px solid rgba(47, 107, 87, .28);
  outline-offset: 3px;
  border-color: var(--teal, #2f6b57);
}

.article-cluster-card small,
.article-next-card small {
  display: block;
  margin-bottom: 8px;
  color: var(--teal, #2f6b57);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
}

.article-cluster-card strong,
.article-next-card strong {
  display: block;
  color: var(--navy, #1e3a5f);
  font-size: 16px;
  line-height: 1.65;
}

.article-cluster-card span,
.article-next-card span {
  display: block;
  margin-top: 8px;
  color: #526674;
  font-size: 13px;
  line-height: 1.7;
}

.article-check-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.article-check-list li {
  position: relative;
  padding: 13px 14px 13px 38px;
  border: 1px solid #dde5de;
  border-radius: 9px;
  background: #fff;
  line-height: 1.75;
}

.article-check-list li::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 20px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--teal, #2f6b57);
}

.article-mobile-table-note {
  display: none;
  margin: 8px 0 0;
  color: #6b7280;
  font-size: 12px;
}

/* Compatibility for older article templates that use .article-main + .table-scroll. */
.article-main .table-scroll {
  max-width: 100%;
}

@media (max-width: 780px) {
  .article-main .table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .article-main .table-scroll table {
    min-width: 640px;
  }

  .article-main .table-scroll::after {
    content: "表は横にスクロールできます。";
    display: block;
    margin-top: 8px;
    color: #6b7280;
    font-size: 12px;
  }

  .article-shell .article-body table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    border: 1px solid var(--line, #d9d4c9);
    border-radius: 8px;
  }

  .article-shell .article-body th,
  .article-shell .article-body td {
    min-width: 160px;
    white-space: normal;
  }

  .article-mobile-table-note {
    display: block;
  }

  .article-cluster-grid,
  .article-next-grid,
  .article-check-list,
  .article-cluster-grid.is-four {
    grid-template-columns: 1fr;
  }

  .article-flow {
    grid-template-columns: 1fr;
  }

  .article-choice-grid {
    grid-template-columns: 1fr;
  }

  .article-cluster-box,
  .article-next-box,
  .article-check-box {
    padding: 20px 18px;
  }

  .article-flow-box {
    padding: 20px 18px;
  }

  .article-choice-box {
    padding: 20px 18px;
  }
}
