/* WraithVim site — TokyoNight Night, laid out like a Neovim session. */

@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/JetBrainsMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/JetBrainsMono-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/JetBrainsMono-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #1a1b26;
  --bg-dark: #16161e;
  --bg-float: #1f2335;
  --bg-hl: #292e42;
  --bg-visual: #283457;
  --gutter: #3b4261;
  --fg: #c0caf5;
  --fg-dim: #a9b1d6;
  --muted: #8189b0;
  --comment: #565f89;
  --blue: #7aa2f7;
  --cyan: #7dcfff;
  --sky: #89ddff;
  --magenta: #bb9af7;
  --orange: #ff9e64;
  --yellow: #e0af68;
  --green: #9ece6a;
  --teal: #73daca;
  --red: #f7768e;

  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --line: 1.65rem; /* one "editor line"; the gutter steps by this */
  --tab-h: 2.25rem;
  --status-h: 1.75rem;
  --wrap: 72rem;
  --radius: 6px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--tab-h) + 1rem); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

html, body { overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg-dim);
  font: 400 1rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  padding: var(--tab-h) 0 var(--status-h);
}

::selection { background: var(--bg-visual); color: var(--fg); }

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 3px; }

code, kbd, pre { font-family: var(--mono); }
code { font-size: .88em; color: var(--fg); background: var(--bg-hl); padding: .1em .38em; border-radius: 4px; }
kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: .05em .45em;
  font-size: .8em;
  line-height: 1.5;
  text-align: center;
  color: var(--fg);
  background: var(--bg-float);
  border: 1px solid var(--gutter);
  border-bottom-width: 2px;
  border-radius: 4px;
}
b, strong { color: var(--fg); font-weight: 600; }

.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 1rem; top: calc(var(--tab-h) + .5rem); z-index: 50; background: var(--blue); color: var(--bg); padding: .4rem .8rem; }

/* ------------------------------------------------------------------ */
/* Tabline (bufferline) */

.tabline {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 30;
  height: var(--tab-h);
  display: flex;
  align-items: stretch;
  background: var(--bg-dark);
  border-bottom: 1px solid #0f1017;
  font: 400 .8rem/1 var(--mono);
}
.tabline__offset {
  flex: 0 0 auto;
  width: 13.5rem;
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: 0 1rem;
  color: var(--blue);
  font-weight: 700;
  border-right: 1px solid #0f1017;
}
.tabline__offset:hover { text-decoration: none; color: var(--cyan); }
.logo-mark { width: 1.05rem; height: 1.05rem; }
.tabline__tabs { display: flex; overflow-x: auto; scrollbar-width: none; }
.tabline__tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative;
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: 0 1rem;
  color: var(--comment);
  white-space: nowrap;
  border-right: 1px solid #0f1017;
  transition: color .2s, background .2s;
}
.tab:hover { color: var(--fg-dim); text-decoration: none; background: #1b1c28; }
.tab.is-active { color: var(--fg); background: var(--bg); }
.tab.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--blue);
}
.tab__ico { font-size: .75rem; }
.tab__ico.lua { color: var(--blue); }
.tab__ico.sh { color: var(--green); }
.tab__ico.md { color: var(--cyan); }
.tabline__right { margin-left: auto; display: flex; align-items: center; padding: 0 .9rem; }
.gh { display: flex; align-items: center; gap: .55rem; color: var(--fg-dim); }
.gh svg { width: 1rem; height: 1rem; }
.gh:hover { color: var(--fg); text-decoration: none; }
.gh__stars { color: var(--yellow); padding-left: .55rem; border-left: 1px solid var(--gutter); white-space: nowrap; }

/* ------------------------------------------------------------------ */
/* Line-number gutter (fixed, relative numbers around the cursor line) */

