/* Evyrix site. System font, one accent, follows the visitor's light or dark setting. */

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --surface: #f5f5f7;
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --hairline: #d2d2d7;
  --accent: #0066cc;
  --font:
    -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", system-ui,
    sans-serif;
  --gutter: 24px;
  --container: 1028px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --surface: #1c1c1e;
    --text: #f5f5f7;
    --text-secondary: #a1a1a6;
    --hairline: #424245;
    --accent: #2997ff;
  }
}

@media (max-width: 600px) {
  :root {
    --gutter: 16px;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 32px;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.53;
  letter-spacing: -0.022em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent);
  text-decoration: none;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: color-mix(in srgb, var(--accent) 28%, transparent);
}

/* One container: header, content and footer share the same left and right edges. */
.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.skip-link {
  position: absolute;
  z-index: 10;
  left: var(--gutter);
  top: -100px;
  padding: 10px 14px;
  background: var(--surface);
  border-radius: 10px;
}

.skip-link:focus {
  top: 12px;
}

/* Header */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text);
}

.wordmark:hover {
  text-decoration: none;
}

.wordmark svg {
  display: block;
  height: 15px;
  width: auto;
}

.site-nav {
  display: flex;
  gap: 24px;
  font-size: 14px;
  letter-spacing: -0.016em;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text-secondary);
}

.site-nav a:hover,
.site-nav a[aria-current] {
  color: var(--text);
  text-decoration: none;
}

/* Footer */

.site-footer {
  color: var(--text-secondary);
  font-size: 12px;
  letter-spacing: 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 20px 0 32px;
  border-top: 1px solid var(--hairline);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 20px;
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--text-secondary);
}

.site-footer a:hover {
  color: var(--text);
  text-decoration: none;
}

/* Home */

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 96px;
  padding-bottom: 128px;
}

.hero h1 {
  max-width: 12.5em;
  margin: 0;
  font-size: clamp(44px, 7.4vw, 88px);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.hero h1 .quiet {
  display: block;
  color: var(--text-secondary);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 48px 0 0;
  color: var(--text-secondary);
  font-size: 17px;
}

.hero-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
}

/* Legal documents */

.doc {
  flex: 1;
  display: grid;
  grid-template-columns: 240px minmax(0, 680px);
  grid-template-areas:
    ". head"
    "toc body";
  column-gap: 108px;
  padding-top: 72px;
  padding-bottom: 128px;
}

.doc-header {
  grid-area: head;
  margin-bottom: 40px;
}

.doc-header h1 {
  margin: 0;
  font-size: 48px;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.doc-header p {
  margin: 12px 0 0;
  color: var(--text-secondary);
  font-size: 15px;
  letter-spacing: -0.016em;
}

.toc {
  grid-area: toc;
  position: sticky;
  top: 32px;
  align-self: start;
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  padding-top: 4px;
}

.toc h2,
.toc-compact summary {
  margin: 0 0 12px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
}

.toc ol,
.toc-compact ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
}

.toc li,
.toc-compact li {
  counter-increment: toc;
}

.toc a,
.toc-compact a {
  display: flex;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.35;
  letter-spacing: -0.006em;
}

.toc a::before,
.toc-compact a::before {
  content: counter(toc);
  min-width: 1.4em;
  font-variant-numeric: tabular-nums;
}

.toc a {
  padding: 5px 0 5px 12px;
  border-left: 1px solid var(--hairline);
}

.toc a:hover,
.toc-compact a:hover {
  color: var(--text);
  text-decoration: none;
}

.toc a:focus-visible {
  outline-offset: -2px;
}

.toc a[aria-current="true"] {
  border-left-color: var(--text);
  color: var(--text);
}

.toc-compact {
  display: none;
}

.doc-body {
  grid-area: body;
  min-width: 0;
}

.summary {
  margin: 0 0 56px;
  padding: 28px 32px;
  border-radius: 20px;
  corner-shape: squircle;
  background: var(--surface);
}

