@font-face {
  font-family: "Geist";
  src: url("/fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --surface: #f7f8f6;
  --fg: #293238;
  --muted: #5b625a;
  --border: #e3e6e1;
  --brand: #168653;
  --primary: #168653;
  --primary-hover: #126e44;
  --primary-fg: #ffffff;
  --positive-surface: #e8f4ee;
  --ring: rgba(22, 134, 83, 0.45);
  --radius: 10px;
  --max: 1160px;
  color-scheme: light;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

a:hover {
  color: var(--primary-hover);
}

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

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 640px) {
  .wrap {
    padding: 0 24px;
  }
}

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--fg);
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  z-index: 100;
}

.skip:focus {
  left: 8px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
  text-decoration: none;
  font-weight: 600;
  font-size: 17px;
}

.brand:hover {
  color: var(--fg);
}

.brand img {
  height: 30px;
  width: auto;
}

.mark {
  width: 32px;
  height: 32px;
  flex: none;
}

.nav {
  display: none;
  gap: 24px;
  font-size: 15px;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
}

.nav a:hover {
  color: var(--fg);
}

@media (min-width: 860px) {
  .nav {
    display: flex;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-fg);
}

.btn-primary:hover {
  background: var(--primary-hover);
  color: var(--primary-fg);
}

.btn-secondary {
  background: var(--bg);
  color: var(--fg);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--surface);
  color: var(--fg);
}

.btn-small {
  min-height: 38px;
  padding: 7px 14px;
  font-size: 14px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 479px) {
  .actions .btn {
    width: 100%;
  }
  .site-header .btn-small .long {
    display: none;
  }
}

/* Type */
h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
}

h1 {
  font-size: clamp(34px, 6vw, 56px);
  font-weight: 700;
}

h2 {
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 700;
}

h3 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

.eyebrow {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--primary);
  background: var(--positive-surface);
  border-radius: 999px;
  padding: 4px 12px;
}

.lead {
  font-size: clamp(17px, 2.2vw, 20px);
  color: var(--muted);
  max-width: 680px;
}

.mono {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
}

/* Sections */
section {
  padding: 72px 0;
}

@media (min-width: 860px) {
  section {
    padding: 96px 0;
  }
}

.section-head {
  display: grid;
  gap: 14px;
  margin-bottom: 40px;
  max-width: 760px;
}

.section-head p {
  color: var(--muted);
  font-size: 17px;
}

.alt {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* Hero */
.hero {
  padding: 56px 0 72px;
}

.hero .wrap {
  display: grid;
  gap: 24px;
  justify-items: center;
  text-align: center;
}

.hero h1 {
  max-width: 900px;
}

.hero .lead {
  margin: 0 auto;
}

.hero .actions {
  justify-content: center;
}

.hero .eyebrow {
  justify-self: center;
}

.hero .facts {
  width: 100%;
  text-align: left;
}

.hero .note {
  font-size: 14px;
  color: var(--muted);
}

.hero-shot {
  margin-top: 24px;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(17, 21, 17, 0.04), 0 12px 32px rgba(17, 21, 17, 0.08);
}

@media (max-width: 639px) {
  .hero-shot {
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
    border-radius: 24px;
  }
}

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 860px) {
  .facts {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.facts li {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 14px;
  color: var(--muted);
}

.facts strong {
  display: block;
  color: var(--fg);
  font-size: 15px;
}

/* Feature grid */
.grid {
  display: grid;
  gap: 16px;
}

@media (min-width: 640px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: grid;
  gap: 10px;
  align-content: start;
}

.card .icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--positive-surface);
  color: var(--primary);
  display: grid;
  place-items: center;
}

.card .icon svg {
  width: 20px;
  height: 20px;
}

.card p {
  color: var(--muted);
  font-size: 15px;
}

.card ul {
  margin: 4px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 15px;
}

.card li + li {
  margin-top: 4px;
}

/* Split rows */
.split {
  display: grid;
  gap: 32px;
  align-items: center;
}

@media (min-width: 960px) {
  .split {
    grid-template-columns: 1fr 1fr;
    gap: 56px;
  }
  .split.reverse > :first-child {
    order: 2;
  }
}

.split + .split {
  margin-top: 72px;
}

.split .text {
  display: grid;
  gap: 14px;
}

.split .text p {
  color: var(--muted);
}

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

.checks li {
  position: relative;
  padding-left: 28px;
}

.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--positive-surface)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23168653' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E")
    center / 10px no-repeat;
}

.shot {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(17, 21, 17, 0.06);
}

.phone {
  max-width: 300px;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 8px;
  background: var(--bg);
  box-shadow: 0 8px 24px rgba(17, 21, 17, 0.08);
}

