.contents-page { width: min(1240px, calc(100% - 48px)); margin: 0 auto; padding: 54px 0 110px; }
.back-link { display: inline-flex; align-items: center; min-height: 40px; margin-bottom: 38px; color: var(--cyan); font-size: .88rem; font-weight: 750; text-underline-offset: 4px; }
.contents-intro { max-width: 1040px; }
.contents-intro h1 { max-width: none; font-size: clamp(2.1rem, 4.4vw, 4rem); }
.contents-intro > p:last-of-type { max-width: 880px; margin: 24px 0 0; color: var(--muted); font-size: 1.05rem; }
.contents-intro strong, .contents-method strong { color: var(--ink); }
.contents-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin-top: 40px; border: 1px solid var(--line); background: var(--line); }
.contents-facts div { display: grid; gap: 8px; padding: 25px; background: var(--deep); }
.contents-facts strong { color: var(--cyan); font: 500 clamp(1.8rem, 3vw, 2.7rem)/1.1 var(--serif); }
.contents-facts span { color: var(--muted); font-size: .85rem; }
.contents-method { max-width: 980px; padding: 48px 0 38px; }
.contents-method h2, .contents-endnote h2 { margin: 0 0 16px; font: 500 clamp(1.5rem, 2.5vw, 2rem)/1.2 var(--serif); }
.contents-method p, .contents-endnote p { color: var(--muted); }
.part-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0 0 55px; }
.part-nav a { display: grid; gap: 5px; min-height: 76px; padding: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: .85rem; font-weight: 700; line-height: 1.35; text-decoration: none; }
.part-nav a:hover, .part-nav a:focus-visible { border-color: var(--cyan); }
.part-nav span { color: var(--cyan); font: 750 .75rem ui-monospace, monospace; }
.part-section { scroll-margin-top: 90px; padding: 58px 0 68px; border-top: 1px solid var(--line); }
.part-heading { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 24px; }
.part-heading .kicker { margin-bottom: 9px; }
.part-heading h2 { margin: 0; font: 500 clamp(1.55rem, 2.7vw, 2.4rem)/1.2 var(--serif); letter-spacing: -.025em; }
.part-heading > p { margin: 0 0 4px; color: var(--cyan); font-size: .89rem; font-weight: 750; white-space: nowrap; }
.part-heading small { display: block; color: var(--dim); font-size: .72rem; font-weight: 500; text-align: right; }
.table-wrap { overflow-x: auto; }
.chapter-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.chapter-table caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.chapter-table th, .chapter-table td { padding: 19px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.chapter-table thead th { border-top: 1px solid var(--line); color: var(--dim); font-size: .78rem; font-weight: 750; }
.chapter-table th:first-child { width: 62%; }
.chapter-table td:nth-child(2) { width: 15%; }
.chapter-table td:nth-child(3), .chapter-table td:nth-child(4) { width: 11.5%; }
.chapter-table tbody th { font-weight: 650; }
.chapter-title { color: var(--ink); font-size: 1rem; }
.chapter-table td { color: var(--ink); font-size: .91rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chapter-table td:last-child { color: var(--cyan); font-weight: 800; }
.section-list { display: grid; gap: 5px; margin: 10px 0 0; padding: 0; list-style: none; }
.section-list li { display: grid; grid-template-columns: 3.3em minmax(0, 1fr) auto; gap: 8px; color: var(--muted); font-size: .82rem; font-weight: 450; line-height: 1.45; }
.section-no, .section-page { color: var(--dim); font-variant-numeric: tabular-nums; }
.section-page { padding-left: 8px; white-space: nowrap; }
.contents-endnote { padding: 46px; border: 1px solid rgba(117,226,211,.3); background: var(--cyan-soft); }
.contents-endnote .button { margin-top: 13px; }

@media (max-width: 900px) {
  .part-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chapter-table th:first-child { width: 55%; }
}

@media (max-width: 700px) {
  .contents-page { width: calc(100% - 32px); padding: 34px 0 70px; }
  .back-link { margin-bottom: 26px; }
  .contents-intro > p:last-of-type { font-size: .95rem; }
  .contents-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contents-facts div { padding: 18px; }
  .part-nav { margin-bottom: 28px; }
  .part-section { padding: 45px 0 52px; }
  .part-heading { display: block; }
  .part-heading > p { margin-top: 14px; white-space: normal; }
  .part-heading small { display: inline; margin-left: 6px; text-align: left; }
  .chapter-table, .chapter-table tbody, .chapter-table tr, .chapter-table th, .chapter-table td { display: block; width: 100% !important; }
  .chapter-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  .chapter-table tr { padding: 18px; border: 1px solid var(--line); border-bottom: 0; background: var(--surface); }
  .chapter-table tr:last-child { border-bottom: 1px solid var(--line); }
  .chapter-table th, .chapter-table td { padding: 0; border: 0; }
  .chapter-table td { display: inline-block; width: auto !important; margin: 14px 16px 0 0; font-size: .82rem; }
  .chapter-table td::before { content: attr(data-label) ": "; color: var(--dim); font-weight: 500; }
  .section-list li { grid-template-columns: 3em minmax(0, 1fr) auto; }
  .contents-endnote { padding: 26px; }
}

@media (max-width: 380px) {
  .part-nav { grid-template-columns: 1fr; }
  .section-list li { grid-template-columns: 2.6em minmax(0, 1fr); }
  .section-page { grid-column: 2; padding-left: 0; }
}