@supports (corner-shape: squircle) {
  .summary {
    border-radius: 36px;
  }
}

.summary h2 {
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
}

.summary ul {
  margin: 0;
  padding-left: 1.1em;
}

.summary li + li {
  margin-top: 8px;
}

.summary p {
  margin: 16px 0 0;
  font-size: 15px;
}

.lede {
  margin: 0 0 40px;
  font-size: 19px;
  line-height: 1.47;
  letter-spacing: -0.022em;
  text-wrap: pretty;
}

.prose {
  text-wrap: pretty;
}

.prose a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent);
}

.prose a:hover {
  text-decoration-color: var(--accent);
}

.prose section {
  margin-top: 56px;
}

.prose h2 {
  position: relative;
  margin: 0 0 16px;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

/* Section numbers hang in the margin on wide screens, so headings share one left edge. */
.prose h2 .num {
  position: absolute;
  right: 100%;
  margin-right: 0.7em;
  color: var(--text-secondary);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.prose h3 {
  margin: 32px 0 8px;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.018em;
}

.prose p,
.prose ul,
.prose ol {
  margin: 0 0 16px;
}

.prose ul,
.prose ol {
  padding-left: 1.25em;
}

.prose li + li {
  margin-top: 8px;
}

.prose strong {
  font-weight: 600;
}

/* Legal all-caps paragraphs. Written in sentence case and set in caps here. */
.prose .caps {
  font-size: 14px;
  line-height: 1.6;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.prose dl {
  margin: 0 0 16px;
}

.prose dt {
  margin-top: 20px;
  font-weight: 600;
}

.prose dt:first-child {
  margin-top: 0;
}

.prose dd {
  margin: 4px 0 0;
}

.prose dd ul {
  margin: 8px 0 0;
}

@media (max-width: 960px) {
  .doc {
    display: block;
    padding-top: 40px;
  }

  .doc-header,
  .toc-compact,
  .doc-body {
    max-width: 720px;
  }

  .toc {
    display: none;
  }

  .toc-compact {
    display: block;
    margin: 0 0 40px;
    border-top: 1px solid var(--hairline);
    border-bottom: 1px solid var(--hairline);
  }

  .toc-compact summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 48px;
    margin: 0;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: -0.016em;
    list-style: none;
  }

  .toc-compact summary::-webkit-details-marker {
    display: none;
  }

  .toc-compact summary::after {
    content: "";
    width: 7px;
    height: 7px;
    margin-right: 4px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
  }

  .toc-compact[open] summary::after {
    transform: translateY(2px) rotate(-135deg);
  }

  .toc-compact ol {
    padding-bottom: 12px;
  }

  .toc-compact a {
    min-height: 40px;
    align-items: center;
    font-size: 15px;
  }

  .prose h2 .num {
    position: static;
    display: inline-block;
    min-width: 1.6em;
    margin-right: 0;
  }

  .doc-header h1 {
    font-size: 40px;
  }
}

@media (max-width: 600px) {
  .site-nav {
    gap: 20px;
  }

  .hero {
    padding-top: 64px;
    padding-bottom: 96px;
  }

  .hero-meta {
    margin-top: 36px;
  }

  .doc-header h1 {
    font-size: 34px;
  }

  .lede {
    font-size: 17px;
  }

  .summary {
    padding: 24px 20px;
  }

  .prose h2 {
    font-size: 22px;
  }

  .prose h3 {
    font-size: 18px;
  }

  .footer-inner {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 16px;
    padding-top: 12px;
  }

  .site-footer nav {
    flex-direction: column;
  }

  .site-footer a {
    min-height: 44px;
    font-size: 14px;
  }
}

/* Not found */

.not-found {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 96px;
  padding-bottom: 128px;
}

.not-found h1 {
  margin: 0 0 12px;
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.028em;
}

.not-found p {
  margin: 0;
  color: var(--text-secondary);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
