:root {
  --bg: #f6f8f3;
  --surface: #ffffff;
  --ink: #16241f;
  --muted: #5a6b63;
  --line: #dde5dc;
  --green-900: #163a30;
  --green-700: #2d6350;
  --green-300: #a9c4b4;
  --green-100: #e6efe6;
  --add-bg: #e9f5ec;
  --add-ink: #1d5a37;
  --del-bg: #fbeaea;
  --del-ink: #8a2b2b;
  --on-accent: #ffffff;
  --accent-hover: #245443;
  --code-bg: #163a30;
  --radius: 14px;
  --maxw: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1a16;
    --surface: #16241f;
    --ink: #e8f0ea;
    --muted: #9db0a5;
    --line: #25382f;
    --green-900: #e8f0ea;
    --green-700: #7fb79c;
    --green-300: #3d6354;
    --green-100: #1b2d26;
    --add-bg: #173324;
    --add-ink: #8fd3a8;
    --del-bg: #351c1c;
    --del-ink: #e7a1a1;
    --on-accent: #0f1a16;
    --accent-hover: #93c9ae;
    --code-bg: #0a120f;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-700); }
code, pre, kbd { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }

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

/* header */
.nav { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.brand img { width: 28px; height: 28px; }
.nav-links { display: flex; gap: 22px; align-items: center; font-size: 15px; }
.nav-links a { color: var(--muted); text-decoration: none; }
.nav-links a:hover { color: var(--ink); }

/* hero */
.hero { padding: 56px 0 40px; text-align: center; }
.badge {
  display: inline-block; font-size: 13px; font-weight: 600; color: var(--green-700);
  background: var(--green-100); border: 1px solid var(--line);
  padding: 4px 12px; border-radius: 999px; margin-bottom: 22px;
}
h1 {
  font-size: clamp(34px, 6vw, 58px); line-height: 1.08; letter-spacing: -.03em;
  margin: 0 auto 20px; max-width: 16ch; font-weight: 720;
}
.lede { font-size: clamp(18px, 2.4vw, 21px); color: var(--muted); max-width: 40em; margin: 0 auto 30px; }
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 22px;
  border-radius: 12px; font-weight: 600; font-size: 16px; text-decoration: none;
  border: 1px solid transparent; transition: transform .12s ease, background .12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--green-700); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.fine { font-size: 14px; color: var(--muted); margin-top: 16px; }

.shot {
  margin: 44px auto 0; max-width: 960px; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); box-shadow: 0 24px 60px -24px rgba(22, 58, 48, .35);
  background: var(--surface);
}

/* sections */
section { padding: 72px 0; }
section.alt { background: var(--surface); border-block: 1px solid var(--line); }
h2 { font-size: clamp(26px, 4vw, 36px); letter-spacing: -.02em; line-height: 1.15; margin: 0 0 14px; font-weight: 700; }
.sub { color: var(--muted); max-width: 40em; margin: 0 0 40px; }

.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid4 { grid-template-columns: repeat(4, 1fr); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
section.alt .card { background: var(--bg); }
.card h3 { margin: 0 0 8px; font-size: 18px; letter-spacing: -.01em; }
.card p { margin: 0; color: var(--muted); font-size: 16px; }
.num { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--green-100); color: var(--green-700); font-weight: 700; font-size: 14px; margin-bottom: 14px; }

/* diff demo */
.diff { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); font-size: 14.5px; }
.diff .row { display: grid; grid-template-columns: 34px 1fr; }
.diff .row span:first-child { text-align: center; padding: 10px 0; font-weight: 700; font-family: ui-monospace, Menlo, monospace; }
.diff .row span:last-child { padding: 10px 14px; font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.diff .del { background: var(--del-bg); color: var(--del-ink); }
.diff .add { background: var(--add-bg); color: var(--add-ink); }
.diff .actions { display: flex; gap: 8px; justify-content: flex-end; padding: 10px 14px; border-top: 1px solid var(--line); font-family: inherit; }
.diff .actions i { font-style: normal; font-size: 13px; font-weight: 600; padding: 4px 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split.rev .split-text { order: 2; }
.split-text h2 { font-size: clamp(24px, 3.4vw, 32px); }
.split-text p { color: var(--muted); margin: 0 0 12px; }
.shot-sm { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: 0 16px 40px -20px rgba(22, 58, 48, .3); }

ul.ticks { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
ul.ticks li { padding-left: 28px; position: relative; color: var(--ink); }
ul.ticks li::before { content: ""; position: absolute; left: 0; top: .55em; width: 14px; height: 8px;
  border-left: 2.5px solid var(--green-700); border-bottom: 2.5px solid var(--green-700); transform: rotate(-45deg) translateY(-50%); }

/* install */
ol.steps { padding-left: 22px; margin: 0; display: grid; gap: 10px; }
ol.steps li { padding-left: 4px; }
.note { background: var(--green-100); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-top: 24px; font-size: 15.5px; }
pre { background: var(--code-bg); color: #e8f0ea; padding: 16px 18px; border-radius: 12px; overflow-x: auto; font-size: 13.5px; line-height: 1.55; margin: 16px 0 0; }

/* faq */
details { border-bottom: 1px solid var(--line); padding: 18px 0; }
details summary { cursor: pointer; font-weight: 600; font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 22px; line-height: 1; }
details[open] summary::after { content: "–"; }
details p { color: var(--muted); margin: 12px 0 0; max-width: 44em; }

/* footer */
footer { padding: 40px 0 56px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14.5px; }
.foot { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.foot a { color: var(--muted); margin-right: 18px; }

@media (max-width: 820px) {
  .grid3, .grid4 { grid-template-columns: 1fr; }
  .split, .split.rev { grid-template-columns: 1fr; gap: 24px; }
  .split.rev .split-text { order: 0; }
  section { padding: 52px 0; }
  .hero { padding-top: 36px; }
  .nav-links a.hide-sm { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