.gutter {
  position: fixed;
  top: var(--tab-h);
  bottom: var(--status-h);
  left: 0;
  width: 3.2rem;
  z-index: 5;
  overflow: hidden;
  pointer-events: none;
  font: 400 .75rem/var(--line) var(--mono);
  color: var(--gutter);
  text-align: right;
  padding-right: .8rem;
  user-select: none;
}
.gutter span { display: block; height: var(--line); }
.gutter .is-cursor { color: var(--orange); font-weight: 700; }
@media (max-width: 64rem) { .gutter { display: none; } }

/* ------------------------------------------------------------------ */
/* Sections ("buffers") */

main { position: relative; }
.buffer {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 6rem 2rem 2rem 4.5rem;
}
@media (max-width: 64rem) { .buffer { padding: 4.5rem 1.25rem 1.5rem; } }

.buffer__head { max-width: 46rem; margin-bottom: 2.5rem; }
.path {
  margin: 0 0 .7rem;
  font: 400 .78rem/1 var(--mono);
  color: var(--comment);
}
.path b { color: var(--fg-dim); font-weight: 400; }
h1, h2, h3, h4 { color: var(--fg); font-family: var(--mono); line-height: 1.25; letter-spacing: -.01em; }
h2 { margin: 0 0 .8rem; font-size: clamp(1.6rem, 2.6vw, 2.15rem); }
h2::before { content: "# "; color: var(--blue); }
h3 { margin: 0 0 .5rem; font-size: 1.02rem; }
h4 { margin: 0 0 .35rem; font-size: .9rem; }
.lede { margin: 0; color: var(--fg-dim); font-size: 1.06rem; }
.note { margin: .7rem 0 0; color: var(--muted); font-size: .9rem; }

/* ------------------------------------------------------------------ */
/* Dashboard (hero) */

