/* greycard.org. Dark, like the editor, so the screenshots sit in their own
   light. The card grey is 18% reflectance in sRGB, #767676. */
:root {
  --bg: #0e0e0f;
  --bg-2: #141416;
  --surface: #18181b;
  --surface-2: #1f1f23;
  --line: #27272b;
  --line-2: #34343a;
  --text: #ededef;
  --muted: #a1a1aa;
  --faint: #71717a;
  --link: #9cc0ff;
  --accent: #6e9eff;
  --card: #767676;
  --tag-bg: #3a2f12;
  --tag-text: #f0cf7a;
  --radius: 12px;
  --max: 44rem;
  --wide: 72rem;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Cantarell, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "JetBrains Mono", "DejaVu Sans Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 0.18em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
code {
  font: 0.86em/1.4 var(--mono);
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 0.08em 0.35em;
  border-radius: 5px;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { letter-spacing: -0.02em; line-height: 1.15; font-weight: 650; }

.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 24px; }
@media (max-width: 40rem) { .wrap { padding: 0 16px; } }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--surface); padding: 0.5rem 0.75rem; z-index: 10; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* Header */
header.site {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px) saturate(1.4);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
header.site .bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.5rem 1.5rem; min-height: 3.5rem; padding-top: 0.5rem; padding-bottom: 0.5rem;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.4rem;
  color: var(--text); font-weight: 650; letter-spacing: -0.01em; font-size: 1.05rem;
}
.brand:hover { text-decoration: none; }
header.site nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1.4rem; font-size: 0.9rem; }
header.site nav a { color: var(--muted); }
header.site nav a:hover, header.site nav a[aria-current] { color: var(--text); text-decoration: none; }
header.site nav .nav-cta {
  color: var(--bg); background: var(--text); font-weight: 600;
  padding: 0.35rem 0.85rem; border-radius: 999px;
}
header.site nav .nav-cta:hover { color: var(--bg); background: #fff; }
/* On a phone the header keeps the two pages and Download; the rest are in the footer. */
@media (max-width: 40rem) {
  header.site nav { gap: 0.25rem 1rem; }
  header.site nav a[href$="#features"], header.site nav a[href^="https:"] { display: none; }
}

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.75rem 1.4rem; border-radius: 999px;
  background: var(--text); color: var(--bg); font-weight: 600; font-size: 0.95rem;
  border: 1px solid var(--text);
  transition: background 0.15s, border-color 0.15s;
}
.button:hover { background: #fff; text-decoration: none; }
.button.ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.button.ghost:hover { border-color: var(--muted); background: var(--surface); }

.eyebrow {
  margin: 0 0 0.6rem; font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent);
}

/* Hero */
.hero {
  text-align: center; padding: 5.5rem 0 0; overflow: hidden;
  background:
    radial-gradient(60rem 28rem at 50% 105%, rgba(110, 158, 255, 0.16), transparent 70%),
    radial-gradient(40rem 20rem at 50% -10%, rgba(255, 255, 255, 0.05), transparent 70%);
}
.pill {
  display: inline-flex; align-items: center; gap: 0.6rem; margin: 0 0 1.75rem;
  padding: 0.3rem 0.9rem 0.3rem 0.35rem; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--surface);
  color: var(--muted); font-size: 0.82rem;
}
.pill span {
  background: var(--surface-2); color: var(--text); font-weight: 600;
  padding: 0.1rem 0.55rem; border-radius: 999px; border: 1px solid var(--line-2);
}
.hero h1 {
  font-size: clamp(2.5rem, 7.5vw, 4.75rem); letter-spacing: -0.04em; line-height: 1.02;
  margin: 0 auto 1.4rem; max-width: 16ch; padding-bottom: 0.08em;
  background: linear-gradient(180deg, #fff 30%, #b4b4bc);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { color: var(--muted); font-size: clamp(1.05rem, 2.2vw, 1.25rem); line-height: 1.55; margin: 0 auto; max-width: 38rem; }
.ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; margin: 2.25rem 0 0; }
.hero-shot { margin-top: 4rem; }
.hero-shot .shot {
  border-bottom-left-radius: 0; border-bottom-right-radius: 0; border-bottom: 0;
  box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.06), 0 30px 120px rgba(110, 158, 255, 0.18);
}

