/* Colors, type, and radii from design/tokens.json. */

:root {
  color-scheme: dark;
  --canvas: #070a10;
  --surface-1: #0e131c;
  --surface-2: #151c28;
  --surface-3: #1e2736;
  --line: #ffffff1a;
  --text: #f5f7fa;
  --text-secondary: #aeb7c5;
  --accent: #3d7bff;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--canvas);
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
}

.skip {
  position: absolute;
  left: 16px;
  top: 16px;
  z-index: 1;
  padding: 12px 16px;
  background: var(--surface-3);
  color: var(--text);
  border-radius: var(--radius-sm);
}

.skip:not(:focus) {
  clip-path: inset(100%);
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  white-space: nowrap;
}

:focus:not(:focus-visible) {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.wrap {
  width: min(960px, calc(100% - 32px));
  margin-inline: auto;
}

header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding-block: 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}

nav {
  display: flex;
  flex-wrap: wrap;
}

nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  color: var(--text);
  text-decoration: none;
}

main a {
  color: var(--accent);
  text-underline-offset: 3px;
}

h1 {
  max-width: 16em;
  margin: 28px 0 12px;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.12;
}

.lead,
p,
li,
dd {
  max-width: 66ch;
}

.lead {
  margin: 0 0 12px;
  color: var(--text-secondary);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.4;
}

h2 {
  margin: 64px 0 12px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

h3 {
  margin: 28px 0 8px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

p {
  margin: 0 0 12px;
}

ul,
ol {
  margin: 0 0 16px;
  padding-left: 1.25em;
}

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

dl {
  margin: 8px 0 24px;
}

dt {
  margin-top: 20px;
  font-size: 17px;
  font-weight: 600;
}

dd {
  margin: 4px 0 0;
  color: var(--text-secondary);
}

code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.92em;
}

p code,
li code,
dd code {
  padding: 0 0.3em;
  background: var(--surface-2);
  border-radius: 6px;
  overflow-wrap: anywhere;
}

pre {
  max-width: 100%;
  margin: 0 0 16px;
  padding: 16px;
  overflow-x: hidden;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 13px;
  line-height: 1.45;
}

pre code {
  font-size: inherit;
}

summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  margin: 8px 0;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
}

details p,
details ul,
details pre,
details dl {
  margin-left: 0;
}

.pair {
  display: grid;
  gap: 16px;
  margin: 20px 0 36px;
}

.pair img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

footer {
  margin-top: 48px;
  padding-block: 24px 48px;
  border-top: 1px solid var(--line);
  color: var(--text-secondary);
}

footer a {
  color: var(--accent);
}

@media (min-width: 800px) {
  .pair {
    grid-template-columns: 1fr 180px;
    align-items: start;
  }
}

@media (min-width: 900px) {
  h1 {
    font-size: 56px;
    font-weight: 800;
    letter-spacing: -0.035em;
  }
}

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