rootle 0.3.1

Modal TUI for browsing remote source-control systems (GitHub in-tree, any forge via stdio providers) from the terminal
Documentation
/* rootle site styles — every page shares one chrome: a left rail
   (brand, site nav, on-this-page TOC on docs) and a content column.
   Landing page: website/index.html. Docs pages: built from doc/*.md by
   website/build.py. Catppuccin Mocha. */
:root {
  --bg: #11111b; --card: #1e1e2e; --deep: #181825;
  --border: #313244; --text: #cdd6f4; --dim: #a6adc8; --faint: #6c7086;
  --blue: #89b4fa; --green: #a6e3a1; --yellow: #f9e2af; --peach: #fab387;
  --mono: ui-monospace, "DejaVu Sans Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--sans); line-height: 1.6; font-size: 16px;
}
a { color: var(--blue); text-decoration: none; }
code {
  font-family: var(--mono); font-size: 0.9em; color: var(--peach);
  background: var(--deep); border: 1px solid var(--border);
  border-radius: 5px; padding: 1px 5px; white-space: nowrap;
}

/* ---- shell: rail + content ---- */
.shell {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  min-height: 100vh;
  max-width: 1240px;
  margin-inline: auto;
}
.rail {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  border-right: 1px solid var(--border);
  padding: 26px 14px 36px 20px;
  font-family: var(--mono);
}
.rail .brand {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 12px; margin-bottom: 24px;
}
.rail .brand img { width: 30px; height: 30px; }
.rail .brand .wordmark { font-weight: 700; font-size: 18px; color: var(--text); }
.rail .rail-head {
  display: block; font-size: 10.5px; letter-spacing: 1.6px;
  text-transform: uppercase; color: var(--faint);
  margin: 20px 0 6px 12px;
}
.rail nav { display: flex; flex-direction: column; gap: 2px; }
.rail nav a {
  display: block; font-size: 14px; color: var(--dim);
  padding: 7px 12px; border-radius: 8px; line-height: 1.35;
}
.rail nav a:hover { background: var(--card); color: var(--text); text-decoration: none; }
.rail nav a.active { background: var(--card); color: var(--blue); }
.rail nav a.gh { color: var(--faint); margin-top: 14px; }
.rail nav a.gh:hover { color: var(--text); }
.rail-toc { margin-top: 4px; }
.rail-toc a {
  display: block; font-size: 12.5px; color: var(--faint);
  padding: 4px 12px; border-radius: 6px; line-height: 1.4;
}
.rail-toc a:hover { color: var(--text); background: var(--card); text-decoration: none; }
.content { padding: 0 32px; max-width: 940px; margin-inline: auto; }
body.docs .content { max-width: 800px; }

/* ---- shared blocks ---- */
section { padding: 32px 0 8px; }
h2.section {
  font-family: var(--mono); font-size: 15px; font-weight: 700;
  color: var(--faint); text-transform: lowercase; letter-spacing: 1px;
  margin: 0 0 20px;
}
h2.section::before { content: "\276F  "; color: var(--blue); font-size: 0.9em; }
pre {
  font-family: var(--mono); font-size: 14px; line-height: 1.7;
  background: var(--deep); border: 1px solid var(--border); border-radius: 12px;
  padding: 18px 22px; overflow-x: auto; margin: 0 0 14px;
}
pre .p { color: var(--green); }
pre .c { color: var(--faint); }
pre code { background: none; border: none; padding: 0; color: inherit; white-space: pre; }
.note { color: var(--faint); font-size: 14px; margin: 14px 0 0; }
.note code { border: none; padding: 0 2px; }
footer {
  margin-top: 64px; border-top: 1px solid var(--border); padding: 24px 0 44px;
  color: var(--faint); font-size: 14px; display: flex; gap: 18px; flex-wrap: wrap;
}

