/* ガイドの一覧と各ガイドだけで読む見た目（issue 127）。site.css の後に読む（変数と共通の部品は site.css）。
 * LP・申し込み・法務・404 は読まない（LP の描画を止める site.css を小さく保つ）。 */
/* ---- ガイドの記事 ---- */
.article-main {
  padding: 32px 0 96px;
}
.article-wrap {
  max-width: calc(808px + 48px);
}
.hub-wrap {
  max-width: calc(1040px + 48px);
}
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  color: var(--muted);
  font-size: 13.5px;
}
.breadcrumb li + li::before {
  content: "＞";
  margin: 0 8px;
  color: var(--field-line);
}
.breadcrumb a {
  color: var(--muted);
}
.article-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  margin-top: 28px;
}
.article-header h1 {
  margin-top: 12px;
  font-size: clamp(27px, 3.4vw, 38px);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.45;
  text-wrap: pretty;
}
.article-meta {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
}
.article-illustration {
  width: 200px;
}
.hub-illustration {
  width: 320px;
}
.hub-lead {
  max-width: 34em;
  margin-top: 16px;
  color: var(--muted);
  font-size: 17px;
}
.article-answer {
  margin-top: 32px;
  padding: 24px 28px;
  border-radius: var(--radius);
  background: var(--forest);
  color: var(--forest-soft-text);
}
.article-answer h2 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--lime);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
}
.article-answer p {
  margin-top: 8px;
  color: #fff;
  font-size: 17px;
  line-height: 1.95;
}
.article-answer .cite a {
  color: var(--lime);
}
.article-toc {
  margin-top: 24px;
  padding: 22px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.article-toc h2 {
  font-size: 15px;
  font-weight: 600;
}
.article-toc ol {
  margin-top: 8px;
}
.article-toc a {
  display: flex;
  gap: 12px;
  padding: 6px 0;
  color: var(--ink);
  text-decoration: none;
}
.article-toc a:hover span:last-child {
  color: var(--green);
  text-decoration: underline;
}
.article-toc-no {
  flex: none;
  color: var(--green);
  font-family: var(--font-latin);
  font-weight: 600;
}
.article-body {
  margin-top: 16px;
  font-size: 17px;
  line-height: 2;
}
.article-section {
  padding-top: 40px;
}
.article-section > h2 {
  margin-bottom: 16px;
  padding-left: 14px;
  border-left: 5px solid var(--lime-deep);
  font-size: clamp(22px, 2.4vw, 26px);
  font-weight: 700;
  line-height: 1.5;
}
/* 本文の段は 1 行 40 字前後（17px × 40 = 680px）。補足・表・FAQ・出典も同じ幅にそろえる。 */
.article-body .article-section > * {
  max-width: 680px;
}
.article-body > .article-section > * + * {
  margin-top: 18px;
}
.article-list li {
  position: relative;
  padding-left: 1.4em;
}
.article-list li + li {
  margin-top: 8px;
}
.article-list li::before {
  content: "";
  position: absolute;
  left: 0.3em;
  top: 0.82em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}
.article-steps li {
  display: flex;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.article-steps li + li {
  margin-top: 12px;
}
.article-step-no {
  display: grid;
  flex: none;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--lime);
  color: var(--forest);
  font-family: var(--font-latin);
  font-weight: 600;
  line-height: 1;
}
.article-steps h3 {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.7;
}
.article-steps p {
  margin-top: 4px;
  font-size: 16px;
  line-height: 1.9;
}
.article-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.75;
}
.article-table caption {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  text-align: left;
}
.article-table th,
.article-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.article-table thead th {
  background: var(--cream);
  white-space: nowrap;
}
.article-table tbody th {
  white-space: nowrap;
}
/* 行の見出しが長い表（pages.mjs が全角 10 字分を超える見出しの表に付ける）は、行の見出しを折り返す
   （1 行に固定すると、ほかの列が 1 行 6〜7 字まで細る）。折る位置は空白と句読点だけにし、語の途中では折らない。 */
