/* 2026-10-17: article 9–13 visual-review corrections.
   Article 10 supplies the established body typography and navy/blue palette.
   Keep article-specific diagrams, forms, checklist state and title/TOC rules. */

body:is(.hks-a11, .hks-a12, .hks-a13) {
  --navy: #12355f;
  --blue: #1e4f8f;
  --ink: #24394b;
  --muted: #526778;
  --soft: #edf4fb;
  --line: #c8d9e8;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  color: #24394b;
  line-height: 1.8;
}

body:is(.hks-a11, .hks-a12, .hks-a13) .article {
  box-sizing: border-box;
  max-width: 960px;
  margin-inline: auto;
  padding: 32px 28px 72px;
  font-size: 18px;
  line-height: 1.8;
  letter-spacing: normal;
}

/* Article 11 has a main.article around its article.article: apply page
   gutters once, instead of narrowing the entire article a second time. */
body.hks-a11 main.article > article.article {
  max-width: 100%;
  padding: 0;
}

body:is(.hks-a11, .hks-a12, .hks-a13) .article :is(button, input, select, textarea) {
  font-family: inherit;
}

/* Old inline SVGs carry the former family as presentation attributes. */
body:is(.hks-a11, .hks-a12, .hks-a13) .article svg :is(text, tspan) {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
}

body:is(.hks-a11, .hks-a12, .hks-a13) .article .body-section {
  margin-block: 44px;
}

body:is(.hks-a11, .hks-a12, .hks-a13) .article .body-section > h2 {
  color: #12355f;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.55;
  letter-spacing: normal;
  margin: 0 0 18px;
  padding: 0 .5em .55em;
  border: 0;
  border-bottom: 2px solid #c8d9e8;
}

body:is(.hks-a11, .hks-a12, .hks-a13) .article .body-section > h3 {
  color: #12355f;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.6;
  padding-left: .5em;
}

body:is(.hks-a11, .hks-a12, .hks-a13) .article .section-number {
  color: #1e4f8f;
  font-size: 14px;
  line-height: 1.6;
  font-weight: 700;
  letter-spacing: .04em;
}

body:is(.hks-a11, .hks-a12, .hks-a13) .article :is(.body-section > p, .firsthand > p, .lead) {
  font-size: 18px;
  line-height: 1.8;
  margin-block: 14px;
}

body:is(.hks-a11, .hks-a12, .hks-a13) .article :is(.related-card, .a13-related) {
  border-color: #c8d9e8;
  border-radius: 10px;
  background: #f8fbff;
}

body:is(.hks-a11, .hks-a12, .hks-a13) .article :is(.firsthand, .wait-card, .a13-card, .note-pair > div, .priority-grid > div) {
  border-color: #c8d9e8;
  border-radius: 11px;
  padding: 20px 22px;
}

body:is(.hks-a11, .hks-a12, .hks-a13) .article :is(.related-card p, .wait-card p, .a13-card p, .note-pair p, .priority-grid p, .flow p, .quick-guide p, .a13-summary p) {
  font-size: 16px;
  line-height: 1.8;
}

body:is(.hks-a11, .hks-a12, .hks-a13) .article :is(.related-card h3, .wait-card strong, .a13-card h3, .note-pair h3, .priority-grid strong) {
  color: #12355f;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.6;
}

body:is(.hks-a11, .hks-a12, .hks-a13) .article :is(.check-row, .mini-check-grid label, .a13-checklist label) {
  font-size: 16px;
  line-height: 1.7;
}

body:is(.hks-a11, .hks-a12, .hks-a13) .article .sources {
  color: #526778;
  font-size: 14px;
  line-height: 1.8;
}

/* Keep the label and arrow together, with an intentional maximum width.
   The old article-10 anchor accidentally also had the outer related-box
   class; the matching HTML patch removes only that redundant class. */
body.hks-a09 .article.article09-visual :is(.a9-next-link, .a9-related-card > a),
body.hks-a10 .article.article10-visual :is(.a10-next-link, .a10-related-card > a) {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .65em;
  width: fit-content;
  max-width: min(100%, 36rem);
  min-height: 52px;
  padding: 13px 20px;
  margin: 14px auto 0;
  border: 1px solid #c8d9e8;
  border-radius: 8px;
  background: #fff;
  color: #1e4f8f;
  text-align: center;
  font-size: 17px !important;
  font-weight: 750;
  line-height: 1.7 !important;
  text-decoration: none;
  white-space: normal;
  overflow-wrap: break-word;
}

body.hks-a09 .article.article09-visual .a9-primary > .a9-next-link,
body.hks-a10 .article.article10-visual .a10-primary > .a10-next-link {
  color: #fff;
  border-color: #12355f;
  background: #12355f;
}

body.hks-a09 .article.article09-visual :is(.a9-next-link, .a9-related-card > a) > span,
body.hks-a10 .article.article10-visual :is(.a10-next-link, .a10-related-card > a) > span {
  flex: 0 0 auto;
}

body.hks-a09 .article.article09-visual :is(.a9-next-link, .a9-related-card > a):hover,
body.hks-a10 .article.article10-visual :is(.a10-next-link, .a10-related-card > a):hover {
  text-decoration: underline;
  text-underline-offset: .2em;
}

@media (max-width: 768px) {
  body:is(.hks-a11, .hks-a12, .hks-a13) .article {
    max-width: 100%;
    padding: 24px clamp(1rem, 3vw, 1.5rem) 54px;
    font-size: 1.0625rem;
    line-height: 1.85;
  }
  body.hks-a11 main.article > article.article { padding: 0; }
  body:is(.hks-a11, .hks-a12, .hks-a13) .article .body-section { margin-block: 40px; }
  body:is(.hks-a11, .hks-a12, .hks-a13) .article .body-section > h2 {
    font-size: 1.4375rem;
    line-height: 1.5;
    margin-bottom: 16px;
  }
  body:is(.hks-a11, .hks-a12, .hks-a13) .article :is(.body-section > p, .firsthand > p, .lead) {
    font-size: 1.0625rem;
    line-height: 1.85;
  }
  body:is(.hks-a11, .hks-a12, .hks-a13) .article :is(.firsthand, .wait-card, .a13-card, .note-pair > div, .priority-grid > div) {
    padding: 18px;
  }
  body.hks-a09 .article.article09-visual :is(.a9-next-link, .a9-related-card > a),
  body.hks-a10 .article.article10-visual :is(.a10-next-link, .a10-related-card > a) {
    width: 100%;
    max-width: 100%;
    padding: 12px 14px;
    font-size: 1rem !important;
    gap: .5em;
  }
}

@media print {
  body:is(.hks-a11, .hks-a12, .hks-a13) .article {
    max-width: none;
    padding: 0;
  }
}
