:root {
  --bg: #f3f5f4;
  --panel: #fff;
  --ink: #1c2321;
  --mute: #6a7570;
  --line: #d9dfdc;
  --accent: #0f6b5c;
  --on-accent: #fff;
  --brand: #883170;
  --band: #e6edf3;
  --add: #e1f4e6;
  --del: #fbe4e2;
  --hunk: #e8edf5;
  --lane-0: #2f9e8f;
  --lane-1: #d9822b;
  --lane-2: #7c5cc4;
  --lane-3: #d6457a;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141917;
    --panel: #1c2220;
    --ink: #e6ebe8;
    --mute: #8d9993;
    --line: #2d3633;
    --accent: #4fc2ab;
    --on-accent: #0b1210;
    --brand: #d08abb;
    --band: #19201e;
    --add: #1a3a2a;
    --del: #40211f;
    --hunk: #222b3a;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
.top {
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
}
.brand img { border-radius: 7px; }
nav { display: flex; gap: 20px; }
nav a {
  color: var(--mute);
  text-decoration: none;
  font-weight: 500;
}
nav a:hover { color: var(--ink); }

/* Download */
.download {
  background: var(--band);
  border-bottom: 1px solid var(--line);
  padding: 64px 0 56px;
  text-align: center;
}
.hero-icon {
  border-radius: 22px;
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.15);
}
h1 {
  margin: 24px 0 12px;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.lead {
  max-width: 620px;
  margin: 0 auto 32px;
  color: var(--mute);
  font-size: 1.125rem;
}
.buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 28px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
}
.btn.primary {
  background: var(--accent);
  color: var(--on-accent);
}
.btn.primary:hover { filter: brightness(1.08); }
.btn small {
  font-weight: 400;
  font-size: 0.8rem;
  opacity: 0.85;
}
.others {
  margin: 16px 0 0;
  color: var(--mute);
}
.status {
  margin: 24px auto 0;
  max-width: 560px;
  color: var(--mute);
  font-size: 0.9rem;
}