/* ---- home ---- */
body.home { background: linear-gradient(180deg, color-mix(in srgb, var(--card) 45%, var(--bg)) 0%, var(--bg) 320px); }
.hero { text-align: center; padding: 40px 0 0; }
.hero img.logo { width: min(460px, 100%); height: auto; }
.hero p.tagline { font-size: 19px; color: var(--dim); margin: 8px 0 4px; }
.hero p.sub { font-size: 15px; color: var(--faint); margin: 0 0 24px; }
.hero p.sub .chip {
  display: inline-block; font-family: var(--mono); font-size: 12px;
  color: var(--yellow); border: 1px solid var(--border); border-radius: 999px;
  padding: 1px 10px; margin-right: 8px; vertical-align: 1px;
}
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.cta a {
  font-family: var(--mono); font-size: 15px; padding: 10px 22px;
  border-radius: 10px; border: 1px solid var(--border);
}
.cta a.primary { background: var(--blue); color: var(--card); border-color: var(--blue); font-weight: 700; }
.cta a.primary:hover { text-decoration: none; filter: brightness(1.1); }
.cta a.ghost { color: var(--text); }
.cta a.ghost:hover { text-decoration: none; border-color: var(--blue); }
.demo img {
  width: 100%; border: 1px solid var(--border); border-radius: 12px;
  display: block; background: var(--card);
}
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 18px 20px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.card:hover { border-color: var(--blue); transform: translateY(-2px); }
.card h3 { font-family: var(--mono); font-size: 16px; margin: 0 0 6px; color: var(--text); }
.card h3 .key {
  display: inline-block; font-size: 12px; color: var(--blue);
  background: var(--deep); border: 1px solid var(--border);
  border-bottom: 2px solid var(--blue); border-radius: 5px;
  padding: 0 7px; margin-left: 8px; vertical-align: 2px;
}
.card p { margin: 0; color: var(--dim); font-size: 14px; }
.card code { border: none; padding: 0 2px; }
.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.shots figure { margin: 0; }
.shots img {
  width: 100%; display: block; border: 1px solid var(--border);
  border-radius: 10px; background: var(--card);
  transition: border-color 0.15s ease;
}
.shots figure:hover img { border-color: var(--blue); }
.shots figcaption { font-size: 13px; color: var(--faint); padding-top: 6px; text-align: center; }

/* ---- docs pages (built from doc/*.md) ---- */
article.md { padding: 12px 0 24px; min-width: 0; }
article.md h1 {
  font-family: var(--mono); font-size: 28px; margin: 20px 0 4px;
  padding-bottom: 12px; border-bottom: 1px solid var(--border);
}
article.md h2 {
  font-family: var(--mono); font-size: 17px; font-weight: 700;
  margin: 40px 0 12px; color: var(--text); scroll-margin-top: 16px;
}
article.md h2::before { content: "\276F  "; color: var(--blue); font-size: 0.9em; }
article.md h3 {
  font-family: var(--mono); font-size: 15px; font-weight: 700;
  margin: 28px 0 10px; color: var(--dim);
}

article.md p { color: var(--dim); margin: 12px 0; }
article.md p code, article.md li code { color: var(--peach); border: none; padding: 0 2px; }
article.md ul, article.md ol { color: var(--dim); padding-left: 26px; margin: 12px 0; }
article.md li { margin: 4px 0; }
article.md img {
  max-width: 100%; display: block; margin: 18px auto;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--card);
}
article.md table {
  width: 100%; border-collapse: collapse; margin: 16px 0;
  font-size: 14px; display: block; overflow-x: auto;
}
article.md th {
  font-family: var(--mono); font-size: 12px; text-align: left;
  color: var(--faint); letter-spacing: 0.5px;
  border-bottom: 2px solid var(--border); padding: 8px 12px 6px;
}
article.md td {
  color: var(--dim); border-bottom: 1px solid var(--border);
  padding: 8px 12px; vertical-align: top;
}
article.md td:first-child { white-space: nowrap; }
article.md td code { white-space: normal; }
article.md hr { border: none; border-top: 1px solid var(--border); margin: 24px 0; }
article.md blockquote {
  margin: 14px 0; padding: 2px 18px; color: var(--dim);
  border-left: 3px solid var(--blue);
}

/* ---- narrow screens: rail collapses to a top bar ---- */
@media (max-width: 880px) {
  .shell { display: block; }
  .rail {
    position: static; height: auto; overflow: visible;
    border-right: none; border-bottom: 1px solid var(--border);
    padding: 14px 20px 16px;
  }
  .rail .brand { margin-bottom: 10px; padding: 0; }
  .rail .rail-head { display: none; }
  .rail nav { flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .rail nav a { font-size: 13px; padding: 5px 12px; background: var(--card); }
  .rail nav a.gh { margin-top: 0; }
  .rail-toc { display: none; }
  .content { padding: 0 20px; }
}

/* ---- hero install box + chips ---- */
.chips { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 10px 0 14px; }
.chips .chip {
  font-family: var(--mono); font-size: 12px; color: var(--dim);
  border: 1px solid var(--border); border-radius: 999px;
  padding: 2px 12px; background: var(--card);
}
.install {
  display: flex; align-items: stretch; max-width: 620px; margin: 0 auto 10px;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--deep); overflow: hidden;
}
.install pre {
  flex: 1; margin: 0; border: none; background: none; border-radius: 0;
  padding: 13px 18px; font-size: 13.5px; white-space: nowrap; overflow-x: auto;
  text-align: left;
}
.install .copy {
  font-family: var(--mono); font-size: 13px; color: var(--blue);
  background: var(--card); border: none; border-left: 1px solid var(--border);
  padding: 0 16px; cursor: pointer;
}
.install .copy:hover { color: var(--text); background: var(--border); }
.install .copy.ok { color: var(--green); }
.hero p.alt { font-size: 13.5px; color: var(--faint); margin: 0 0 22px; }
.hero p.alt code { border: none; padding: 0 2px; }

