/* What every page shares: system fonts, the app's own blue, the documents and their footer. The landing page adds home.css. */

:root {
  --text: #1d1d1f;
  --secondary: #6e6e73;
  --tertiary: #86868b;
  --background: #ffffff;
  --band: #f5f5f7;
  --card: #ffffff;
  --card-text: #1d1d1f;
  --card-secondary: #6e6e73;
  --card-hairline: rgba(0, 0, 0, 0.07);
  --hairline: rgba(0, 0, 0, 0.08);
  --blue: #0071e3;
  --accent: #0071e3;
  --ink: #050a16;
  --ink-accent: #4ba3ff;
  --glass: rgba(245, 245, 247, 0.78);
  --wide: 1160px;
  --narrow: 760px;
  --gutter: 22px;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --rounded: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--display);
  margin: 0;
  text-wrap: balance;
}

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

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 8px; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: var(--gutter); top: 10px; z-index: 10; background: var(--background); padding: 8px 14px; }

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

.wrap { max-width: var(--wide); margin: 0 auto; }
.wrap.narrow { max-width: var(--narrow); }
.center { text-align: center; }
.accent { color: var(--accent); }

kbd {
  font: 500 0.82em/1 -apple-system, BlinkMacSystemFont, sans-serif;
  display: inline-grid;
  place-items: center;
  min-width: 1.6em;
  height: 1.6em;
  padding: 0 0.32em;
  margin: 0 0.06em;
  border-radius: 0.36em;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--hairline), 0 1px 0 var(--hairline);
  color: var(--text);
  vertical-align: 0.08em;
}

/* Navigation */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--glass);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hairline);
}

.nav-inner {
  max-width: var(--wide);
  margin: 0 auto;
  height: 52px;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.02em;
  margin-right: auto;
}
.brand:hover { text-decoration: none; }
.brand img { width: 26px; height: 26px; }

.nav a.link { color: var(--text); font-size: 13px; opacity: 0.8; }
.nav a.link:hover { opacity: 1; text-decoration: none; }

@media (max-width: 640px) {
  .nav a.link.optional { display: none; }
  .nav-inner { gap: 18px; }
}

/* Documents */

.document { padding: 80px var(--gutter) 120px; }
.document .wrap { max-width: 680px; }
.document h1 { font-size: clamp(40px, 7vw, 56px); margin-bottom: 12px; }
.document .updated { color: var(--tertiary); font-size: 15px; margin-bottom: 44px; }
.document h2 { font-size: 26px; letter-spacing: -0.02em; margin: 44px 0 12px; }
.document p, .document li { font-size: 17px; line-height: 1.55; color: var(--text); }
.document p + p { margin-top: 14px; }
.document ul { padding-left: 22px; margin: 12px 0 0; }
.document li + li { margin-top: 8px; }
.document ul + p { margin-top: 14px; }
.document .muted { color: var(--secondary); }

details {
  border-bottom: 1px solid var(--hairline);
  padding: 20px 0;
}
details summary {
  font-size: 19px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; color: var(--tertiary); font-weight: 400; font-size: 24px; line-height: 1; }
details[open] summary::after { content: "\2212"; }
details p { margin-top: 12px; color: var(--secondary); }

/* Footer */

footer {
  border-top: 1px solid var(--hairline);
  padding: 34px var(--gutter) 48px;
  font-size: 13px;
  color: var(--tertiary);
}
footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 26px;
  align-items: center;
}
footer .wrap span { margin-right: auto; }
footer a { color: var(--secondary); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
