/* agentevo.sh legal pages (privacy/, terms/). Tokens live in tokens.css (load it first).
 * One reading column, the same canvas, lockup and link voice as the homepage. No JS. */

*, *::before, *::after { box-sizing: border-box }
/* In-page links land a section 88px from the top, just below the sticky header
 * (scroll-padding here only: a scroll-margin on the sections too would add up). */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg-0); scroll-padding-top: 88px }
body { margin: 0; min-height: 100vh; background: var(--bg-0); color: var(--fg-0); font-family: var(--font-sans); font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: clip }
a { color: inherit; text-decoration: none }
h1, h2, h3 { margin: 0; font-weight: 500; text-wrap: balance }
p, ul, ol { margin: 0; text-wrap: pretty }
code { padding: 1px 5px; border: 1px solid var(--line); border-radius: var(--r-xs); background: var(--bg-2); font: 400 13px/1.5 var(--font-mono); overflow-wrap: anywhere }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px }
::selection { background: rgba(91, 208, 138, 0.28); color: var(--fg-0) }
.skip { position: fixed; top: 12px; left: 12px; z-index: var(--z-skip); display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: var(--r-pill); background: var(--fg-0); color: var(--bg-0); font: 500 14px/1 var(--font-sans); transform: translateY(-160%); transition: transform var(--d-fast) var(--ease-out) }
.skip:focus { transform: none }
.lg-wrap { width: min(760px, 100% - 2 * var(--gutter)); margin-inline: auto }

/* Header: the lockup and a quiet way home. Solid, not translucent: nothing scrolls under it. */
.lg-head { position: sticky; top: 0; z-index: var(--z-nav); border-bottom: 1px solid var(--line); background: var(--bg-0) }
.lg-head .lg-wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--fg-0) }
.brand .mark { width: 20px; height: 20px }
.wordmark { font: 500 17px/1 var(--font-sans); letter-spacing: -0.03em }
.lg-nav { display: flex; flex-wrap: wrap; gap: 0 4px }
.lg-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; border-radius: var(--r-pill); font-size: 14px; color: var(--fg-1); transition: color var(--d-instant) ease }
.lg-nav a:hover, .lg-nav a[aria-current="page"] { color: var(--fg-0) }

/* Document */
.lg-main { padding: 72px 0 96px }
.lg-kicker { font: 500 11px/1.3 var(--font-mono); letter-spacing: var(--tr-label); text-transform: uppercase; color: var(--fg-2) }
.lg-main h1 { margin-top: 16px; font-size: clamp(36px, 3vw + 20px, 52px); font-weight: 400; line-height: 1.02; letter-spacing: -0.04em }
.lg-meta { margin-top: 16px; font-size: 13px; color: var(--fg-2); font-variant-numeric: tabular-nums }
.lg-lede { margin-top: 28px; font-size: 18px; line-height: 1.6; letter-spacing: -0.005em; color: var(--fg-1) }
.lg-toc { margin-top: 40px; padding: 20px 0; border-block: 1px solid var(--line) }
.lg-toc ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 24px; padding: 0; list-style: none; counter-reset: toc }
.lg-toc li { counter-increment: toc }
.lg-toc a { display: inline-flex; gap: 10px; min-height: 36px; align-items: center; font-size: 15px; color: var(--fg-1); transition: color var(--d-instant) ease }
.lg-toc a::before { content: counter(toc, decimal-leading-zero); font: 500 11px/1 var(--font-mono); color: var(--fg-2); font-variant-numeric: tabular-nums }
.lg-toc a:hover { color: var(--fg-0) }
.lg-main section { margin-top: 56px }
.lg-main h2 { font-size: 22px; line-height: 1.3; letter-spacing: -0.015em }
.lg-main h3 { margin-top: 28px; font-size: 16px; line-height: 1.4 }
/* 68ch of Geist, in em: a ch measure narrows while the fallback font shows and reflows on the swap. */
.lg-main section p, .lg-main section ul { margin-top: 14px; max-width: 45.084em; color: var(--fg-1) }
.lg-main section ul { padding-left: 0; list-style: none; display: grid; gap: 10px }
.lg-main section li { position: relative; padding-left: 20px }
.lg-main section li::before { content: ""; position: absolute; left: 2px; top: 0.8em; width: 8px; height: 1px; background: var(--fg-2) }
.lg-main strong { font-weight: 500; color: var(--fg-0) }
.lg-main section a, .lg-lede a { color: var(--fg-0); text-decoration: underline; text-decoration-color: var(--line-hover); text-decoration-thickness: 1px; text-underline-offset: 4px; transition: text-decoration-color var(--d-instant) ease }
.lg-main section a:hover, .lg-lede a:hover { text-decoration-color: var(--fg-0) }
/* A dated block (the sync terms): set apart with a hairline rail, not a box. */
.lg-dated { padding-left: 20px; border-left: 2px solid var(--accent-line) }
.lg-dated .lg-version { margin-top: 8px; font: 500 11px/1.3 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent) }
.lg-cmd { margin: 14px 0 0; padding: 14px 16px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg-sunken); font: 400 13px/1.7 var(--font-mono); color: var(--fg-0); white-space: pre; scrollbar-width: thin }
.lg-cmd code { padding: 0; border: 0; background: none; font: inherit }

/* Footer */
.lg-foot { border-top: 1px solid var(--line) }
.lg-foot .lg-wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding: 20px 0 calc(28px + env(safe-area-inset-bottom, 0px)); font-size: 13px; color: var(--fg-2) }
.lg-foot nav { display: flex; flex-wrap: wrap; gap: 0 20px }
.lg-foot a { display: inline-flex; align-items: center; min-height: 36px; transition: color var(--d-instant) ease }
.lg-foot a:hover { color: var(--fg-0) }

@media (pointer: coarse) {
  .lg-foot a, .lg-toc a { min-height: 44px }
  .lg-foot a { min-width: 44px; justify-content: center }
}
@media (max-width: 767px) {
  .lg-main { padding: 48px 0 72px }
  .lg-toc ol { grid-template-columns: minmax(0, 1fr) }
  .lg-nav a:not([aria-current="page"]):not(.lg-home) { display: none }
  .lg-main section { margin-top: 44px }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important }
}

/* ---- E5 cross-document view transitions (mirrors styles.css; one element per name) */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto }
  .site-head .brand .mark, .lg-head .brand .mark { view-transition-name: ae-mark }
  .site-head .wordmark, .lg-head .wordmark { view-transition-name: ae-word }
  #hero-title, .lg-main h1 { view-transition-name: page-title }
  /* Longhands only: the shorthand would reset the UA animation-name and kill the glide. */
  ::view-transition-group(*) { animation-duration: 280ms; animation-timing-function: var(--ease-out); animation-fill-mode: both }
}
