@font-face {
  font-family: 'Inter Tight';
  src: url('/fonts/inter-tight-900-italic-v1.woff2') format('woff2');
  font-weight: 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #0c0c0c;
  --card: #141414;
  --text: #f5f5f4;
  --text-body: rgba(245, 245, 244, 0.84);
  --text-2: rgba(245, 245, 244, 0.62);
  --text-3: rgba(245, 245, 244, 0.38);
  --line: rgba(245, 245, 244, 0.06);
  --rule: rgba(245, 245, 244, 0.14);
  --glow: rgba(245, 245, 244, 0.07);
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --display:
    'Inter Tight', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial,
    sans-serif;
  --gutter: 20px;
  color-scheme: dark;
}

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

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
  border-radius: 4px;
}

.glow {
  position: fixed;
  inset: 0 0 auto;
  height: 420px;
  background: radial-gradient(60% 75% at 50% 0%, var(--glow), transparent);
  pointer-events: none;
}

.page {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  max-width: calc(560px + 2 * var(--gutter));
  margin: 0 auto;
  padding: max(28px, env(safe-area-inset-top)) max(var(--gutter), env(safe-area-inset-right))
    max(32px, env(safe-area-inset-bottom)) max(var(--gutter), env(safe-area-inset-left));
}

.page--doc {
  max-width: calc(68ch + 2 * var(--gutter));
  font-size: 17px;
}

.page--doc .brand {
  margin-bottom: 24px;
}

main {
  flex: 1;
}

.title {
  margin: 0;
  padding-inline-end: 0.1em;
  font: italic 900 44px/46px var(--display);
  font-synthesis: none;
  letter-spacing: -0.035em;
  word-spacing: 0.12em;
  text-wrap: balance;
  overflow-wrap: break-word;
}

/* Brand */

.brand {
  margin-bottom: clamp(40px, 9vh, 72px);
}

.brand-link {
  display: inline-block;
}

.wordmark {
  display: block;
  width: 104px;
  height: auto;
  fill: var(--text);
  overflow: visible;
}

.app-icon {
  display: block;
  width: 72px;
  height: 72px;
  margin-bottom: 24px;
  border-radius: 16px;
  box-shadow: 0 0 0 1px var(--line);
}

/* Index */

.lede {
  max-width: 34ch;
  margin: 14px 0 0;
  font-size: 17px;
  line-height: 25px;
  color: var(--text-2);
}

.docs {
  display: grid;
  gap: 10px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
}

.doc-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  font-weight: 500;
  text-decoration: none;
  transition: border-color 160ms ease;
}

.doc-link:hover {
  border-color: var(--rule);
}

.doc-link::after {
  content: '→';
  flex: none;
  color: var(--text-2);
  font-weight: 400;
}

.doc-link[target='_blank']::after {
  content: '↗';
}

.support {
  margin-top: 56px;
}

.support h2 {
  margin: 0 0 12px;
  font: 600 22px/28px var(--sans);
}

.support p {
  max-width: 52ch;
  margin: 0 0 12px;
  color: var(--text-body);
  overflow-wrap: anywhere;
}

.support a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--text-3);
  text-underline-offset: 3px;
}

.footer {
  margin-top: 56px;
  font-size: 13px;
  line-height: 18px;
  color: var(--text-2);
}

.footer p {
  margin: 0 0 6px;
}

.footer a {
  color: var(--text-2);
  text-decoration: underline;
  text-decoration-color: var(--text-3);
  text-underline-offset: 3px;
}

/* Long-form documents */

.back {
  display: inline-block;
  margin-bottom: 28px;
  padding-block: 6px;
  font: 500 14px/20px var(--sans);
  color: var(--text-2);
  text-decoration: none;
}

.back:hover {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.doc {
  color: var(--text-body);
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.doc .title {
  margin-bottom: 8px;
  color: var(--text);
  font-size: 40px;
  line-height: 42px;
}

.doc .updated {
  margin: 0 0 36px;
  font-size: 15px;
  color: var(--text-2);
}

.doc .updated strong {
  font-weight: 500;
}

.doc h2 {
  margin: 48px 0 14px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
  font: 600 24px/30px var(--sans);
  color: var(--text);
  text-wrap: balance;
}

.doc h3 {
  margin: 32px 0 10px;
  font: 600 18px/26px var(--sans);
  color: var(--text);
}

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

.doc ul,
.doc ol {
  padding-inline-start: 1.35em;
}

.doc li {
  margin-bottom: 8px;
  padding-inline-start: 0.2em;
}

.doc li::marker {
  color: var(--text-3);
}

.doc strong {
  font-weight: 600;
  color: var(--text);
}

.doc a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--text-3);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

.doc table {
  width: 100%;
  margin: 8px 0 24px;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.5;
}

.doc th,
.doc td {
  padding: 10px 12px;
  border: 1px solid var(--rule);
  text-align: start;
  vertical-align: top;
}

.doc th {
  background: var(--card);
  color: var(--text);
  font-weight: 600;
}

.doc-end {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}

.doc-end .footer {
  margin-top: 0;
}

.doc-end .back {
  margin: 16px 0 0;
}

@media (max-width: 639px) {
  .doc table,
  .doc tbody {
    display: block;
  }

  .doc tr {
    display: block;
    margin-bottom: 12px;
    border: 1px solid var(--rule);
    border-radius: 12px;
    background: var(--card);
  }

  .doc tr:first-child {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }

  .doc td {
    display: block;
    padding: 10px 14px;
    border: 0;
  }

  .doc td + td {
    border-top: 1px solid var(--line);
  }

  .doc td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-2);
  }
}

@media (min-width: 720px) {
  .title {
    font-size: 52px;
    line-height: 54px;
  }

  .doc .title {
    font-size: 44px;
    line-height: 46px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .doc-link {
    transition: none;
  }
}