.shot {
  display: block; overflow: hidden; border-radius: var(--radius);
  border: 1px solid var(--line-2); background: #1b1b1b;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

/* Sections */
.band { padding: 6rem 0; border-top: 1px solid var(--line); }
.band h2 { font-size: clamp(1.9rem, 4vw, 2.75rem); margin: 0 0 1rem; letter-spacing: -0.03em; }
.section-lede { color: var(--muted); font-size: 1.1rem; margin: 0 0 2.5rem; max-width: var(--max); }

.pillars {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: 2.5rem;
}
.pillars li { border-top: 1px solid var(--line-2); padding-top: 1.5rem; }
.pillars h3 { font-size: 1.2rem; margin: 0 0 0.6rem; }
.pillars p { color: var(--muted); margin: 0; }

#features h2 { text-align: center; margin-bottom: 4rem; }
.feature {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 8fr); gap: 4rem;
  align-items: center; margin: 0 0 6rem;
}
.feature:last-child { margin-bottom: 0; }
.feature.flip { grid-template-columns: minmax(0, 8fr) minmax(0, 5fr); }
.feature.flip .feature-text { order: 2; }
.feature h3 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0 0 1rem; letter-spacing: -0.03em; }
.feature p { color: var(--muted); margin: 0; font-size: 1.05rem; }
@media (max-width: 52rem) {
  .feature, .feature.flip { grid-template-columns: 1fr; gap: 1.75rem; margin-bottom: 4.5rem; }
  .feature.flip .feature-text { order: 0; }
}

.early { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 3rem; align-items: center; }
.early p { color: var(--muted); margin: 0; max-width: var(--max); }
.early strong { color: var(--text); font-weight: 600; }
@media (max-width: 52rem) { .early { grid-template-columns: 1fr; } }
.compare {
  display: block; padding: 1.75rem; border-radius: var(--radius);
  border: 1px solid var(--line-2);
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  color: var(--muted); transition: border-color 0.15s, transform 0.15s;
}
.compare:hover { text-decoration: none; border-color: var(--faint); transform: translateY(-2px); }
.compare strong { display: block; color: var(--text); font-size: 1.25rem; margin-bottom: 0.4rem; }
.compare strong::after { content: " →"; color: var(--accent); }
.compare .eyebrow { display: block; }

/* Download */
.download { text-align: center; background: linear-gradient(180deg, var(--bg-2), var(--bg)); }
.download .section-lede { margin-left: auto; margin-right: auto; }
.dl-grid {
  list-style: none; margin: 0; padding: 0; text-align: left;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: 1.25rem;
}
.dl {
  display: flex; flex-direction: column; padding: 1.5rem;
  border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface);
}
.dl-head { display: flex; align-items: center; gap: 0.85rem; margin-bottom: 1.25rem; }
.dl-head svg { width: 2rem; height: 2rem; color: var(--muted); flex: none; }
.dl h3 { margin: 0; font-size: 1.15rem; }
.dl-head p { margin: 0; color: var(--faint); font-size: 0.85rem; }
.dl .button { width: 100%; }
.dl-file, .dl-how { margin: 0.9rem 0 0; color: var(--muted); font-size: 0.875rem; line-height: 1.5; }
.dl-how { margin-top: 0.35rem; color: var(--faint); }
.dl-more { margin: 2rem 0 0; color: var(--faint); font-size: 0.9rem; }

/* Long pages: why.html and the changelog */
.doc { padding-top: 4.5rem; }
.doc-head { max-width: 50rem; margin-bottom: 3.5rem; }
.doc-head h1 { font-size: clamp(2.25rem, 5.5vw, 3.5rem); letter-spacing: -0.035em; margin: 0 0 1.25rem; }
.doc-head .lede { margin: 0; max-width: none; }
.doc-head .lede p { margin: 0 0 0.75rem; }