/* Features */
.features { padding: 64px 0; }
h2 {
  margin: 0 0 32px;
  text-align: center;
  font-size: 1.75rem;
  letter-spacing: -0.01em;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.grid article {
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 3px solid var(--brand);
  border-radius: 10px;
  padding: 20px 22px;
}
h3 { margin: 0 0 6px; font-size: 1.05rem; }
.grid p { margin: 0; color: var(--mute); }

/* Footer */
footer {
  border-top: 1px solid var(--line);
  padding: 24px 0;
  color: var(--mute);
  font-size: 0.9rem;
}
footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

/* Spotlights: text beside an illustration of the app */
.spotlight { padding: 72px 0; }
.spotlight.alt {
  background: var(--band);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.spot {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 48px;
  align-items: center;
}
.spot.reverse .spot-text { order: 2; }
.spot-text h2 { text-align: left; margin-bottom: 16px; }
.spot-text p { color: var(--mute); margin: 0 0 14px; }
.spot-text strong { color: var(--ink); }
.kicker {
  margin: 0 0 6px;
  color: var(--accent) !important;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.ticks {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
}
.ticks li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 6px;
}
.ticks li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* Mock windows */
.mock {
  margin: 0;
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgb(0 0 0 / 0.12);
  overflow: hidden;
  font-size: 0.85rem;
}
.mock-bar, .editor-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
}
.mock-path { font-weight: 600; }
.mock-where { color: var(--mute); margin-right: auto; }
.mock-seg {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  font-size: 0.75rem;
}
.mock-seg b, .mock-seg i {
  padding: 2px 8px;
  font-style: normal;
  font-weight: 500;
}
.mock-seg b { background: var(--hunk); }
.mock-btn {
  padding: 2px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}
.mock-bar .mock-btn {
  border-color: var(--accent);
  color: var(--accent);
}
.mock-btn.solid {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.diff code, .editor code {
  font: 0.8rem/1.6 ui-monospace, Menlo, Consolas, monospace;
  white-space: pre;
}
.diff { overflow-x: auto; }
.row {
  display: grid;
  grid-template-columns: 30px 30px 22px 1fr;
  align-items: center;
}
.row .ln {
  color: var(--mute);
  font: 0.75rem ui-monospace, Menlo, Consolas, monospace;
  text-align: right;
  padding-right: 6px;
}
.row.hunk { background: var(--hunk); color: var(--mute); }
.row.add { background: var(--add); }
.row.del { background: var(--del); }
.cb { display: flex; justify-content: center; }
.row.add .cb::before, .row.del .cb::before {
  content: "";
  width: 11px;
  height: 11px;
  border: 1.5px solid var(--mute);
  border-radius: 3px;
}
.row .cb.on::before {
  background: var(--accent);
  border-color: var(--accent);
}

.editor { border-top: 3px solid var(--accent); }
.editor-bar span:first-child { color: var(--mute); margin-right: auto; }
.editor-bar { border-bottom: 0; }
.editor pre {
  margin: 0;
  padding: 4px 12px 12px;
  overflow-x: auto;
}
.caret {
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 1px;
  vertical-align: -2px;
  background: var(--ink);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .caret { animation: none; } }

/* Mock commit tree: 34px rows, matching the SVG */
.tree {
  display: flex;
  padding: 10px 8px;
}
.graph { flex: none; }
.graph line, .graph path {
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
}
.graph .dash { stroke-dasharray: 4 4; }
.graph circle { stroke-width: 2.5; }
.graph .open { fill: var(--panel); }
.l0 { stroke: var(--lane-0); }
.l1 { stroke: var(--lane-1); }
.l2 { stroke: var(--lane-2); }
.n0 { fill: var(--lane-0); stroke: var(--lane-0); }
.n1 { fill: var(--lane-1); stroke: var(--lane-1); }
.n2 { fill: var(--lane-2); stroke: var(--lane-2); }
.graph .n0.open, .graph .n2.open { fill: var(--panel); stroke-dasharray: 3 3; }
.commits {
  list-style: none;
  margin: 0;
  padding: 0;
  min-width: 0;
  flex: 1;
}
.commits li {
  height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.commits li.muted { color: var(--mute); font-style: italic; }
.badge {
  flex: none;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 500;
  color: #fff;
}
.badge.head { font-weight: 800; }
.badge.c0 { background: var(--lane-0); }
.badge.c1 { background: var(--lane-1); }
.badge.c2 { background: var(--lane-2); }
.badge.dashed {
  background: transparent;
  color: var(--lane-2);
  border: 1.5px dashed var(--lane-2);
}
.badge.tag {
  background: transparent;
  color: var(--mute);
  border: 1.5px solid var(--line);
}

/* Free */
.free {
  padding: 72px 0;
  text-align: center;
}
.free .lead { margin-bottom: 36px; }
.free h2 { margin-bottom: 12px; }
.free-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  text-align: left;
}
.free-grid div {
  padding: 20px 22px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 9%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
}
.free-grid p { margin: 0; color: var(--mute); }

.features { border-top: 1px solid var(--line); }

@media (max-width: 820px) {
  .spot { grid-template-columns: 1fr; gap: 32px; }
  .spot.reverse .spot-text { order: 0; }
  .spotlight, .free { padding: 56px 0; }
}

h2 { line-height: 1.2; }
@media (max-width: 480px) {
  .mock-seg { display: none; }
}

/* 1.0 download details */
.release-tag {
  display: inline-block;
  margin: 20px 0 0;
  padding: 3px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand) 16%, var(--panel));
  color: var(--brand);
  font-weight: 700;
  font-size: 0.85rem;
}
.release-tag + h1 { margin-top: 12px; }
.platforms {
  margin: 12px auto 0;
  max-width: 560px;
  color: var(--mute);
  font-size: 0.95rem;
}
.platforms.highlight {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
}
.hero-icon { display: block; margin: 0 auto; }