.dashboard { min-height: calc(100vh - var(--tab-h) - var(--status-h)); display: flex; align-items: center; padding-top: 3rem; }
.dash { width: 100%; max-width: 50rem; margin: 0 auto; text-align: center; }
.dash__logo {
  margin: 0 auto 1.6rem;
  display: inline-block;
  text-align: left;
  font-size: clamp(.55rem, 1.3vw, .95rem);
  line-height: 1.32;
  letter-spacing: .02em;
  background: linear-gradient(100deg, var(--blue) 10%, var(--magenta) 60%, var(--cyan) 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.dash__title { margin: 0 0 1rem; font-size: clamp(1.7rem, 4vw, 2.9rem); }
.caret {
  display: inline-block;
  width: .55em;
  height: 1em;
  margin-left: .12em;
  vertical-align: -.12em;
  background: var(--fg);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.dash__lede { max-width: 38rem; margin: 0 auto 2.2rem; font-size: 1.1rem; }

.dash__items {
  list-style: none;
  padding: 0;
  margin: 0 auto 2.2rem;
  max-width: 24rem;
  text-align: left;
  font: 400 .95rem/1 var(--mono);
}
.dash__items a {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .55rem .75rem;
  color: var(--fg-dim);
  border-radius: 4px;
  transition: background .15s, color .15s;
}
.dash__items a::before { content: "›"; color: var(--comment); transition: color .15s, transform .2s var(--ease); }
.dash__items a:hover,
.dash__items a:focus-visible { background: var(--bg-hl); color: var(--fg); text-decoration: none; }
.dash__items a:hover::before { color: var(--blue); transform: translateX(3px); }
.item__label { flex: 1; display: flex; align-items: center; gap: .7rem; }
.item__label::after { content: ""; flex: 1; border-bottom: 1px dotted var(--gutter); transform: translateY(.15em); }
.dash__items kbd { color: var(--blue); }

.cta { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: .9rem; margin-bottom: 2.2rem; }
.cta .cmd { width: min(100%, 46rem); text-align: left; font-size: .8rem; }
.cta__or { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .8rem; font: 400 .8rem/1 var(--mono); color: var(--comment); }

.cmd {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  padding: .8rem .9rem;
  background: var(--bg-dark);
  border: 1px solid var(--gutter);
  border-radius: var(--radius);
  font-size: .86rem;
}
.cmd code { flex: 1; min-width: 0; overflow-x: auto; background: none; padding: 0; color: var(--fg); white-space: pre; line-height: 1.6; font-size: inherit; scrollbar-width: thin; }
.cmd__prompt { color: var(--green); font-family: var(--mono); line-height: 1.6; }
.copy {
  flex: 0 0 auto;
  font: 400 .72rem/1 var(--mono);
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--gutter);
  border-radius: 4px;
  padding: .35rem .55rem;
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.copy:hover { color: var(--fg); border-color: var(--blue); }
.copy.is-done { color: var(--bg); background: var(--green); border-color: var(--green); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1rem;
  font: 400 .86rem/1 var(--mono);
  border-radius: var(--radius);
  border: 1px solid var(--gutter);
  color: var(--fg);
  white-space: nowrap;
}
.btn svg { width: 1rem; height: 1rem; }
.btn--ghost:hover { border-color: var(--blue); color: var(--blue); text-decoration: none; }

/* lualine-style stats */
.lualine {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0;
  font: 400 .8rem/1 var(--mono);
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg-dark);
}
.seg { display: flex; align-items: baseline; gap: .45rem; padding: .6rem .95rem; margin: 0; }
.seg dt { color: inherit; opacity: .72; }
.seg dd { margin: 0; font-weight: 700; }
.seg--a { background: var(--blue); color: var(--bg-dark); clip-path: polygon(0 0, calc(100% - .55rem) 0, 100% 50%, calc(100% - .55rem) 100%, 0 100%); padding-right: 1.3rem; }
.seg--b { background: var(--gutter); color: var(--fg); clip-path: polygon(0 0, calc(100% - .55rem) 0, 100% 50%, calc(100% - .55rem) 100%, 0 100%); padding-right: 1.3rem; margin-left: -.3rem; padding-left: 1.1rem; }
.seg--c { color: var(--fg-dim); }
.seg--c + .seg--c { border-left: 1px solid var(--gutter); }
.seg--z { background: var(--blue); color: var(--bg-dark); clip-path: polygon(.55rem 0, 100% 0, 100% 100%, .55rem 100%, 0 50%); padding-left: 1.3rem; }
.footnote { margin: 1rem auto 0; max-width: 34rem; font-size: .8rem; color: var(--comment); }
.footnote a { color: var(--muted); text-decoration: underline; text-decoration-color: var(--gutter); }

/* ------------------------------------------------------------------ */
/* Install */

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.2rem; max-width: 50rem; }
.step { padding: 1.3rem 1.4rem; background: var(--bg-dark); border: 1px solid #22243a; border-radius: var(--radius); }
.step h3 { display: flex; align-items: center; gap: .7rem; margin-bottom: .9rem; }
.step__n {
  display: inline-grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  font-size: .8rem;
  color: var(--bg);
  background: var(--blue);
  border-radius: 4px;
}
.step .cmd { background: var(--bg); }

.tabs__bar { display: flex; flex-wrap: wrap; gap: .25rem; margin-bottom: .6rem; }
.tabs__bar button {
  font: 400 .78rem/1 var(--mono);
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: .45rem .7rem;
  cursor: pointer;
}
.tabs__bar button:hover { color: var(--fg); }
.tabs__bar button[aria-selected="true"] { color: var(--fg); background: var(--bg-hl); border-color: var(--gutter); }

.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(18rem, 100%), 1fr)); gap: 1.2rem; max-width: 50rem; margin-top: 1.2rem; }

.pane {
  position: relative;
  padding: 2.4rem 1.3rem 1.2rem;
  background: var(--bg-dark);
  border: 1px solid #22243a;
  border-radius: var(--radius);
}
.pane p { margin: 0; }
.pane .note { margin-top: .8rem; }
.pane__bar {
  position: absolute;
  inset: 0 0 auto 0;
  padding: .45rem 1rem !important;
  font: 400 .74rem/1 var(--mono);
  color: var(--muted);
  background: #1b1c29;
  border-bottom: 1px solid #22243a;
  border-radius: var(--radius) var(--radius) 0 0;
}
.pane__bar::before { content: "▸ "; color: var(--blue); }

