.lg-head {
  padding-top: calc(var(--header-h) + clamp(44px, 6.5vw, 96px));
}
.lg-head-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: end;
  gap: 22px 64px;
  display: grid;
}
.lg-head-side {
  justify-self: end;
  gap: 14px;
  max-width: 46ch;
  display: grid;
}
.lg-updated {
  color: var(--ink-3);
  font-size: 0.875rem;
  font-weight: 600;
}
.lg-note {
  border-radius: var(--r-md);
  max-width: 76ch;
  box-shadow: inset 0 0 0 1px var(--line-2);
  background: var(--bg);
  color: var(--ink-2);
  margin-top: clamp(32px, 4vw, 48px);
  padding: 13px 18px 14px;
  font-size: 0.875rem;
  line-height: 1.5;
}
.lg-body {
  grid-template-columns: minmax(200px, 270px) minmax(0, 72ch);
  justify-content: space-between;
  align-items: start;
  gap: clamp(40px, 6vw, 120px);
  margin-top: clamp(56px, 7vw, 104px);
  display: grid;
}
.toc {
  top: calc(var(--header-h) + 32px);
  position: sticky;
}
.toc-toggle {
  display: none;
}
.toc-title {
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 14px;
  font-size: 0.72rem;
  font-weight: 700;
}
.toc-rail {
  box-shadow: inset 1px 0 0 var(--line-2);
  position: relative;
}
.toc-ind {
  background: var(--green);
  width: 2px;
  height: 0;
  transition:
    transform 0.48s var(--ease),
    height 0.48s var(--ease),
    opacity var(--t) var(--ease);
  opacity: 0;
  border-radius: 1px;
  position: absolute;
  top: 0;
  left: 0;
}
.toc-ind.ready {
  opacity: 1;
}
.toc-list a {
  color: var(--ink-2);
  transition: color var(--t) var(--ease);
  gap: 10px;
  padding: 7px 0 7px 18px;
  font-size: 0.9375rem;
  line-height: 1.35;
  text-decoration: none;
  display: flex;
}
.toc-list a:hover {
  color: var(--ink);
}
.toc-list a[aria-current="true"] {
  color: var(--green-deep);
  font-weight: 650;
}
.toc-n {
  width: 1.6em;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  transition: color var(--t) var(--ease);
  flex: none;
  padding-top: 1px;
  font-size: 0.8125rem;
  font-weight: 700;
}
.toc-list a[aria-current="true"] .toc-n {
  color: var(--green-2);
}
.prose {
  counter-reset: sec;
  max-width: 72ch;
  font-size: 1.0625rem;
  line-height: 1.7;
}
.prose section {
  counter-increment: sec;
  scroll-margin-top: 8px;
}
.prose section + section {
  border-top: 1px solid var(--line);
  margin-top: clamp(44px, 5vw, 64px);
  padding-top: clamp(28px, 3vw, 36px);
}
.prose h2 {
  font-family: var(--f-display);
  text-transform: uppercase;
  color: var(--green-deep);
  align-items: baseline;
  gap: 14px;
  margin-bottom: 16px;
  font-size: clamp(1.75rem, 1.4rem + 1vw, 2.35rem);
  font-weight: 800;
  line-height: 0.95;
  display: flex;
}
.prose h2:before {
  content: counter(sec, decimal-leading-zero);
  color: var(--green-2);
  letter-spacing: 0.02em;
  flex: none;
  font-size: 0.56em;
  transform: translateY(-0.12em);
}
.prose h3 {
  font-family: var(--f-body);
  color: var(--ink);
  margin: 24px 0 6px;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.4;
}
.prose p + p,
.prose p + ul,
.prose ul + p {
  margin-top: 14px;
}
.prose ul {
  gap: 8px;
  margin-top: 12px;
  display: grid;
}
.prose li {
  padding-left: 20px;
  position: relative;
}
.prose li:before {
  content: "";
  background: var(--green-2);
  border-radius: 50%;
  width: 6px;
  height: 6px;
  position: absolute;
  top: 0.7em;
  left: 2px;
}
.prose strong {
  font-weight: 700;
}
.prose a {
  color: var(--green-deep);
  text-underline-offset: 3px;
  transition: text-decoration-color var(--t) var(--ease);
  font-weight: 600;
  text-decoration: underline 1px #124a2f66;
}
.prose a:hover {
  text-decoration-color: currentColor;
}
.prose dl {
  grid-template-columns: max-content 1fr;
  gap: 8px 24px;
  margin-top: 14px;
  display: grid;
}
.prose dt {
  font-weight: 700;
}
.prose dd {
  margin: 0;
}
@media (width<=980px) {
  .lg-head-grid {
    grid-template-columns: 1fr;
  }
  .lg-head-side {
    justify-self: start;
  }
  .lg-body {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
    margin-top: 40px;
  }
  .toc {
    top: var(--header-h);
    z-index: 20;
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
    background: var(--bg);
    box-shadow:
      0 1px 0 var(--line),
      0 -1px 0 var(--line);
  }
  .toc-toggle {
    text-align: left;
    background: 0 0;
    border: 0;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 52px;
    padding: 0;
    display: flex;
  }
  .toc-toggle-k {
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-3);
    flex: none;
    font-size: 0.72rem;
    font-weight: 700;
  }
  .toc-toggle-cur {
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    color: var(--green-deep);
    flex: 1;
    font-weight: 650;
    overflow: hidden;
  }
  .toc-toggle svg {
    width: 14px;
    height: 14px;
    transition: transform var(--t) var(--ease);
    flex: none;
  }
  .toc-toggle[aria-expanded="true"] svg {
    transform: rotate(180deg);
  }
  .toc-panel {
    padding-inline: var(--gutter);
    background: var(--bg);
    box-shadow: 0 1px 0 var(--line);
    transition:
      grid-template-rows 0.42s var(--ease),
      visibility 0s linear 0.42s;
    visibility: hidden;
    grid-template-rows: 0fr;
    display: grid;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
  }
  .toc.open .toc-panel {
    visibility: visible;
    transition:
      grid-template-rows 0.42s var(--ease),
      visibility 0s;
    grid-template-rows: 1fr;
  }
  .toc-panel-in {
    min-height: 0;
    max-height: calc(100svh - var(--header-h) - 72px);
    opacity: 0;
    transition: opacity 0.26s var(--ease);
    overflow: auto;
  }
  .toc.open .toc-panel-in {
    opacity: 1;
    transition-delay: 80ms;
  }
  .toc-title {
    display: none;
  }
  .toc-rail {
    margin: 6px 0 16px;
  }
  .toc-list a {
    align-items: center;
    min-height: 44px;
    padding: 6px 0 6px 16px;
  }
  .toc-n {
    padding-top: 0;
  }
  .prose section {
    scroll-margin-top: 56px;
  }
}
@media (width<=700px) {
  .lg-head {
    padding-top: calc(var(--header-h) + 36px);
  }
  .prose {
    font-size: 1rem;
  }
  .prose dl {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .prose dd + dt {
    margin-top: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .toc-ind,
  .toc-panel,
  .toc-panel-in {
    transition: none;
  }
}
