.doc,
.related-pages,
.cert-list {
  color: #1b2147;
  line-height: 1.6;
}

.doc *,
.doc *::before,
.doc *::after,
.related-pages *,
.related-pages *::before,
.related-pages *::after,
.cert-list *,
.cert-list *::before,
.cert-list *::after {
  box-sizing: border-box;
}

.page-head--plain + .doc,
.page-head--plain + .cert-list {
  border-top: 1px solid #e3e6f3;
}

.doc {
  padding: 56px 0 80px;
}

.doc__wrap,
.related-pages__wrap,
.cert-list__wrap {
  width: 100%;
  max-width: var(--page-max, 1920px);
  margin: 0 auto;
  padding: 0 var(--page-gutter, 24px);
}

.doc__wrap--side {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}

.doc__side {
  position: sticky;
  top: 24px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  display: grid;
  gap: 24px;
  min-width: 0;
}

.doc__body {
  min-width: 0;
  max-width: 780px;
}

.doc__section + .doc__section,
.doc__intro + .doc__section {
  margin-top: 40px;
}

.doc__section,
.doc__notice {
  scroll-margin-top: 24px;
}

.doc__body h2 {
  margin: 0 0 12px;
  color: #1b2147;
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: break-word;
}

.doc__text {
  color: #1b2147;
  font-size: 1rem;
  line-height: 1.7;
  text-align: left;
  overflow-wrap: break-word;
}

.doc__text p {
  margin: 0 0 14px;
}

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

.doc__text ul,
.doc__text ol {
  margin: 10px 0 14px;
  padding-left: 1.4em;
}

.doc__text ul {
  list-style: disc;
}

.doc__text ol {
  list-style: decimal;
}

.doc__text li {
  margin: 4px 0;
}

.doc__text strong,
.doc__text b,
.doc__text .text-bold {
  font-weight: 600;
}

.doc__text h3,
.doc__text h4 {
  margin: 20px 0 8px;
  font-size: 1.0625rem;
  font-weight: 600;
}

.doc .highlighted {
  color: #293C95;
  font-weight: 600;
}

.doc__text a,
.doc__box a,
.doc__inline-btn {
  color: #293C95;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.doc__text a:hover,
.doc__box a:hover,
.doc__inline-btn:hover {
  color: #0D3B6E;
}

.doc__inline-btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 600;
  vertical-align: middle;
  cursor: pointer;
}

.doc a:focus-visible,
.doc button:focus-visible,
.doc summary:focus-visible,
.related-card:focus-visible,
.cert-list a:focus-visible {
  outline: 2px solid #c9a227;
  outline-offset: 2px;
}

.doc__notice {
  margin: 0 0 40px;
  padding: 20px 24px;
  background: #f2f2ff;
  border: 1px solid #293C95;
  border-radius: 12px;
}

.doc__notice h2 {
  margin-bottom: 8px;
  font-size: 1.125rem;
}

.doc-toc {
  background: #fff;
  border: 1px solid #e3e6f3;
  border-radius: 12px;
}

.doc-toc__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 12px 20px 4px;
  color: #1b2147;
  font-size: 1rem;
  font-weight: 600;
  list-style: none;
  cursor: default;
}

.doc-toc__title::-webkit-details-marker {
  display: none;
}

.doc-toc__list {
  margin: 0;
  padding: 4px 12px 16px;
  list-style: none;
}

.doc-toc__list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 10px;
  border-left: 2px solid transparent;
  color: #646c8f;
  font-size: 0.9375rem;
  line-height: 1.4;
  text-decoration: none;
}

.doc-toc__list a:hover,
.doc-toc__list a[aria-current="true"] {
  border-left-color: #c9a227;
  color: #293C95;
}

.doc__box {
  padding: 20px;
  background: #f2f2ff;
  border-radius: 12px;
  font-size: 0.9375rem;
  line-height: 1.6;
}

.doc__box-title {
  margin: 0 0 8px;
  font-weight: 600;
}

.related-pages {
  padding: 72px 0;
  background: #f2f2ff;
}

.related-pages__title {
  margin: 0 0 28px;
  color: #1b2147;
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.25;
}

.related-pages__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.related-pages__grid li {
  display: flex;
  min-width: 0;
}