.doc-body { display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: 4rem; align-items: start; }
.toc { position: sticky; top: 5rem; font-size: 0.875rem; }
.toc p { margin: 0 0 0.75rem; color: var(--faint); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.toc ol { list-style: none; margin: 0; padding: 0 0 0 0.9rem; border-left: 1px solid var(--line-2); }
.toc li { margin: 0 0 0.55rem; }
.toc a { color: var(--muted); }
.toc a:hover { color: var(--text); text-decoration: none; }
@media (max-width: 60rem) {
  .doc-body { grid-template-columns: 1fr; gap: 2rem; }
  .toc { position: static; padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
  .toc ol { border: 0; padding: 0; columns: 2 12rem; column-gap: 2rem; }
  .toc li { break-inside: avoid; }
}

.prose { max-width: var(--max); font-size: 1.0625rem; color: #d4d4d8; container-type: inline-size; }
.prose h2 { font-size: 1.75rem; color: var(--text); margin: 4rem 0 1.25rem; letter-spacing: -0.025em; }
.prose > h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.2rem; color: var(--text); margin: 2.5rem 0 0.75rem; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.15rem; }
.prose li { margin: 0.35rem 0; }
.prose strong { color: var(--text); }
.prose h2, .prose h3 { scroll-margin-top: 5rem; }
.prose a { text-decoration: underline; text-decoration-color: rgba(156, 192, 255, 0.35); text-underline-offset: 0.18em; }
.prose a:hover { text-decoration-color: currentColor; }

.table-scroll { overflow-x: auto; margin: 1.5rem 0 2rem; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface); }
@media (min-width: 70rem) { .doc-body .prose .table-scroll { width: calc(100cqw + 12rem); } }
table { border-collapse: collapse; font-size: 0.85rem; line-height: 1.45; min-width: 46rem; width: 100%; }
th, td { text-align: left; vertical-align: top; padding: 0.65rem 0.8rem; border-bottom: 1px solid var(--line); }
th { background: var(--surface-2); font-weight: 600; color: var(--text); white-space: nowrap; }
td:first-child { color: var(--text); font-weight: 500; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td:last-child, th:last-child { background: rgba(110, 158, 255, 0.08); color: var(--text); }

/* Changelog */
.releases { border-top: 1px solid var(--line); }
.release {
  display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 3rem;
  padding: 3rem 0; border-bottom: 1px solid var(--line);
}
.release-meta { position: sticky; top: 5rem; align-self: start; }
.release-meta h2 { font-size: 1.5rem; margin: 0; letter-spacing: -0.02em; scroll-margin-top: 5rem; }
.release-meta h2.unreleased { color: var(--muted); }
.release-meta .when { margin: 0.25rem 0 0; color: var(--faint); font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.release .prose { font-size: 0.975rem; }
.release .prose ul { padding-left: 1.1rem; }
.release .prose li { margin: 0 0 0.7rem; }
.release .prose li::marker { color: var(--faint); }
@media (max-width: 52rem) {
  .release { grid-template-columns: 1fr; gap: 1.25rem; }
  .release-meta { position: static; }
}
.tag {
  display: table; margin: 0.6rem 0 0;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.02em; padding: 0.2em 0.65em; border-radius: 999px;
  background: var(--tag-bg); color: var(--tag-text);
}
details summary {
  cursor: pointer; color: var(--link); font-weight: 500; margin-bottom: 1rem;
}

/* Footer */
footer.site { border-top: 1px solid var(--line); margin-top: 6rem; padding: 3rem 0 2.5rem; color: var(--faint); font-size: 0.875rem; }
.download + footer.site, main:has(> .download:last-child) + footer.site { margin-top: 0; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; }
.foot p { margin: 0.75rem 0 0; max-width: 22rem; }
footer.site a { color: var(--muted); }
footer.site a:hover { color: var(--text); }
footer.site .links { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, auto); gap: 0.6rem 3rem; }
footer.site .fine { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: 0.8rem; }
footer.site .fine::before { content: none; }
footer.site code { font-size: 0.8em; }
