/* Git History for VS Code: landing page styles */

:root {
  --paper: #f6f8fa;
  --surface: #ffffff;
  --ink: #18212b;
  --muted: #5a6672;
  --rule: #d8dee4;
  --add: #1a7f37;
  --add-bg: #e3f5e8;
  --del: #c4312a;
  --del-bg: #fcebea;
  --hunk: #0b5cad;
  --hunk-bg: #e7f0fa;
  --code-bg: #eef1f4;
  --focus: #0b5cad;
  --shot-shadow: 0 1px 2px rgba(24, 33, 43, .12), 0 12px 40px -12px rgba(24, 33, 43, .35);

  --sans: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --measure: 70ch;
  --wide: 1240px;
  --gutter: 16px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #12171e;
    --surface: #1a2029;
    --ink: #e4e9ee;
    --muted: #9aa6b2;
    --rule: #2c3540;
    --add: #4ac26b;
    --add-bg: #12301c;
    --del: #ff7b72;
    --del-bg: #3a1716;
    --hunk: #79b8ff;
    --hunk-bg: #142438;
    --code-bg: #222a35;
    --focus: #79b8ff;
    --shot-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 16px 48px -16px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #12171e;
  --surface: #1a2029;
  --ink: #e4e9ee;
  --muted: #9aa6b2;
  --rule: #2c3540;
  --add: #4ac26b;
  --add-bg: #12301c;
  --del: #ff7b72;
  --del-bg: #3a1716;
  --hunk: #79b8ff;
  --hunk-bg: #142438;
  --code-bg: #222a35;
  --focus: #79b8ff;
  --shot-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 16px 48px -16px rgba(0, 0, 0, .8);
  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--hunk); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 3px; }

code, kbd, .mono { font-family: var(--mono); font-size: .86em; }
code {
  background: var(--code-bg);
  padding: .1em .35em;
  border-radius: 4px;
  overflow-wrap: anywhere;
}
kbd {
  display: inline-block;
  padding: .05em .45em;
  border: 1px solid var(--rule);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--surface);
  white-space: nowrap;
  font-size: .8em;
  line-height: 1.5;
}

.skip {
  position: absolute; left: -999px; top: 8px;
  background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 20;
}
.skip:focus { left: 8px; }

/* ---------- layout ---------- */

.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter); }
.prose { max-width: var(--measure); }

section { padding: 72px 0 8px; }
section + section { border-top: 1px solid var(--rule); margin-top: 64px; }

h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -.015em; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); font-weight: 700; margin-bottom: .5em; }
h3 { font-size: 1.25rem; font-weight: 650; margin-bottom: .35em; }
p { margin: 0 0 1em; }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 60ch; }

/* ---------- header ---------- */

