/* Article-specific styles; shared navigation and footer retain their existing styles. */

.s5 {
  --ink: #233e36;
  --muted: #556860;
  --accent: #24664e;
  max-width: 1180px;
  margin: auto;
  padding: 26px 28px 80px;
  color: var(--ink);
  text-align: left;
  line-height: 1.95;
  font-family: Arial, 'Hiragino Kaku Gothic ProN', 'Yu Gothic', sans-serif;
}

.s5 * {
  box-sizing: border-box;
}

.s5 a {
  color: var(--accent);
  text-underline-offset: 5px;
}

.s5 a:focus-visible,
.s5 summary:focus-visible {
  outline: 3px solid #b67222;
  outline-offset: 5px;
}

.s5-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  margin-bottom: 32px;
  color: var(--muted);
}

.s5-hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: 40px;
  padding: 35px 0 58px;
  border-bottom: 1px solid #cdd6cd;
}

.s5-hero img {
  width: 100%;
  height: auto;
  display: block;
}

.s5-eyebrow {
  font-size: 12px !important;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--accent);
  margin: 0 0 14px !important;
}

.s5 h1 {
  font-size: clamp(30px, 3.3vw, 43px);
  line-height: 1.5;
  letter-spacing: -.035em;
  margin: 0 0 24px;
}

.s5 h1 span {
  display: block;
  font-size: .59em;
  letter-spacing: 0;
  margin-top: 12px;
}

.s5-lead {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.7;
}

.s5-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 12px;
  margin: 24px 0;
  color: var(--muted);
}

.s5 .s5-button {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  padding: 13px 22px;
  border-radius: 5px;
  background: var(--accent);
  color: white;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.7;
}

.s5-button:hover {
  background: #174c39;
}

.s5-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 64px;
  padding-top: 48px;
}

.s5-toc {
  position: sticky;
  top: 90px;
  align-self: start;
  font-size: 13px;
  border-left: 2px solid #cdd6cd;
  padding-left: 20px;
}

.s5-toc p {
  font-weight: bold;
}

.s5-toc ol {
  padding-left: 19px;
}

.s5-toc li {
  padding: 7px 0;
}

.s5-toc a {
  text-decoration: none;
}

.s5-body {
  min-width: 0;
}

.s5-body p {
  font-size: 16px;
  margin: 18px 0;
}

.s5-body section {
  margin-top: 64px;
  scroll-margin-top: 100px;
}

.s5 h2 {
  font-size: clamp(23px, 2.3vw, 30px);
  line-height: 1.6;
  margin: 0 0 24px;
  letter-spacing: -.025em;
}

.s5 h3 {
  font-size: 19px;
  line-height: 1.7;
  margin: 28px 0 12px;
}

.s5-answer {
  padding: 26px 30px;
  background: #e8eee5;
  border-radius: 8px;
}

.s5-answer p:last-child {
  margin-bottom: 0;
}

.s5-note {
  border-left: 4px solid #b47a38;
  padding: 20px 25px;
  background: #f3ebdd;
  margin: 26px 0;
}

.s5-note p {
  margin-bottom: 0;
}

.s5-timeline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.s5-timeline > div {
  background: #fffdf8;
  border: 1px solid #d4dacf;
  padding: 24px;
}

.s5-timeline b {
  font-size: 12px;
  color: var(--accent);
  border-bottom: 2px solid #b7c9ae;
  padding-bottom: 6px;
}

.s5-timeline h3 {
  margin-top: 16px;
}

.s5-timeline p {
  font-size: 14px;
}

.s5-table-wrap {
  overflow-x: auto;
  margin: 28px 0;
}

.s5 table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.8;
  min-width: 490px;
}

.s5 caption {
  text-align: left;
  font-weight: bold;
  margin-bottom: 12px;
}

.s5 th,
.s5 td {
  padding: 15px 13px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #d4dacf;
}

.s5 thead {
  background: #294c3e;
  color: #fff;
}

.s5 tbody th {
  width: 17%;
  white-space: nowrap;
}

.s5 tbody tr:nth-child(even) {
  background: #eef1e9;
}

.s5-template {
  padding: 28px;
  background: #fffdf8;
  border: 1px solid #d4dacf;
  box-shadow: 6px 6px 0 #e6e7da;
}

.s5-template h3 {
  margin-top: 0;
}

.s5-template p {
  font-size: 14px;
}

.s5-check {
  padding-left: 24px;
}

.s5-check li {
  padding: 8px 0;
}

.s5-cta {
  padding: 32px;
  background: #e3ecdf;
  border-radius: 8px;
  margin-top: 30px;
}

.s5-cta h3 {
  font-size: 26px;
  margin-top: 0;
}

.s5 details {
  border-bottom: 1px solid #cdd6cd;
  padding: 20px 0;
}

.s5 summary {
  font-weight: bold;
  cursor: pointer;
  line-height: 1.8;
}

.s5 details p {
  padding-left: 20px;
}

.s5-finish {
  padding: 32px;
  background: #294c3e;
  color: #fff;
  border-radius: 8px;
}

.s5-finish .s5-eyebrow {
  color: #d6e7b6;
}

.s5-finish ol {
  padding-left: 25px;
}

.s5-finish li {
  padding: 8px 0;
}

.s5-related {
  border-top: 1px solid #cdd6cd;
  margin-top: 45px;
  padding-top: 30px;
}

.s5-related h2 {
  font-size: 20px;
}

.s5-related a {
  display: block;
  padding: 12px 0;
  font-size: 14px;
}

.s5 strong {
  font-weight: 700;
}

@media (max-width: 850px) {
  .s5 {
    padding: 20px 20px 60px;
  }

  .s5-hero {
    gap: 20px;
  }

  .s5-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .s5-toc {
    position: static;
  }

  .s5-toc ol {
    columns: 2;
    column-gap: 30px;
  }

  .s5-toc li {
    break-inside: avoid;
  }

  .s5-hero img {
    max-width: 330px;
    margin: auto;
  }

  .s5 h1 {
    font-size: 30px;
  }

}

@media (max-width: 580px) {
  .s5-hero {
    grid-template-columns: 1fr;
    padding-top: 12px;
  }

  .s5-hero img {
    max-width: 300px;
  }

  .s5 h1 {
    font-size: 29px;
  }

  .s5-lead {
    font-size: 20px;
  }

  .s5-toc ol {
    columns: 1;
  }

  .s5-timeline {
    grid-template-columns: 1fr;
  }

  .s5-answer,
  .s5-note,
  .s5-template,
  .s5-cta,
  .s5-finish {
    padding: 22px;
  }

  .s5-body section {
    margin-top: 45px;
  }

  .s5-body p {
    font-size: 15px;
  }

  .s5-breadcrumb {
    font-size: 11px;
    gap: 6px;
  }

  .s5 .s5-button {
    padding: 13px 16px;
    font-size: 13px;
  }

}

/* Section illustration: full text width with a shallow landscape ratio. */
.s5 .s5-body .s5-section-image {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 220px;
  max-height: 220px;
  object-fit: cover;
  object-position: center;
  margin: 0 0 24px;
  border-radius: 8px;
}

/* Keep both illustrations fully visible on narrow screens. */
@media (max-width: 580px) {
  .s5 .s5-body .s5-section-image {
    height: auto;
    max-height: none;
    aspect-ratio: 3 / 1;
    object-fit: contain;
    margin-bottom: 18px;
    border-radius: 6px;
  }
}
