:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", "YuGothic", "Noto Sans JP", "Segoe UI", sans-serif;
  color: #172033;
  background: #f6f8fb;
  line-height: 1.85;
  overflow-wrap: anywhere;
}

* { box-sizing: border-box; }
body { margin: 0; background: #f6f8fb; }
a { color: #1459a8; text-underline-offset: 0.18em; }
a:focus-visible, [tabindex="0"]:focus-visible { outline: 3px solid #f0a500; outline-offset: 3px; }
.skip-link { position: absolute; left: 1rem; top: -5rem; z-index: 20; padding: .65rem 1rem; background: #fff; }
.skip-link:focus { top: 1rem; }
.preview-banner { display: flex; justify-content: center; gap: .75rem; padding: .7rem 1rem; background: #fff3cd; border-bottom: 1px solid #e2c66b; color: #4d3a00; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; max-width: 72rem; margin: 0 auto; padding: 1.2rem clamp(1rem, 3vw, 2rem); }
.brand-link { color: #172033; font-weight: 800; letter-spacing: .08em; text-decoration: none; }
.back-link { font-size: .92rem; }
.legal-switcher { display: flex; flex-wrap: wrap; gap: .5rem; max-width: 72rem; margin: 0 auto; padding: 0 clamp(1rem, 3vw, 2rem) 1rem; }
.legal-switcher a { padding: .45rem .75rem; border: 1px solid #ccd5e1; border-radius: .45rem; background: #fff; color: #2c3d55; font-size: .86rem; text-decoration: none; }
.legal-switcher a[aria-current="page"] { border-color: #245ea8; background: #eaf2fc; color: #174b8d; font-weight: 700; }
.legal-shell { width: min(100% - 2rem, 62rem); margin: 0 auto 3rem; padding: clamp(1.25rem, 4vw, 3.5rem); border: 1px solid #e0e5ec; border-radius: .75rem; background: #fff; box-shadow: 0 10px 30px rgb(21 41 74 / 7%); }
.edition-label { display: inline-block; margin-bottom: .5rem; padding: .18rem .65rem; border-radius: 999px; background: #eaf2fc; color: #174b8d; font-size: .82rem; font-weight: 700; }
.legal-title, .legal-index h1 { margin: .35rem 0 .2rem; font-size: clamp(1.6rem, 4vw, 2.25rem); line-height: 1.35; letter-spacing: .015em; }
.legal-section-heading { margin: 2.35rem 0 .65rem; padding-top: .2rem; font-size: clamp(1.08rem, 2.4vw, 1.3rem); line-height: 1.55; }
.legal-paragraph { margin: .62rem 0; white-space: pre-wrap; }
.legal-empty { min-height: .4rem; margin: 0; }
.legal-table-scroll { max-width: 100%; margin: 1.25rem 0 1.8rem; overflow-x: auto; overscroll-behavior-inline: contain; }
table { width: 100%; min-width: 48rem; border-collapse: collapse; font-size: .9rem; line-height: 1.65; }
th, td { padding: .75rem .8rem; border: 1px solid #cdd5df; text-align: left; vertical-align: top; }
th { background: #eaf0f7; font-weight: 700; }
.legal-cell-paragraph { white-space: pre-wrap; }
.document-metadata { display: grid; gap: .2rem; margin: 3rem 0 0; padding-top: 1rem; border-top: 1px solid #e1e6ed; color: #526174; font-size: .82rem; }
.document-metadata div { display: flex; gap: .7rem; }
.document-metadata dt { min-width: 5.5rem; font-weight: 700; }
.document-metadata dd { margin: 0; }
.legal-index > p { color: #526174; }
.legal-index ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 2rem 0 0; padding: 0; list-style: none; }
.legal-index li a { display: grid; min-height: 10rem; align-content: center; gap: .25rem; padding: 1.25rem; border: 1px solid #d9e0e8; border-radius: .65rem; color: #172033; text-decoration: none; }
.legal-index li a:hover { border-color: #7b9fc9; background: #f7fbff; }
.legal-index li span, .legal-index li small { color: #526174; }
.legal-index li strong { font-size: 1.15rem; }
.site-footer { max-width: 62rem; margin: 0 auto; padding: 0 1rem 3rem; text-align: center; font-size: .9rem; }

@media (max-width: 42rem) {
  .preview-banner { display: block; text-align: center; }
  .preview-banner span { display: block; }
  .site-header { align-items: flex-start; }
  .legal-shell { width: min(100% - 1rem, 62rem); padding: 1.1rem; border-radius: .45rem; }
  .legal-switcher { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 1rem; }
  .legal-switcher a { flex: 0 0 auto; }
  .legal-index ul { grid-template-columns: 1fr; }
  .document-metadata div { display: grid; gap: 0; }
}

@media print {
  body { background: #fff; }
  .preview-banner, .site-header, .legal-switcher, .site-footer, .skip-link { display: none; }
  .legal-shell { width: 100%; margin: 0; padding: 0; border: 0; box-shadow: none; }
  .legal-table-scroll { overflow: visible; }
}