.site-head {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.site-head .wrap { display: flex; align-items: center; gap: 20px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; white-space: nowrap; }
.brand img { width: 28px; height: 28px; border-radius: 6px; }
.site-nav { display: flex; gap: 18px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: .95rem; white-space: nowrap; }
.site-nav a:hover { color: var(--ink); }
.theme-btn {
  flex: none; width: 34px; height: 34px; display: grid; place-items: center;
  border: 1px solid var(--rule); border-radius: 8px; background: var(--surface); color: var(--ink); cursor: pointer;
}
@media (max-width: 860px) { .site-nav { display: none; } .theme-btn { margin-left: auto; } }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px; border-radius: 8px;
  font: 600 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer;
  border: 1px solid var(--rule); background: var(--surface); color: var(--ink);
}
.btn:hover { border-color: var(--muted); }
.btn-add { background: var(--add); border-color: var(--add); color: #fff; }
.btn-add:hover { filter: brightness(1.08); border-color: var(--add); }
:root[data-theme="dark"] .btn-add { color: #08130c; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-add { color: #08130c; } }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 0; }

.install-cmd {
  display: flex; align-items: center; gap: 0; margin-top: 16px; max-width: 560px;
  border: 1px solid var(--rule); border-radius: 8px; background: var(--surface); overflow: hidden;
}
.install-cmd code { background: none; padding: 10px 14px; flex: 1; overflow-x: auto; white-space: nowrap; font-size: .85rem; }
.install-cmd button {
  border: 0; border-left: 1px solid var(--rule); background: transparent; color: var(--muted);
  padding: 10px 14px; font: 500 .85rem var(--sans); cursor: pointer; align-self: stretch;
}
.install-cmd button:hover { color: var(--ink); }

/* ---------- hero: the headline is a diff hunk ---------- */

.hero { padding: 64px 0 0; }
.hunk-head {
  font-family: var(--mono); font-size: .85rem; color: var(--hunk);
  background: var(--hunk-bg); display: inline-block; padding: 4px 10px; border-radius: 6px 6px 0 0;
}
.hero h1 { font-size: clamp(2rem, 6.2vw, 4.6rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.04; }
.hero h1 .line {
  display: grid; grid-template-columns: 1.1em 1fr; align-items: baseline;
  padding: .12em .3em .16em 0;
}
.hero h1 .sign { font-family: var(--mono); font-weight: 500; font-size: .7em; text-align: center; }
.hero h1 .del { background: var(--del-bg); color: var(--muted); }
.hero h1 .del .sign { color: var(--del); }
.hero h1 .del .txt { text-decoration: line-through; text-decoration-color: var(--del); text-decoration-thickness: .06em; font-weight: 600; }
.hero h1 .add { background: var(--add-bg); }
.hero h1 .add .sign { color: var(--add); }
.hero h1 .txt code { font-size: .82em; background: none; padding: 0; }

.hero-copy { margin-top: 32px; }
.hero-shot { margin: 56px auto 0; }

@media (prefers-reduced-motion: no-preference) {
  .hero h1 .add { animation: grow .7s .35s cubic-bezier(.2, .7, .2, 1) both; transform-origin: left center; }
  .hero h1 .del .txt { animation: strike .5s .1s ease-out both; }
}
@keyframes grow { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes strike { from { text-decoration-color: transparent; } to { text-decoration-color: var(--del); } }

/* ---------- screenshots ---------- */

figure { margin: 0; }
.shot img {
  width: 100%; border-radius: 10px; border: 1px solid var(--rule);
  box-shadow: var(--shot-shadow); background: #0d1117;
}
.shot a { display: block; }
figcaption { color: var(--muted); font-size: .95rem; margin-top: 12px; max-width: var(--measure); }

/* ---------- feature split ---------- */

.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: start; margin-top: 40px; }
.split.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.split.flip > :first-child { order: 2; }
@media (max-width: 900px) { .split, .split.flip { grid-template-columns: 1fr; gap: 24px; } .split.flip > :first-child { order: 0; } }

.ways { list-style: none; padding: 0; margin: 32px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0; border-top: 1px solid var(--rule); }
.ways li { padding: 22px 24px 22px 0; border-bottom: 1px solid var(--rule); }
.ways h3 { margin-bottom: .25em; }
.ways p { margin: 0 0 .6em; color: var(--muted); font-size: .98rem; }
.ways .how { font-size: .9rem; color: var(--ink); }

.facts { list-style: none; padding: 0; margin: 0; }
.facts li { padding: 14px 0 14px 28px; position: relative; border-bottom: 1px solid var(--rule); }
.facts li:first-child { border-top: 1px solid var(--rule); }
.facts li::before {
  content: "+"; position: absolute; left: 4px; top: 14px;
  font-family: var(--mono); color: var(--add); font-weight: 700;
}
.facts strong { font-weight: 650; }

/* ---------- diff view switcher ---------- */

.tabs { display: flex; gap: 4px; margin: 32px 0 16px; border-bottom: 1px solid var(--rule); flex-wrap: wrap; }
.tabs button {
  font: 600 .95rem var(--sans); color: var(--muted); background: none; border: 0;
  padding: 10px 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer;
}
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--add); }
.tabpanel[hidden] { display: none; }

/* ---------- search demo ---------- */

.demo {
  margin-top: 32px; border: 1px solid var(--rule); border-radius: 10px; background: var(--surface); overflow: hidden;
}
.demo-bar { display: flex; gap: 8px; padding: 12px; border-bottom: 1px solid var(--rule); align-items: center; flex-wrap: wrap; }
.demo-bar input[type="search"] {
  flex: 1 1 280px; min-width: 0; font: 400 .92rem var(--mono); color: var(--ink);
  background: var(--paper); border: 1px solid var(--rule); border-radius: 6px; padding: 9px 12px;
}
.demo-bar input[type="search"].invalid { border-color: var(--del); }
.toggle {
  font: 600 .85rem var(--mono); padding: 8px 10px; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--rule); background: var(--paper); color: var(--muted);
}
.toggle[aria-pressed="true"] { color: var(--ink); border-color: var(--hunk); background: var(--hunk-bg); }
.demo-count { font-size: .85rem; color: var(--muted); white-space: nowrap; }
.demo-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--rule); background: var(--paper); }
.demo-chips span { font-size: .85rem; color: var(--muted); margin-right: 4px; align-self: center; }
.chip {
  font: 500 .8rem var(--mono); padding: 4px 8px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--rule); background: var(--surface); color: var(--ink);
}
.chip:hover { border-color: var(--hunk); }
.demo-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.demo-table th { text-align: left; font-weight: 600; color: var(--muted); font-size: .8rem; padding: 8px 12px; border-bottom: 1px solid var(--rule); }
.demo-table td { padding: 8px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.demo-table tr:last-child td { border-bottom: 0; }
.demo-table .h { font-family: var(--mono); font-size: .8rem; color: var(--hunk); }
.demo-table .d { white-space: nowrap; color: var(--muted); }
.tag { font: 600 .72rem var(--mono); background: var(--hunk-bg); color: var(--hunk); padding: 1px 6px; border-radius: 4px; margin-right: 6px; }
.demo-empty { padding: 24px 12px; color: var(--muted); }
.demo-scroll { overflow-x: auto; max-height: 420px; overflow-y: auto; }
@media (max-width: 640px) { .demo-table .col-author, .demo-table .col-files { display: none; } }

.syntax { width: 100%; border-collapse: collapse; margin-top: 32px; font-size: .95rem; }
.syntax th, .syntax td { text-align: left; padding: 10px 16px 10px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.syntax th { font-size: .85rem; color: var(--muted); font-weight: 600; }
.syntax td:first-child { white-space: nowrap; }

/* ---------- tables (shortcuts, settings) ---------- */

.table-scroll { overflow-x: auto; }
.ref { width: 100%; border-collapse: collapse; font-size: .95rem; }
.ref caption { text-align: left; font-weight: 650; font-size: 1.05rem; padding: 28px 0 8px; }
.ref th, .ref td { text-align: left; padding: 9px 16px 9px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.ref th { font-size: .82rem; color: var(--muted); font-weight: 600; }
.ref td:first-child { white-space: nowrap; width: 1%; }
.cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; }
@media (max-width: 900px) { .cols-2 { grid-template-columns: 1fr; } }

.os-switch { display: inline-flex; border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; margin-top: 8px; }
.os-switch button { font: 600 .9rem var(--sans); padding: 8px 14px; border: 0; background: var(--surface); color: var(--muted); cursor: pointer; }
.os-switch button + button { border-left: 1px solid var(--rule); }
.os-switch button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* ---------- menus ---------- */

.menu-list { list-style: none; padding: 0; margin: 0; border: 1px solid var(--rule); border-radius: 10px; background: var(--surface); }
.menu-list li { padding: 10px 16px; border-bottom: 1px solid var(--rule); }
.menu-list li:last-child { border-bottom: 0; }
.menu-list b { font-weight: 600; display: block; }
.menu-list span { color: var(--muted); font-size: .92rem; }
.menu-list li.sep { border-top: 1px solid var(--rule); }

.platforms { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.platforms li { border: 1px solid var(--rule); border-radius: 999px; padding: 4px 12px; font-size: .9rem; background: var(--surface); }

/* ---------- changelog rail (a real sequence, so it gets a commit graph) ---------- */

.rail { list-style: none; padding: 0; margin: 32px 0 0; max-width: 820px; }
.rail li { position: relative; padding: 0 0 32px 36px; }
.rail li::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: -8px; width: 2px; background: var(--rule); }
.rail li:last-child::before { display: none; }
.rail li::after {
  content: ""; position: absolute; left: 0; top: 6px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--paper); border: 3px solid var(--add);
}
.rail li.next::after { border-color: var(--hunk); border-style: dashed; }
.rail h3 { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.rail time, .rail .when { font-size: .9rem; color: var(--muted); font-weight: 400; }
.rail ul { margin: 6px 0 0; padding-left: 1.1em; color: var(--ink); }
.rail ul li { padding: 0; margin: 0 0 4px; }
.rail ul li::before, .rail ul li::after { display: none; }

/* ---------- requirements / footer ---------- */

.req { list-style: none; padding: 0; margin: 0; }
.req li { padding: 10px 0; border-bottom: 1px solid var(--rule); }

.site-foot { border-top: 1px solid var(--rule); margin-top: 96px; padding: 32px 0 48px; color: var(--muted); font-size: .95rem; }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-foot a { color: var(--muted); }

.note { color: var(--muted); font-size: .95rem; }