.related-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  padding: 24px;
  background: #fff;
  border: 1px solid #e3e6f3;
  border-radius: 12px;
  color: #1b2147;
  text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.related-card:hover {
  border-color: #293C95;
  box-shadow: 0 18px 36px -12px rgba(41, 60, 149, 0.18);
}

.related-card__title {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: break-word;
}

.related-card__text {
  color: #646c8f;
  font-size: 0.9375rem;
  line-height: 1.55;
}

.related-card__more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 12px;
  color: #293C95;
  font-weight: 600;
}

.cert-list {
  padding: 56px 0 80px;
}

.cert-list__intro {
  max-width: 780px;
  margin: 0 0 32px;
  color: #646c8f;
  font-size: 1.0625rem;
}

.cert-list__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cert-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  padding: 28px;
  background: #fff;
  border: 1px solid #e3e6f3;
  border-radius: 12px;
}

.cert-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #f2f2ff;
  color: #293C95;
}

.cert-card__thumb img {
  display: block;
  max-width: 100%;
  max-height: 220px;
  height: auto;
  border: 1px solid #e3e6f3;
  border-radius: 8px;
}

.cert-card h2 {
  margin: 0;
  color: #1b2147;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: break-word;
}

.cert-card__issuer,
.cert-card__dates {
  margin: 0;
  color: #646c8f;
  font-size: 0.9375rem;
}

.cert-card__dates {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
}

.cert-card__dates strong {
  color: #1b2147;
  font-weight: 600;
}

.cert-card__desc {
  margin: 0;
  color: #646c8f;
  font-size: 0.9375rem;
  line-height: 1.65;
}

.cert-card__action {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-top: auto;
  padding: 0 18px;
  border: 1.5px solid #293C95;
  border-radius: 8px;
  color: #293C95;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.cert-card__action:hover {
  background: #293C95;
  color: #fff;
}

.cert-card__action--primary {
  background: #293C95;
  color: #fff;
}

.cert-card__action--primary:hover {
  background: #0D3B6E;
  border-color: #0D3B6E;
}

.imprint {
  max-width: 820px;
  padding: 32px;
  background: #fff;
  border: 1px solid #e3e6f3;
  border-radius: 12px;
}

.imprint h2 {
  margin: 0 0 20px;
  color: #1b2147;
  font-size: 1.375rem;
  font-weight: 600;
}

.imprint__group {
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
  gap: 10px 32px;
  margin: 0;
  padding: 18px 0;
  border-top: 1px solid #e3e6f3;
}

.imprint__group:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.imprint__group dt {
  color: #646c8f;
  font-size: 0.9375rem;
}

.imprint__group dd {
  margin: 0;
  color: #1b2147;
  overflow-wrap: anywhere;
}

.imprint__group a {
  color: #293C95;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.license-list {
  margin: 10px 0 0;
  padding-left: 1.4em;
  list-style: disc;
}

.license-list li {
  margin: 6px 0;
}

.doc__updated {
  margin: 40px 0 0;
  color: #646c8f;
  font-size: 0.9375rem;
}

.doc__updated strong {
  color: #1b2147;
  font-weight: 600;
}

@media (max-width: 1024px) {
  .doc__wrap--side {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .doc__side {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .doc-toc__title {
    padding: 0 20px;
    cursor: pointer;
  }

  .doc-toc__title::after {
    content: "";
    flex: none;
    width: 10px;
    height: 10px;
    margin-top: -4px;
    border-right: 2px solid #293C95;
    border-bottom: 2px solid #293C95;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
  }

  .doc-toc__fold[open] .doc-toc__title::after {
    margin-top: 4px;
    transform: rotate(-135deg);
  }
}

@media (max-width: 768px) {
  .doc,
  .cert-list {
    padding: 40px 0 56px;
  }

  .doc__wrap,
  .related-pages__wrap,
  .cert-list__wrap {
    padding: 0 16px;
  }

  .doc__body h2 {
    font-size: 1.25rem;
  }

  .doc__box a,
  .imprint__group a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  .related-pages {
    padding: 48px 0;
  }

  .related-pages__title {
    font-size: 1.625rem;
  }

  .related-pages__grid,
  .cert-list__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .cert-card,
  .imprint {
    padding: 20px;
  }

  .imprint__group {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .imprint__group dd + dt {
    margin-top: 12px;
  }
}
