:root {
  --bg: #f2efe6;
  --bg-deep: #e7e1d2;
  --ink: #18241f;
  --muted: #5c6b63;
  --accent: #0f7a62;
  --accent-hover: #0b6350;
  --line: color-mix(in srgb, var(--ink) 14%, transparent);
  --font-display: "Unbounded", "Manrope", system-ui, sans-serif;
  --font: "Manrope", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  touch-action: manipulation;
  -webkit-tap-highlight-color: color-mix(in srgb, var(--accent) 18%, transparent);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 0;
  z-index: 20;
  transform: translateY(-120%);
  padding: 0.55rem 0.85rem;
  border-radius: 0.5rem;
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus {
  transform: translateY(0.75rem);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.atmosphere__wash {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(90% 70% at 8% -10%, #d9efe6 0%, transparent 55%),
    radial-gradient(70% 55% at 100% 8%, #efe3c8 0%, transparent 48%),
    linear-gradient(165deg, var(--bg) 0%, var(--bg-deep) 100%);
}

.atmosphere__gate {
  position: absolute;
  left: 72%;
  top: 12%;
  width: min(48vw, 22rem);
  height: min(48vw, 22rem);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, #fff 35%, transparent),
    0 0 0 22px color-mix(in srgb, var(--accent) 5%, transparent);
  opacity: 0.4;
  animation: gate-breathe 14s var(--ease) infinite;
}

.atmosphere__gate::before,
.atmosphere__gate::after {
  content: "";
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
}

.atmosphere__gate::after {
  inset: 34%;
  border-color: color-mix(in srgb, var(--accent) 28%, transparent);
}

.atmosphere__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(28px);
  opacity: 0.45;
  animation: orb-drift 20s var(--ease) infinite alternate;
}

.atmosphere__orb--a {
  width: 16rem;
  height: 16rem;
  left: -3rem;
  bottom: 12%;
  background: #b8e4d4;
}

.atmosphere__orb--b {
  width: 12rem;
  height: 12rem;
  right: -2rem;
  top: 28%;
  background: #f0d7a8;
  animation-duration: 24s;
  animation-direction: alternate-reverse;
}

.page {
  position: relative;
  z-index: 1;
  width: min(52rem, calc(100% - 2.5rem));
  margin: 0 auto;
  padding:
    max(1.5rem, env(safe-area-inset-top))
    max(0, env(safe-area-inset-right))
    max(2.5rem, env(safe-area-inset-bottom))
    max(0, env(safe-area-inset-left));
}

.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.25rem 1.75rem;
  flex-wrap: wrap;
  padding: 0.75rem 0 1.5rem;
  animation: rise-in 0.65s var(--ease) both;
}

.brand {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 4vw, 1.95rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
  transition: color 0.18s var(--ease);
}

.brand:hover {
  color: var(--accent);
}

.brand:focus-visible,
.site-nav a:focus-visible,
.document a:focus-visible,
.site-footer a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 0.2rem;
}

.site-nav {
  display: flex;
  gap: 0.35rem 1.1rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.15rem 0;
  border-bottom: 1px solid transparent;
  transition:
    color 0.18s var(--ease),
    border-color 0.18s var(--ease);
}

.site-nav a:hover {
  color: var(--ink);
}

.site-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: color-mix(in srgb, var(--accent) 55%, transparent);
}

.document {
  max-width: 42rem;
  margin: 0 auto 2.5rem;
  animation: rise-in 0.75s var(--ease) 0.06s both;
}

.eyebrow {
  margin: 0 0 0.65rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1 {
  font-family: var(--font-display);
  margin: 0 0 1.35rem;
  font-size: clamp(1.55rem, 4.2vw, 2.15rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
  color: var(--ink);
  scroll-margin-top: 1.25rem;
}

h2 {
  font-family: var(--font-display);
  margin: 1.85rem 0 0.7rem;
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.35;
  color: var(--ink);
  scroll-margin-top: 1.25rem;
  text-wrap: balance;
}

.document > p:first-of-type {
  font-size: 1.02rem;
}

p,
li {
  color: var(--muted);
}

p {
  margin: 0 0 0.85rem;
  text-wrap: pretty;
}

ul {
  margin: 0 0 1rem;
  padding-left: 1.15em;
}

li {
  margin: 0 0 0.4rem;
}

strong {
  color: var(--ink);
  font-weight: 650;
}

.document a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.18s var(--ease);
  overflow-wrap: anywhere;
}

.document a:hover {
  color: var(--accent-hover);
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 0 0 1.15rem;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

table {
  width: 100%;
  min-width: 28rem;
  border-collapse: collapse;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

th,
td {
  border: 1px solid var(--line);
  padding: 0.65rem 0.75rem;
  text-align: left;
  vertical-align: top;
  color: var(--muted);
}

th {
  color: var(--ink);
  background: color-mix(in srgb, var(--accent) 8%, #fff);
  font-weight: 650;
}

.site-footer {
  max-width: 42rem;
  margin: 0 auto;
  padding: 0 0 0.5rem;
  color: var(--muted);
  font-size: 0.85rem;
  animation: rise-in 0.8s var(--ease) 0.12s both;
}

.site-footer a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.18s var(--ease);
}

.site-footer a:hover {
  color: var(--ink);
}

.site-footer span {
  margin: 0 0.35rem;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(0.55rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes gate-breathe {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.32;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.04);
    opacity: 0.55;
  }
}

@keyframes orb-drift {
  from {
    transform: translate(0, 0);
  }
  to {
    transform: translate(1.25rem, -1rem);
  }
}

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

  .atmosphere__gate,
  .atmosphere__orb,
  .site-header,
  .document,
  .site-footer {
    animation: none !important;
  }

  .brand,
  .site-nav a,
  .document a,
  .site-footer a {
    transition: none !important;
  }
}

@media (max-width: 640px) {
  .page {
    width: min(100%, calc(100% - 2rem));
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav {
    justify-content: flex-start;
  }
}