/* ------------------------------------------------------------------ */
/* First steps: lessons + demo */

.learn { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 2.5rem; align-items: start; }
@media (max-width: 64rem) { .learn { grid-template-columns: minmax(0, 1fr); } .demo { order: -1; position: static; } }

.lessons { list-style: none; margin: 0; padding: 0; counter-reset: lesson; display: grid; gap: .4rem; }
.lesson {
  counter-increment: lesson;
  position: relative;
  padding: 1rem 1rem 1rem 3rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
.lesson::before {
  content: counter(lesson);
  position: absolute;
  left: 1rem;
  top: 1.05rem;
  font: 700 .82rem/1 var(--mono);
  color: var(--comment);
}
.lesson:hover { background: #1c1d2b; }
.lesson.is-playing { background: var(--bg-hl); border-color: var(--gutter); }
.lesson.is-playing::before { color: var(--orange); }
.lesson p { margin: 0; font-size: .95rem; }

.demo { position: sticky; top: calc(var(--tab-h) + 1.5rem); margin: 0; }
.win {
  overflow: hidden;
  font: 400 .78rem/1.55 var(--mono);
  background: var(--bg);
  border: 1px solid var(--gutter);
  border-radius: 8px;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .65), 0 0 0 6px #14151f;
}
.win__tabs { display: flex; align-items: stretch; height: 1.8rem; background: var(--bg-dark); color: var(--comment); }
.win__offset { width: 9.5rem; display: flex; align-items: center; padding-left: .7rem; color: var(--blue); border-right: 1px solid #0f1017; transition: width .35s var(--ease), opacity .3s; overflow: hidden; white-space: nowrap; }
.win__tab { display: flex; align-items: center; padding: 0 .8rem; border-right: 1px solid #0f1017; }
.win__tab.is-active { color: var(--fg); background: var(--bg); box-shadow: inset 2px 0 var(--blue); }
.win__right { margin-left: auto; display: flex; align-items: center; padding: 0 .8rem; color: var(--magenta); }
.win__body { position: relative; display: flex; height: 19rem; }
.win__tree {
  width: 9.5rem;
  padding: .5rem .6rem;
  border-right: 1px solid #0f1017;
  background: var(--bg-dark);
  color: var(--fg-dim);
  white-space: nowrap;
  overflow: hidden;
  transition: width .35s var(--ease), padding .35s var(--ease), opacity .3s;
}
.t-dir { color: var(--blue); }
.t-in { padding-left: .8rem; }
.t-in2 { padding-left: 1.7rem; }
.t-file.is-current { background: var(--bg-hl); color: var(--fg); }
.demo[data-tree="closed"] .win__tree,
.demo[data-tree="closed"] .win__offset { width: 0; padding-left: 0; padding-right: 0; opacity: 0; }
.win__code { flex: 1; min-width: 0; padding: .5rem .8rem; overflow: hidden; }
.win__code pre, .win__graph pre { margin: 0; font: inherit; color: var(--fg); }
.ln { display: inline-block; width: 1.6rem; color: var(--gutter); }
.k { color: var(--magenta); }
.s { color: var(--green); }
.f { color: var(--blue); }
.typed::after { content: ""; }

.win__popup {
  position: absolute;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  background: var(--bg-float);
  border: 1px solid var(--gutter);
  border-radius: 6px;
  transition: opacity .2s var(--ease), transform .25s var(--ease);
}
.demo[data-show~="wk"] .win__wk,
.demo[data-show~="picker"] .win__picker { opacity: 1; transform: none; }
.win__wk {
  left: .6rem;
  right: .6rem;
  bottom: .6rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: .2rem 1rem;
  padding: .6rem .8rem;
}
.wk__row { color: var(--fg-dim); white-space: nowrap; }
.wk__row b { color: var(--orange); margin-right: .45rem; }
.wk__row.g { color: var(--magenta); }
.win__picker { left: 12%; right: 12%; top: 1.2rem; padding: .3rem 0; }
.picker__prompt { padding: .35rem .8rem; border-bottom: 1px solid var(--gutter); color: var(--magenta); }
.picker__q { color: var(--fg); }
.picker__cur { display: inline-block; width: .5em; height: 1.05em; vertical-align: -.18em; background: var(--fg); animation: blink 1s steps(1) infinite; }
.picker__list { padding: .3rem 0; min-height: 6.5rem; }
.pick { display: flex; justify-content: space-between; gap: 1rem; padding: .12rem .8rem; color: var(--fg-dim); }
.pick.is-sel { background: var(--bg-visual); color: var(--fg); }
.pick .kk { color: var(--comment); }
.pick mark { background: none; color: var(--orange); }

.win__term {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0;
  overflow: hidden;
  background: var(--bg-dark);
  border-top: 1px solid var(--gutter);
  transition: height .35s var(--ease);
}
.demo[data-show~="term"] .win__term { height: 7.5rem; }
.term__bar { display: flex; gap: 1rem; padding: .15rem .7rem; color: var(--blue); background: #1b1c29; }
.term__bar span:nth-child(2) { color: var(--comment); }
.term__btns { margin-left: auto; color: var(--yellow); }
.term__body { padding: .4rem .7rem; color: var(--fg); }
.pr { color: var(--green); }

.win__graph {
  position: absolute;
  inset: 0;
  padding: .7rem 1rem;
  background: var(--bg);
  opacity: 0;
  transition: opacity .25s;
}
.demo[data-show~="graph"] .win__graph { opacity: 1; }
.g1 { color: var(--blue); }
.g2 { color: var(--magenta); }
.h { color: var(--yellow); }
.d { color: var(--green); }

.win__status { display: flex; height: 1.55rem; align-items: stretch; background: var(--bg-dark); }
.win__status > span { display: flex; align-items: center; padding: 0 .65rem; white-space: nowrap; }
.st-mode { background: var(--blue); color: var(--bg-dark); font-weight: 700; transition: background .2s; }
.demo[data-mode="insert"] .st-mode { background: var(--green); }
.demo[data-mode="terminal"] .st-mode { background: var(--teal); }
.st-b { background: var(--gutter); color: var(--fg); }
.st-c { color: var(--fg-dim); }
.st-fill { flex: 1; }
.st-x, .st-y { color: var(--muted); }
.st-z { background: var(--blue); color: var(--bg-dark); }

.demo__keys {
  display: flex;
  align-items: center;
  gap: .8rem;
  margin-top: .9rem;
  min-height: 2rem;
  font: 400 .82rem/1 var(--mono);
  color: var(--muted);
}
.demo__label { color: var(--fg-dim); }
.demo__pressed { display: flex; gap: .3rem; flex-wrap: wrap; }
.demo__pressed kbd { animation: pop .25s var(--ease); }
@keyframes pop { from { transform: translateY(4px) scale(.9); opacity: 0; } }
.demo__replay {
  margin-left: auto;
  font: inherit;
  color: var(--muted);
  background: none;
  border: 1px solid var(--gutter);
  border-radius: 4px;
  padding: .35rem .6rem;
  cursor: pointer;
}
.demo__replay:hover { color: var(--fg); border-color: var(--blue); }

.cheats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr)); gap: 1rem; margin-top: 2.5rem; }
.cheat { padding: 1rem 1.1rem; border-left: 2px solid var(--gutter); }
.cheat p { margin: 0; font-size: .9rem; }

/* ------------------------------------------------------------------ */
/* Keys */

.keys__tools { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; margin-bottom: 1rem; }
.search {
  flex: 1 1 18rem;
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: 0 .9rem;
  background: var(--bg-dark);
  border: 1px solid var(--gutter);
  border-radius: var(--radius);
  transition: border-color .15s;
}
.search:focus-within { border-color: var(--blue); }
.search__slash { color: var(--orange); font-family: var(--mono); }
.search input {
  flex: 1;
  min-width: 0;
  padding: .75rem 0;
  font: 400 .9rem/1 var(--mono);
  color: var(--fg);
  background: transparent;
  border: 0;
  outline: none;
}
.search input::placeholder { color: var(--comment); }
.chips { display: flex; flex-wrap: wrap; gap: .3rem; }
.chip {
  font: 400 .74rem/1 var(--mono);
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--gutter);
  border-radius: 99px;
  padding: .4rem .7rem;
  cursor: pointer;
}
.chip:hover { color: var(--fg); }
.chip[aria-pressed="true"] { color: var(--bg); background: var(--blue); border-color: var(--blue); }