.article-table .row-head-wrap tbody th {
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: break-word;
}
/* 文の列どうしは同じ幅に分ける（自動の配分では、文の長い列が幅を取り、ほかの列が細る）。行の見出しの列は中身の幅。 */
@media (min-width: 640px) {
  .article-table .cols-3 td {
    width: 38%;
  }
  .article-table .cols-4 td {
    width: 27%;
  }
}
.article-table tbody tr:last-child > * {
  border-bottom: 0;
}
.article-note {
  display: flex;
  gap: 10px;
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--wash);
  font-size: 15px;
  line-height: 1.9;
}
.article-note .ic {
  margin-top: 0.4em;
  color: var(--green);
}
.article-callout {
  padding: 18px 22px;
  border-left: 5px solid var(--coral);
  border-radius: 0 12px 12px 0;
  background: var(--coral-soft);
  font-weight: 600;
}
.article-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  padding: 22px 24px;
  border: 2px solid var(--lime-deep);
  border-radius: var(--radius);
  background: var(--lime-wash);
}
.article-cta > div {
  flex: 1 1 18em;
  min-width: 0;
}
.article-cta p {
  font-size: 15px;
  line-height: 1.8;
}
.article-cta .article-cta-title {
  color: var(--forest);
  font-size: 17px;
  font-weight: 600;
}
.cite {
  font-size: 0.72em;
  line-height: 0;
  vertical-align: super;
}
.cite a {
  padding: 0 1px;
  font-family: var(--font-latin);
  font-weight: 600;
  text-decoration: none;
}
.article-faq-item {
  padding: 18px 0;
  border-bottom: 1px solid var(--line-strong);
}
.article-faq-item h3 {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.7;
}
.article-faq-item p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 16px;
}
.article-sources-note {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
}
.article-sources ol li {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  line-height: 1.7;
  scroll-margin-top: calc(var(--header-h) + 16px);
}
.article-source-no {
  flex: none;
  color: var(--green);
  font-family: var(--font-latin);
  font-weight: 600;
}
.article-sources a {
  display: inline;
}
.article-sources a .ic {
  margin-left: 4px;
  vertical-align: -0.1em;
}
.article-source-meta {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13.5px;
}
.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.article-related,
.hub-group {
  margin-top: 56px;
}
/* 関連するガイドは 3 枚。1100px 以上は 3 列に並べ、矢印は右下に置いて文の幅を広げる。 */
@media (min-width: 1100px) {
  .article-related .topic-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .article-related .topic-card {
    padding: 20px 20px 52px;
  }
  .article-related .topic-card-more {
    top: auto;
    bottom: 16px;
    margin-top: 0;
  }
}
.article-related h2,
.hub-group h2 {
  margin-bottom: 16px;
  font-size: 22px;
  font-weight: 700;
}
.article-end {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-top: 56px;
  padding: 32px;
  border-radius: var(--radius-lg);
  background: var(--lime);
}
.article-end-visual {
  flex: 0 0 240px;
}
.article-end-copy {
  flex: 1 1 0;
  min-width: 0;
}
.article-end h2 {
  color: var(--forest);
  font-size: clamp(21px, 2.4vw, 26px);
  font-weight: 600;
  line-height: 1.5;
}
.article-end p {
  margin-top: 8px;
  color: #2c4a3c;
}
.article-end .button {
  margin-top: 20px;
}
@media (max-width: 767px) {
  .article-main {
    padding: 20px 0 64px;
  }
  .article-header {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .article-illustration,
  .hub-illustration {
    order: -1;
    width: 150px;
  }
  .hub-illustration {
    width: 240px;
  }
  .article-answer,
  .article-toc {
    padding: 20px;
  }
  .article-body {
    font-size: 16px;
    line-height: 1.95;
  }
  .article-end {
    flex-direction: column;
    align-items: stretch;
    padding: 24px 20px;
  }
  .article-end-visual {
    flex: none;
    width: 100%;
    max-width: 240px;
    align-self: center;
  }
}
/* 狭い画面では表を行ごとのカードに組み替える（横に送らずに全部の列を読める）。 */
@media (max-width: 639px) {
  .article-table {
    overflow: visible;
    border: 0;
    background: none;
  }
  .article-table table,
  .article-table caption,
  .article-table tbody,
  .article-table tr,
  .article-table th,
  .article-table td {
    display: block;
    width: 100%;
  }
  .article-table caption {
    padding: 0 0 8px;
    border: 0;
  }
  .article-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .article-table tr {
    margin-bottom: 10px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
  }
  .article-table tbody th,
  .article-table td {
    padding: 8px 14px;
    border-bottom: 0;
    white-space: normal;
  }
  .article-table tbody th {
    background: var(--cream);
  }
  .article-table td::before {
    content: attr(data-label);
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
  }
  .article-cta .button {
    width: 100%;
  }
}
