.terms-page {
  --terms-spruce: #10251c;
  --terms-ivory: #f7f4ea;
  --terms-line: #e1e3d6;
  background: var(--terms-ivory);
}
.terms-header { background: var(--forest); color: var(--white); }
.terms-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  min-height: 4.3rem;
  border-bottom: 1px solid #ffffff17;
}
.terms-header-inner .button { min-height: 2.75rem; }
:is(.terms-header, .terms-hero) :focus-visible { outline-color: var(--lime); }
.terms-hero {
  padding-block: clamp(.9rem, 2.6vw, 2rem) clamp(1.3rem, 4vw, 3.2rem);
  background: radial-gradient(ellipse at 86% 10%, #1a392a, transparent 64%), var(--forest);
  color: #fbf6e8;
}
.terms-cover {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  min-height: clamp(24rem, 37vw, 30rem);
  overflow: hidden;
  border: 1px solid #c9d8b747;
  border-radius: clamp(1.25rem, 3.4vw, 2.2rem);
  background: var(--terms-spruce);
  box-shadow: 0 1rem 2.9rem #020a0769;
}
.terms-cover-art { position: absolute; z-index: -2; inset: 0 0 0 18%; }
.terms-cover-art img { width: 100%; height: 100%; object-fit: cover; object-position: center 54%; }
.terms-cover::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, #10251c 13%, #10251cf6 30%, #10251cb8 46%, #10251c28 65%, transparent 81%);
  content: "";
}
.terms-cover-copy { width: min(100%, 45rem); padding: clamp(1.65rem, 3.45vw, 3.2rem) clamp(1.8rem, 5vw, 4.8rem); }
.terms-cover-copy .eyebrow { margin-bottom: .9rem; color: #dcee9f; }
.terms-cover h1 { max-width: 11ch; margin-bottom: 1rem; font-size: clamp(2.85rem, 5.4vw, 5.45rem); }
.terms-cover .terms-description { max-width: 32ch; color: #e2ebdc; font-size: clamp(1rem, 1.6vw, 1.18rem); }
.terms-cover .terms-version {
  width: fit-content;
  max-width: 100%;
  margin-top: 1rem;
  padding: .37rem .66rem;
  border: 1px solid #d7e6c33d;
  border-radius: .6rem;
  background: #10251cb3;
  color: #e0e9d8;
  font-size: .83rem;
}
.terms-read { gap: .6rem; margin-top: 1.2rem; }
.terms-read span { font-size: 1.15em; }

.terms-layout {
  display: grid;
  grid-template-columns: minmax(13rem, .9fr) minmax(0, 2.65fr);
  align-items: start;
  gap: clamp(1rem, 3.4vw, 3rem);
  padding-block: clamp(1.7rem, 4.5vw, 4rem);
}
.terms-nav {
  position: sticky;
  top: 1rem;
  max-height: calc(100dvh - 2rem);
  overflow: auto;
  padding: 1.15rem;
  border: 1px solid #d3ddd0;
  border-radius: 1.35rem;
  background: #ecf0e6;
  scrollbar-width: thin;
}
.terms-nav h2 {
  margin: .22rem .66rem .85rem;
  color: #203e2e;
  font-size: 1.43rem;
  line-height: 1.16;
  letter-spacing: -.04em;
}
.terms-nav ul { display: grid; gap: .2rem; list-style: none; padding: 0; }
.terms-nav a {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  padding: .55rem .66rem;
  border: 1px solid transparent;
  border-radius: .7rem;
  color: #314a3a;
  font-size: .94rem;
  font-weight: 620;
  line-height: 1.25;
}
.terms-nav a:hover { background: #e0e9da; }
.terms-nav a[aria-current="location"] { border-color: #bfd3bb; background: #dae8d4; color: #1d3d2b; }
.terms-nav a:focus-visible { outline-offset: -2px; }

.terms-document { display: grid; min-width: 0; gap: clamp(.85rem, 2vw, 1.5rem); }
.terms-document > section {
  min-width: 0;
  scroll-margin-top: 1rem;
  padding: clamp(1.3rem, 3.4vw, 2.65rem);
  border: 1px solid var(--terms-line);
  border-radius: clamp(1.15rem, 2.6vw, 1.85rem);
  background: #fffdf7;
  box-shadow: 0 .55rem 1.65rem #35483108;
}
.terms-document > section:target { border-color: #8aa980; }
.terms-section-head {
  display: flex;
  align-items: center;
  gap: clamp(.65rem, 1.8vw, 1.15rem);
  min-width: 0;
  margin-bottom: 1.05rem;
}
.terms-section-head img {
  flex: none;
  width: clamp(3.35rem, 6vw, 5.15rem);
  height: auto;
  border: 1px solid #dde7d9;
  border-radius: .95rem;
  background: radial-gradient(ellipse at 50% 30%, #f2f7e9, #e1eadc);
}
.terms-section-head h2 {
  color: #193b2b;
  font-size: clamp(1.5rem, 3.1vw, 2.75rem);
  letter-spacing: -.048em;
  line-height: 1.05;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.terms-document :is(p, li, dd, blockquote) { max-width: 76ch; color: #36473d; line-height: 1.65; }
.terms-document p + p { margin-top: .8rem; }
.terms-document a:not(.button) { color: #285937; font-weight: 650; text-decoration: underline; text-underline-offset: .2em; }
.terms-document a:not(.button):hover { color: #0d3723; }
.terms-document ol { display: grid; gap: .55rem; padding-left: 1.4rem; margin-block: .1rem .8rem; }
.terms-document li { padding-left: .25rem; }
.terms-document li::marker { color: #3e6238; font-weight: 750; }

.terms-table-wrap {
  container-type: inline-size;
  width: 100%;
  overflow-x: auto;
  margin: .15rem 0 1rem;
  border-radius: .76rem;
  scrollbar-color: #929f85 #eef0e7;
}
.terms-table-wrap table { width: 100%; min-width: 27rem; border-collapse: separate; border-spacing: 0; text-align: left; }
.terms-table-wrap caption { text-align: start; font-size: .9rem; color: #506155; }
.terms-table-wrap caption span { display: block; width: min(100%, 100cqi); padding: 0 .2rem .65rem 0; }
.terms-table-wrap th, .terms-table-wrap td {
  padding: .68rem .72rem;
  border-bottom: 1px solid #e1e8da;
  vertical-align: top;
  font-size: .93rem;
  line-height: 1.42;
}
.terms-table-wrap thead th { background: #e1eadc; color: #1c412d; }
.terms-table-wrap thead th:first-child { border-start-start-radius: .69rem; }
.terms-table-wrap thead th:last-child { border-start-end-radius: .69rem; }
.terms-table-wrap tbody tr { --term-row: #f7f9f2; }
.terms-table-wrap tbody tr:nth-child(even) { --term-row: #edf3e9; }
.terms-table-wrap tbody :is(th, td) { background: var(--term-row); }
.terms-table-wrap tbody th { color: #204632; }
.terms-table-wrap tr > :first-child { position: sticky; left: 0; min-width: 7.15rem; box-shadow: 1px 0 #dde6d8; }
.terms-definitions { display: grid; gap: .75rem; margin: .65rem 0 1rem; }
.terms-definitions > div {
  padding: .82rem .95rem;
  border: 1px solid #e0e8da;
  border-radius: .84rem;
  background: #f3f6ed;
}
.terms-definitions dt { color: #234a34; font-weight: 740; }
.terms-definitions dd { margin-top: .22rem; }
.terms-document .terms-sources { font-size: .92rem; color: #506155; }
.terms-document > #acknowledgement {
  background: linear-gradient(90deg, #faf5e9 23%, #faf5e9ec 60%, #faf5e968),
    #faf5e9 url("../assets/terms-refresh/ack-paper.webp") right center / cover no-repeat;
}
.terms-document blockquote {
  margin: .8rem 0;
  padding: .9rem 1rem;
  border-left: 3px solid #567d46;
  border-radius: 0 .65rem .65rem 0;
  background: #e7efde;
  color: #21422d;
  font-weight: 690;
}
.terms-back { margin-top: 1.15rem; background: #264c34; color: #f1f7ec; }
.terms-back:hover { background: #315d3f; }

@media (max-width: 830px) {
  .terms-layout { grid-template-columns: minmax(0, 1fr); }
  .terms-nav { position: static; max-height: none; }
  .terms-nav ul { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .3rem; }
}
@media (max-width: 620px) {
  .terms-cover { min-height: 0; }
  .terms-cover-copy { padding: 1.55rem 1.2rem 1.1rem; }
  .terms-cover h1 { font-size: clamp(2.2rem, 8.5vw, 3.4rem); }
  .terms-cover-art { position: relative; inset: auto; order: 1; height: clamp(10.8rem, 48vw, 16rem); }
  .terms-cover-art::after {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, #10251c 0%, #10251c27 32%, transparent 59%);
    content: "";
  }
  .terms-cover::after { display: none; }
  .terms-cover-art img { object-position: 50% 57%; }
  .terms-nav { padding: .75rem; }
  .terms-nav h2 { margin-left: .45rem; }
  .terms-nav a { padding-inline: .4rem; font-size: .87rem; }
  .terms-document > section { padding: 1.05rem; }
  .terms-table-wrap caption { font-size: .87rem; }
  .terms-table-wrap tr > :first-child { min-width: 6rem; }
}
@media (max-width: 360px) {
  .terms-header-inner .button { padding-inline: .72rem; font-size: .88rem; }
  .terms-section-head img { width: 2.9rem; }
}
