.utility-page { color: #263b47; }

.utility-page__header {
    padding: clamp(8rem, 10vw, 13rem) 0 clamp(5.5rem, 7vw, 8rem);
    background: #f1f7f8;
}

.utility-page__header .site-breadcrumb { margin-bottom: 4rem; }
.utility-page__header .nhk-eyebrow { margin-bottom: 1.5rem; color: #587246; }
.utility-page__header h1,
.not-found-page h1,
.server-not-found h1 { color: #164361; font-size: clamp(4rem, 5.3vw, 6.8rem); line-height: 1.06; letter-spacing: -0.035em; }
.utility-page__intro { max-width: 82rem; margin-top: 2rem; color: #526b77; font-size: clamp(1.8rem, 2vw, 2.3rem); line-height: 1.65; }
.utility-page__updated { margin-top: 2rem; color: #637983; font-size: 1.4rem; }

.legal-page__layout { display: grid; grid-template-columns: minmax(22rem, 29rem) minmax(0, 78rem); gap: clamp(5rem, 8vw, 11rem); align-items: start; padding-top: clamp(6rem, 8vw, 10rem); padding-bottom: clamp(8rem, 10vw, 13rem); }
.legal-page__toc { position: sticky; top: 11rem; padding: 2.8rem; border: 1px solid #dbe4e7; border-radius: .6rem; background: #fff; }
.legal-page__toc h2 { margin-bottom: 1.7rem; color: #164361; font-size: 1.8rem; }
.legal-page__toc ol { display: grid; gap: 1.1rem; list-style: none; counter-reset: legal-section; }
.legal-page__toc li { counter-increment: legal-section; }
.legal-page__toc a { display: grid; grid-template-columns: 2.2rem 1fr; gap: .8rem; color: #637983; font-size: 1.35rem; line-height: 1.45; }
.legal-page__toc a::before { content: counter(legal-section, decimal-leading-zero); color: #587246; font-size: 1.1rem; font-weight: 700; letter-spacing: .08em; }
.legal-page__toc a:hover,
.legal-page__toc a:focus-visible { color: #164361; }

.legal-page__content section { scroll-margin-top: 11rem; }
.legal-page__content section + section { margin-top: 5rem; padding-top: 5rem; border-top: 1px solid #dbe4e7; }
.legal-page__content h2 { margin-bottom: 2rem; color: #164361; font-size: clamp(2.6rem, 3vw, 3.4rem); line-height: 1.2; }
.legal-page__content p { color: #445e6a; font-size: 1.65rem; line-height: 1.8; }
.legal-page__content p + p { margin-top: 1.6rem; }
.legal-page__related-link { display: inline-flex; gap: .8rem; margin-top: 2.2rem; color: #164361; font-size: 1.5rem; font-weight: 700; }

.legal-page__table-wrap { margin-top: 2.5rem; overflow-x: auto; border: 1px solid #dbe4e7; border-radius: .6rem; }
.legal-page table { width: 100%; min-width: 68rem; border-collapse: collapse; background: #fff; text-align: left; }
.legal-page caption { padding: 1.3rem 1.6rem; color: #637983; font-size: 1.25rem; text-align: left; }
.legal-page th,
.legal-page td { padding: 1.5rem 1.6rem; border-top: 1px solid #dbe4e7; color: #445e6a; font-size: 1.4rem; line-height: 1.55; vertical-align: top; }
.legal-page thead th { background: #f1f7f8; color: #164361; font-weight: 700; }
.legal-page tbody th { color: #164361; font-weight: 700; }

.not-found-page { min-height: 66vh; padding: clamp(10rem, 14vw, 18rem) 0; background: linear-gradient(135deg, #f1f7f8 0%, #fff 72%); }
.not-found-page__inner { max-width: 90rem; }
.not-found-page__code,
.server-not-found__code { margin-bottom: 1rem; color: #8c6046; font-size: 2rem; font-weight: 700; letter-spacing: .18em; }
.not-found-page .nhk-eyebrow,
.server-not-found .nhk-eyebrow { color: #587246; }
.not-found-page h1,
.server-not-found h1 { max-width: 76rem; margin-top: 1.5rem; }
.not-found-page h1 + p,
.server-not-found h1 + p { max-width: 68rem; margin-top: 2rem; color: #526b77; font-size: 1.8rem; line-height: 1.65; }
.not-found-page .nhk-actions,
.server-not-found__actions { display: flex; flex-wrap: wrap; gap: 1.2rem; margin-top: 3rem; }
.not-found-page nav { display: flex; flex-wrap: wrap; gap: 2.4rem; margin-top: 4rem; }
.not-found-page nav a { color: #164361; font-size: 1.45rem; font-weight: 700; text-decoration: underline; text-underline-offset: .25em; }

.server-not-found { min-height: 100vh; display: grid; place-items: center; padding: 4rem 2rem; background: linear-gradient(135deg, #f1f7f8 0%, #fff 72%); color: #263b47; }
.server-not-found__inner { width: min(100%, 96rem); }
.server-not-found__logo { display: inline-block; margin-bottom: clamp(7rem, 10vw, 12rem); }
.server-not-found__logo img { width: min(36.6rem, 82vw); height: auto; }

@media (max-width: 899px) {
    .legal-page__layout { grid-template-columns: 1fr; }
    .legal-page__toc { position: static; }
}

@media (max-width: 640px) {
    .utility-page__header { padding-top: 6.5rem; }
    .utility-page__header .site-breadcrumb { margin-bottom: 3rem; }
    .legal-page__layout { padding-top: 4.5rem; }
    .legal-page__toc { padding: 2.2rem; }
    .legal-page__content section + section { margin-top: 4rem; padding-top: 4rem; }
    .not-found-page .nhk-actions,
    .server-not-found__actions { align-items: stretch; flex-direction: column; }
    .not-found-page .nhk-button,
    .server-not-found .nhk-button { justify-content: center; width: 100%; }
}
