.policy-page {
  --policy-glint: color-mix(in srgb, var(--accent) 38%, var(--line));
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}

.policy-main {
  padding-block: clamp(1.5rem, 4vw, 3.5rem) clamp(3rem, 8vw, 7rem);
}

.policy-back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: .55rem;
  margin-bottom: 1rem;
  padding-inline: .9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: .875rem;
  font-weight: 630;
  text-decoration: none;
}

.policy-back span { font-size: 1.12em; }

.policy-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(1.3rem, 5vw, 4rem);
  border: 1px solid var(--line);
  border-radius: clamp(1.5rem, 4vw, 2.75rem);
  background:
    radial-gradient(ellipse at 88% 110%, rgb(var(--light) / .14), transparent 65%),
    color-mix(in srgb, var(--paper), var(--accent) 5%);
  box-shadow: inset 0 1px rgb(255 255 255 / .12);
}

.policy-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset-block-start: -40%;
  inset-inline-end: -4%;
  width: min(59%, 36rem);
  aspect-ratio: 1;
  border-radius: 48% 52% 54% 46% / 49% 46% 54% 51%;
  transform: rotate(-19deg);
  opacity: .72;
  background:
    radial-gradient(ellipse at 39% 25%, #fff3e9 0%, #fae5f0b8 13%, transparent 42%),
    radial-gradient(ellipse at 77% 23%, #f9cb8f 0%, #edab907d 34%, transparent 59%),
    radial-gradient(ellipse at 36% 89%, #89c3d1 5%, #afd5dd99 35%, transparent 61%),
    linear-gradient(140deg, #ecc6f2 10%, #b499de 59%, #e5b9b3 100%);
  box-shadow: inset -16px -19px 60px #6d4e9d59, inset 2px 3px 12px #fff9, 0 1.2rem 4rem #8c6cbd40;
}

.policy-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(106deg, var(--paper) 30%, rgb(var(--sky) / .88) 52%, rgb(var(--sky) / .12) 87%);
}

.policy-hero h1 {
  max-width: 15ch;
  font-size: clamp(2.5rem, 6vw, 5.9rem);
  line-height: .98;
  font-weight: 660;
  letter-spacing: -.065em;
  text-wrap: balance;
}

.policy-hero .date {
  display: inline-block;
  margin-block: 1rem 1.15rem;
  padding: .25rem .7rem;
  border: 1px solid var(--policy-glint);
  border-radius: 999px;
  background: var(--paper);
  color: var(--muted);
  font-size: .82rem;
  font-weight: 570;
}

.policy-lede {
  max-width: 56ch;
  color: var(--muted);
  font-size: clamp(1rem, 1.65vw, 1.2rem);
  line-height: 1.6;
  text-wrap: pretty;
}

.policy-body {
  display: grid;
  grid-template-columns: minmax(11rem, .37fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(1.5rem, 5vw, 5.25rem);
  margin-block-start: clamp(1.5rem, 5vw, 4rem);
}

.policy-contents {
  position: sticky;
  top: 6.5rem;
  display: block;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background:
    linear-gradient(145deg, rgb(var(--light) / .08), transparent 69%),
    color-mix(in srgb, var(--paper), var(--accent) 5%);
  box-shadow: inset 0 1px rgb(255 255 255 / .1);
}

.policy-contents p {
  padding: .12rem .6rem .45rem;
  color: var(--muted);
  font-weight: 640;
  font-size: .84rem;
}

.policy-contents ul {
  list-style: none;
  padding: 0;
}

.policy-contents a {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: .4rem .6rem;
  border-radius: .75rem;
  font-size: .9rem;
  line-height: 1.3;
  text-decoration: none;
}

.policy-contents a::before {
  content: "";
  position: absolute;
  inset: .6rem auto .6rem 1px;
  width: 2px;
  border-radius: 999px;
  background: var(--accent);
  opacity: 0;
}

.policy-contents a:hover,
.policy-contents a:focus-visible,
.policy-back:hover {
  color: var(--ink);
  background: color-mix(in srgb, var(--accent) 9%, var(--paper));
}

.policy-contents a:focus-visible { outline-offset: -2px; }
.policy-contents a:is(:hover, :focus-visible)::before { opacity: 1; }

.policy-articles {
  width: 100%;
  max-width: 68ch;
  font-size: clamp(1rem, 1.45vw, 1.1rem);
  line-height: 1.7;
  overflow-wrap: break-word;
}

.policy-articles section {
  position: relative;
  scroll-margin-block-start: 8rem;
  padding-block: clamp(1.4rem, 3vw, 2.65rem);
  border-bottom: 1px solid var(--line);
}

.policy-articles section::before {
  content: "";
  position: absolute;
  inset: .1rem auto auto -.7rem;
  width: 3px;
  height: 2.1rem;
  border-radius: 999px;
  background: var(--accent);
  opacity: 0;
}

.policy-articles section:target::before { opacity: 1; }

.policy-articles section:first-child { padding-top: .1rem; }
.policy-articles section:last-child { padding-bottom: 0; border-bottom: 0; }

.policy-articles h2 {
  margin-bottom: .76rem;
  font-size: clamp(1.45rem, 2.5vw, 2.3rem);
  letter-spacing: -.04em;
  line-height: 1.13;
  text-wrap: balance;
}

.policy-articles section:target h2 {
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent), var(--ink) 35%);
  text-underline-offset: .22em;
  text-decoration-thickness: .09em;
}

.policy-articles p + p,
.policy-articles li + li { margin-top: .85rem; }
.policy-articles ul { padding-inline-start: 1.25rem; }
.policy-articles li { padding-inline-start: .3rem; }
.policy-articles li::marker { color: var(--muted); }
.policy-articles a { text-decoration-thickness: .07em; }
.policy-articles a:hover { text-decoration-thickness: .12em; }
.policy-page .foot [aria-current="page"] { text-decoration: underline; }

@keyframes policy-arrival {
  from { opacity: .78; transform: translateY(.65rem); }
}

@keyframes policy-hero-arrival {
  from { opacity: .8; transform: translateY(.55rem) scale(.992); }
}

@keyframes policy-opal-arrival {
  from { opacity: 0; transform: translate(9%, -8%) rotate(-32deg) scale(.91); }
}

@keyframes policy-target-arrival {
  from { transform: scaleY(.28); }
}

@media (prefers-reduced-motion: no-preference) {
  .policy-hero { animation: policy-hero-arrival .78s var(--site-ease) backwards; }
  .policy-hero::before { animation: policy-opal-arrival 1.45s var(--site-ease) 80ms backwards; }
  .policy-hero :is(h1, .date, .policy-lede), .policy-back, .policy-contents {
    animation: policy-arrival .64s var(--site-ease) backwards;
  }
  .policy-hero h1 { animation-delay: 80ms; }
  .policy-hero .date { animation-delay: 120ms; }
  .policy-hero .policy-lede { animation-delay: 175ms; }
  .policy-contents { animation-delay: 240ms; }
  .policy-contents a, .policy-back {
    transition: color .2s ease, background-color .2s ease, border-color .2s ease;
  }
  .policy-back span { transition: transform .24s var(--site-ease); }
  .policy-back:is(:hover, :focus-visible) span { transform: translateX(-.2rem); }
  .policy-contents a::before {
    transform: scaleY(.26);
    transition: opacity .2s ease, transform .28s var(--site-ease);
  }
  .policy-contents a:is(:hover, :focus-visible)::before { transform: scaleY(1); }
  .policy-articles section:target::before {
    transform-origin: top;
    animation: policy-target-arrival .48s var(--site-ease);
  }
}

@media (max-width: 49rem) {
  .policy-body { grid-template-columns: minmax(0, 1fr); }
  .policy-contents { position: static; }
  .policy-contents ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .25rem; }
  .policy-hero::before { inset-block-start: -15%; inset-inline-end: -13%; width: 73%; opacity: .58; }
  .policy-hero::after { background: linear-gradient(117deg, var(--paper) 37%, rgb(var(--sky) / .85) 62%, rgb(var(--sky) / .36) 100%); }
  .policy-articles section::before { inset-inline-start: -.55rem; }
}

@media (prefers-contrast: more), (prefers-reduced-transparency: reduce), (forced-colors: active) {
  .policy-hero::before, .policy-hero::after { display: none; }
}