.keys__table { max-height: 34rem; overflow: auto; border: 1px solid #22243a; border-radius: var(--radius); background: var(--bg-dark); }
.keys__table table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.keys__table th {
  position: sticky;
  top: 0;
  z-index: 1;
  text-align: left;
  font: 400 .72rem/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--comment);
  background: #1b1c29;
  padding: .7rem 1rem;
}
.keys__table td { padding: .55rem 1rem; border-top: 1px solid #1f2133; vertical-align: middle; }
.keys__table tr:hover td { background: #1c1e2c; }
.keys__table td:first-child { white-space: nowrap; }
.keys__table td:last-child { color: var(--comment); font: 400 .78rem/1 var(--mono); white-space: nowrap; }
.combo { display: inline-flex; align-items: center; gap: .15rem; margin-right: .35rem; }
.combo i { color: var(--comment); font-style: normal; font-size: .75rem; }
.keys__table mark { background: rgba(255, 158, 100, .18); color: var(--orange); border-radius: 2px; }
.keys__empty { padding: 1.5rem; margin: 0; text-align: center; color: var(--muted); }

/* ------------------------------------------------------------------ */
/* Features */

.splits { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; }
.pane--wide { grid-column: span 2; }
@media (max-width: 64rem) { .splits { grid-template-columns: minmax(0, 1fr); } .pane--wide { grid-column: auto; } }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; font-size: .93rem; }
.ticks li { position: relative; padding-left: 1.2rem; }
.ticks li::before { content: "+"; position: absolute; left: 0; color: var(--green); font-family: var(--mono); }
.langs { width: 100%; border-collapse: collapse; font-size: .88rem; }
.langs th { text-align: left; font: 400 .72rem/1 var(--mono); color: var(--comment); text-transform: uppercase; letter-spacing: .06em; padding: .3rem .5rem .6rem 0; }
.langs td { padding: .38rem .5rem .38rem 0; border-top: 1px solid #1f2133; }
.langs td:first-child { color: var(--fg); }
.langs td:not(:first-child) { font-family: var(--mono); font-size: .8rem; color: var(--cyan); }
.meters { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.meter { display: grid; grid-template-columns: auto 1fr; align-items: baseline; column-gap: .3rem; }
.meter__v { font: 700 2.1rem/1 var(--mono); color: var(--fg); }
.meter__u { font: 400 .85rem/1 var(--mono); color: var(--blue); }
.meter__l { grid-column: 1 / -1; font-size: .8rem; color: var(--muted); margin-top: .25rem; }

/* ------------------------------------------------------------------ */
/* Config */

.tabs--code { max-width: 50rem; }
.code { background: var(--bg-dark); border: 1px solid #22243a; border-radius: var(--radius); overflow-x: auto; }
.code pre { margin: 0; padding: 1.2rem 1.3rem; font-size: .86rem; line-height: 1.7; color: var(--fg); }
.code .c { color: var(--comment); font-style: italic; }
.code .k { color: var(--magenta); }
.code .s { color: var(--green); }
.code .n { color: var(--orange); }
.code .o { color: var(--sky); }

.final { margin: 4rem 0 2rem; }
.final__line { margin: 0; font: 400 1rem/1.6 var(--mono); color: var(--fg-dim); }
.final__mode { color: var(--yellow); margin-right: .1rem; }

.foot { max-width: var(--wrap); margin: 0 auto; padding: 2rem 2rem 3rem 4.5rem; font-size: .85rem; color: var(--comment); border-top: 1px solid #1f2133; }
.foot p { margin: .3rem 0; }
.foot a { color: var(--muted); }
.foot__hint kbd { font-size: .72em; }
@media (max-width: 64rem) { .foot { padding: 2rem 1.25rem 3rem; } }

/* ------------------------------------------------------------------ */
/* What's new: release log drawn like a git graph */

.log-wrap { max-width: 50rem; }
.log { list-style: none; margin: 0; padding: 0 0 0 1.6rem; position: relative; }
.log::before { content: ""; position: absolute; left: .42rem; top: .9rem; bottom: .9rem; width: 2px; background: var(--gutter); }
.log__loading { color: var(--muted); padding: .5rem 0; }
.rel { position: relative; margin-bottom: .6rem; }
.rel::before {
  content: "";
  position: absolute;
  left: -1.48rem;
  top: 1rem;
  width: .7rem;
  height: .7rem;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--blue);
}
.rel.is-latest::before { background: var(--blue); box-shadow: 0 0 0 4px rgba(122, 162, 247, .18); }
.rel details { background: var(--bg-dark); border: 1px solid #22243a; border-radius: var(--radius); }
.rel details[open] { border-color: var(--gutter); }
.rel summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .4rem .8rem;
  padding: .8rem 1rem;
  cursor: pointer;
  list-style: none;
  font: 400 .9rem/1.4 var(--mono);
}
.rel summary::-webkit-details-marker { display: none; }
.rel summary::before { content: "▸"; color: var(--comment); transition: transform .2s var(--ease); }
.rel details[open] summary::before { transform: rotate(90deg); color: var(--blue); }
.rel summary:hover .rel__title { color: var(--fg); }
.rel__tag { color: var(--yellow); font-weight: 700; }
.rel__title { color: var(--fg-dim); flex: 1; min-width: 12rem; }
.rel__badge { font-size: .7rem; color: var(--bg); background: var(--green); padding: .15rem .45rem; border-radius: 3px; }
.rel time { color: var(--comment); font-size: .78rem; }
.rel__body { padding: .2rem 1.2rem .4rem 2.15rem; border-top: 1px solid #1f2133; }
.rel__link { display: inline-block; margin: 0 1.2rem 1rem 2.15rem; font: 400 .8rem/1 var(--mono); }

.md { font-size: .94rem; }
.md h3, .md h4, .md h5, .md h6 { margin: 1.2rem 0 .5rem; font-size: .95rem; color: var(--fg); }
.md h4::before { content: "## "; color: var(--comment); }
.md h5::before { content: "### "; color: var(--comment); }
.md p { margin: .55rem 0; }
.md ul, .md ol { margin: .5rem 0; padding-left: 1.3rem; }
.md li { margin: .25rem 0; }
.md li::marker { color: var(--blue); }
.md blockquote { margin: .7rem 0; padding: .1rem 0 .1rem .9rem; border-left: 2px solid var(--magenta); color: var(--muted); }
.md-code { margin: .7rem 0; padding: .8rem 1rem; overflow-x: auto; background: var(--bg); border: 1px solid #22243a; border-radius: 4px; font-size: .82rem; line-height: 1.6; }
.md-code code { background: none; padding: 0; color: var(--fg); }
.md-table { overflow-x: auto; margin: .7rem 0; }
.md table { border-collapse: collapse; font-size: .86rem; }
.md th, .md td { text-align: left; padding: .4rem .9rem .4rem 0; border-bottom: 1px solid #1f2133; vertical-align: top; }
.md th { font: 400 .72rem/1.4 var(--mono); color: var(--comment); text-transform: uppercase; letter-spacing: .05em; }

/* ------------------------------------------------------------------ */
/* Statusline + command line + site which-key */

.statusline {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 30;
  height: var(--status-h);
  display: flex;
  align-items: stretch;
  font: 400 .76rem/1 var(--mono);
  background: var(--bg-dark);
  border-top: 1px solid #0f1017;
}
.statusline > span { display: flex; align-items: center; padding: 0 .85rem; white-space: nowrap; }
.sl-mode { background: var(--blue); color: var(--bg-dark); font-weight: 700; transition: background .2s; }
body[data-mode="insert"] .sl-mode { background: var(--green); }
body[data-mode="visual"] .sl-mode { background: var(--magenta); }
body[data-mode="command"] .sl-mode { background: var(--yellow); }
.sl-b { background: var(--gutter); color: var(--fg); }
.sl-c { color: var(--fg-dim); }
.sl-msg { color: var(--green); opacity: 0; transition: opacity .25s; }
.sl-msg.is-on { opacity: 1; }
.sl-fill { flex: 1; padding: 0 !important; }
.sl-x { color: var(--muted); }
.sl-y { background: var(--gutter); color: var(--fg); }
.sl-z { background: var(--blue); color: var(--bg-dark); min-width: 4.5rem; justify-content: center; }
@media (max-width: 40rem) { .sl-b, .sl-x { display: none !important; } }

.cmdline {
  position: fixed;
  inset: auto 0 var(--status-h) 0;
  z-index: 31;
  display: flex;
  align-items: center;
  gap: .3rem;
  height: 2rem;
  padding: 0 .9rem;
  background: var(--bg);
  border-top: 1px solid var(--gutter);
  font: 400 .85rem/1 var(--mono);
}
.cmdline[hidden] { display: none; }
.cmdline__colon { color: var(--yellow); }
.cmdline input { flex: 1; font: inherit; color: var(--fg); background: transparent; border: 0; outline: none; }
.cmdline__hint { color: var(--comment); font-size: .75rem; }
@media (max-width: 40rem) { .cmdline__hint { display: none; } }

.wk-site {
  position: fixed;
  left: 50%;
  bottom: calc(var(--status-h) + .8rem);
  z-index: 32;
  transform: translateX(-50%);
  width: min(36rem, calc(100% - 2rem));
  padding: .9rem 1.1rem;
  background: var(--bg-float);
  border: 1px solid var(--gutter);
  border-radius: 8px;
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .7);
  font: 400 .85rem/1 var(--mono);
  animation: rise .2s var(--ease);
}
.wk-site[hidden] { display: none; }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 6px); } }
.wk-site__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: .7rem 1rem; }
.wk-site__grid a, .wk-site__grid span { color: var(--fg-dim); }
.wk-site__grid b { color: var(--orange); margin-right: .45rem; }

/* ------------------------------------------------------------------ */
/* Reveal on scroll */

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .caret, .picker__cur { animation: none; }
  .win__popup, .win__term, .win__tree, .win__offset, .win__graph { transition: none; }
}

/* ------------------------------------------------------------------ */
/* Small screens */

@media (max-width: 40rem) {
  .tabline__offset { width: auto; padding: 0 .75rem; }
  .tabline__offset .brand, .gh__name { display: none; }
  .gh__stars { border-left: 0; padding-left: 0; }
  .tab { padding: 0 .75rem; }
  .win { font-size: .7rem; }
  .win__tree, .win__offset { width: 6.5rem; }
  .win__body { height: 16rem; }
  .st-x, .st-y { display: none !important; }
  .seg { padding: .55rem .7rem; }
  .keys__table td:last-child, .keys__table th:last-child { display: none; }
}