.phone img {
  border-radius: 20px;
}

/* Steps */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
  counter-reset: step;
}

@media (min-width: 860px) {
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.steps li {
  counter-increment: step;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  background: var(--bg);
  display: grid;
  gap: 8px;
}

.steps li::before {
  content: counter(step);
  font-family: "Geist Mono", ui-monospace, monospace;
  font-weight: 600;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: var(--primary-fg);
}

.steps p {
  color: var(--muted);
  font-size: 15px;
}

/* Licence table */
.table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
  background: var(--bg);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

th,
td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  background: var(--surface);
  font-weight: 600;
}

tr:last-child td {
  border-bottom: 0;
}

td:first-child {
  font-weight: 500;
  min-width: 180px;
}

/* FAQ */
.faq {
  display: grid;
  gap: 12px;
  max-width: 860px;
}

.faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  padding: 0 20px;
}

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 28px 18px 0;
  font-weight: 600;
  position: relative;
}

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

.faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 15px;
  font-size: 22px;
  font-weight: 400;
  color: var(--muted);
}

.faq details[open] summary::after {
  content: "\2212";
}

.faq details p {
  padding: 0 0 18px;
  color: var(--muted);
}

/* CTA band */
.cta {
  text-align: center;
}

.cta .wrap {
  display: grid;
  gap: 18px;
  justify-items: center;
}

.cta .lead {
  margin: 0 auto;
}

.cta .actions {
  justify-content: center;
}

/* Code */
pre {
  margin: 0;
  background: #101410;
  color: #e8ece6;
  border-radius: var(--radius);
  padding: 18px 20px;
  overflow-x: auto;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 14px;
  line-height: 1.7;
}

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

p code,
li code {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 5px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  font-size: 14px;
  color: var(--muted);
}

.site-footer .wrap {
  display: grid;
  gap: 20px;
}

@media (min-width: 860px) {
  .site-footer .wrap {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}

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

.site-footer a {
  color: var(--muted);
}

.site-footer a:hover {
  color: var(--fg);
}

/* Inner page */
.page-head {
  padding: 56px 0 24px;
}

.page-head .wrap {
  display: grid;
  gap: 18px;
}

.prose {
  display: grid;
  gap: 18px;
  max-width: 780px;
}

.prose h2 {
  font-size: 26px;
  margin-top: 24px;
}

.prose p,
.prose li {
  color: #2c322b;
}

.prose ul {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 6px;
}

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

@media print {
  .site-header,
  .site-footer,
  .actions {
    display: none;
  }
}

/* Breadcrumbs */
.crumbs {
  font-size: 14px;
  color: var(--muted);
}

/* Long pages: a contents list beside the body */
.doc-section {
  padding-top: 24px;
}

.doc {
  display: grid;
  gap: 32px;
}

@media (min-width: 1024px) {
  .doc {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 56px;
    align-items: start;
  }
  .toc {
    position: sticky;
    top: 88px;
  }
}

.toc {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  font-size: 14px;
}

.toc-title {
  font-weight: 600;
  margin-bottom: 8px;
}

.toc ol {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
  color: var(--muted);
}

.toc a {
  color: var(--muted);
  text-decoration: none;
}

.toc a:hover {
  color: var(--fg);
  text-decoration: underline;
}

.doc-body {
  display: grid;
  gap: 48px;
  min-width: 0;
}

.feature-area {
  display: grid;
  gap: 14px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}

.feature-area h2 {
  font-size: clamp(24px, 3vw, 30px);
}

.feature-area > p {
  color: var(--muted);
}

.feature-area ul:not(.checks) {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 6px;
}

/* Changelog */
.releases {
  display: grid;
  gap: 48px;
  max-width: 900px;
}

.release {
  display: grid;
  gap: 16px;
}

@media (min-width: 860px) {
  .release {
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 40px;
  }
}

.release-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  align-self: start;
}

@media (min-width: 860px) {
  .release-head {
    flex-direction: column;
    align-items: flex-start;
    position: sticky;
    top: 88px;
  }
}

.release-head time {
  font-weight: 600;
}

.tag {
  font-size: 13px;
  font-weight: 500;
  color: var(--primary);
  background: var(--positive-surface);
  border-radius: 999px;
  padding: 2px 10px;
}

.release-body {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.release-body h2 {
  font-size: clamp(24px, 3vw, 30px);
}

.release-body h3 {
  margin-top: 12px;
}

.release-body p,
.release-body li {
  color: #2c322b;
}

.release-body ul {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 6px;
}

.hero .hero-shot {
  width: 100%;
}