/* ---- demo window chrome ---- */
.window {
  border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden; background: var(--card);
}
.window .titlebar {
  display: flex; align-items: center; gap: 7px;
  padding: 10px 14px; background: var(--deep);
  border-bottom: 1px solid var(--border);
}
.window .dot { width: 11px; height: 11px; border-radius: 50%; }
.window .dot:nth-child(1) { background: var(--peach); }
.window .dot:nth-child(2) { background: var(--yellow); }
.window .dot:nth-child(3) { background: var(--green); }
.window .wtitle {
  margin-left: 8px; font-family: var(--mono); font-size: 12.5px;
  color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.window img { width: 100%; display: block; border: none; border-radius: 0; }

/* ---- palette picker ---- */
.palette-bar { display: flex; gap: 10px; flex-wrap: wrap; }
.palette-bar button {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 13px; color: var(--dim);
  background: var(--card); border: 1px solid var(--border);
  border-radius: 999px; padding: 6px 14px; cursor: pointer;
}
.palette-bar button:hover { border-color: var(--blue); color: var(--text); }
.palette-bar button.active { border-color: var(--blue); color: var(--blue); }
.palette-bar .sw { width: 11px; height: 11px; border-radius: 50%; background: var(--sw); }

/* ---- compare table ---- */
table.compare { width: 100%; border-collapse: collapse; font-size: 14px; }
table.compare th, table.compare td { border-bottom: 1px solid var(--border); padding: 8px 10px; }
table.compare th { font-family: var(--mono); font-size: 13px; color: var(--blue); text-align: center; }
table.compare th:first-child { color: var(--faint); font-weight: 400; text-align: left; }
table.compare td { color: var(--dim); text-align: center; }
table.compare td:first-child { color: var(--text); text-align: left; }
table.compare .yes { color: var(--green); }
table.compare .no { color: var(--faint); }
table.compare .part { color: var(--yellow); font-size: 13px; }

/* ---- embedded palettes: same values as src/theme.rs, mapped onto the
   site variables (crust→bg, mantle→deep, base→card, surface0→border,
   text/subtext0/overlay0, border_focused→blue, mode_browse→green,
   mode_search→yellow, mode_leader→peach). site.js sets data-palette on
   <html>; no attribute = catppuccin-mocha (the :root defaults). ---- */
html[data-palette="dracula"] {
  --bg: #191a21; --deep: #21222c; --card: #282a36; --border: #44475a;
  --text: #f8f8f2; --dim: #9aa2c7; --faint: #6272a4;
  --blue: #bd93f9; --green: #50fa7b; --yellow: #f1fa8c; --peach: #ffb86c;
}
html[data-palette="gruvbox-dark"] {
  --bg: #141618; --deep: #1d2021; --card: #282828; --border: #3c3836;
  --text: #ebdbb2; --dim: #bdae93; --faint: #928374;
  --blue: #83a598; --green: #b8bb26; --yellow: #fabd2f; --peach: #fe8019;
}
html[data-palette="nord"] {
  --bg: #242933; --deep: #272c36; --card: #2e3440; --border: #434c5e;
  --text: #d8dee9; --dim: #9aa4b8; --faint: #616e88;
  --blue: #88c0d0; --green: #a3be8c; --yellow: #ebcb8b; --peach: #d08770;
}
html[data-palette="one-dark"] {
  --bg: #1b1f27; --deep: #21252b; --card: #282c34; --border: #3e4451;
  --text: #abb2bf; --dim: #828997; --faint: #5c6370;
  --blue: #61afef; --green: #98c379; --yellow: #e5c07b; --peach: #d19a66;
}
html[data-palette="solarized-dark"] {
  --bg: #001f27; --deep: #073642; --card: #002b36; --border: #073642;
  --text: #93a1a1; --dim: #839496; --faint: #657b83;
  --blue: #268bd2; --green: #859900; --yellow: #b58900; --peach: #cb4b16;
}
html[data-palette="tokyo-night"] {
  --bg: #12131a; --deep: #16161e; --card: #1a1b26; --border: #292e42;
  --text: #c0caf5; --dim: #a9b1d6; --faint: #565f89;
  --blue: #7aa2f7; --green: #9ece6a; --yellow: #e0af68; --peach: #ff9e64;
}