/* Legal reading surfaces share the landing page's foundations and mascot. */
.doc-nav .nav-inner {
  justify-content: space-between;
}

.doc-nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--basil);
  font-size: 14px;
  text-align: right;
}

.doc-nav a:hover {
  color: var(--pressed);
}

.doc {
  max-width: 820px;
  margin: 0 auto;
  padding: 72px var(--gutter) 48px;
  overflow-wrap: anywhere;
}

.doc__title {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -.025em;
  text-wrap: balance;
}

.doc__meta,
.doc__translation-note {
  margin-top: 18px;
  color: var(--sage);
  font-size: 14px;
  line-height: 1.7;
}

.doc__summary {
  margin: 32px 0 44px;
  padding: 24px 28px;
  border-radius: 16px;
  background: var(--wash);
  font-size: 17px;
  line-height: 1.75;
}

.doc__summary strong {
  font-weight: 600;
}

.doc__body {
  font-size: 17px;
  line-height: 1.8;
}

.doc__body h2 {
  margin: 40px 0 14px;
  font-size: 25px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -.015em;
  text-wrap: balance;
}

.doc__body h2:first-child {
  margin-top: 0;
}

.doc__body p {
  margin-bottom: 16px;
}

.doc__body a,
.doc__translation-note a {
  color: var(--basil);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.doc__body a:hover,
.doc__translation-note a:hover {
  color: var(--pressed);
}

.doc__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--sage);
  font-size: 13px;
  line-height: 1.6;
}

.doc__footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
}

.doc__footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--basil);
}

.doc__footer-links a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

:lang(ja) .doc__title,
:lang(ja) .doc__body h2 {
  letter-spacing: 0;
  line-height: 1.5;
}

@media (max-width: 620px) {
  :root { --gutter: 24px; }
  .doc { padding-top: 44px; }
  .doc-nav .nav-inner { gap: 16px; }
  .doc-nav__link { font-size: 13px; }
  .doc__summary { padding: 20px; font-size: 16px; }
  .doc__body { font-size: 16px; }
  .doc__body h2 { font-size: 22px; }
  .doc__footer { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
