Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins
TypeScript ai-agentcoding-agentdesktop-appelectronglobali18nlocal-firstmcppipi-agentpi-desktoppluginsreactrusttypescript
/*
PI-Desktop docs — Apple keynote register.
Black canvas, extreme type scale, floating product stills, no card chrome.
*/
:root,
.dark {
color-scheme: dark;
--void: #000000;
--graphite: #1d1d1f;
--fog: #86868b;
--chalk: #f5f5f7;
--mist: rgba(255, 255, 255, 0.72);
--hair: rgba(255, 255, 255, 0.12);
--blue: #2997ff;
--blue-solid: #0071e3;
--docs-bg: var(--void);
--docs-bg-elevated: var(--graphite);
--docs-bg-soft: #101012;
--docs-bg-inset: #050505;
--docs-line: var(--hair);
--docs-line-strong: rgba(255, 255, 255, 0.2);
--docs-text-1: var(--chalk);
--docs-text-2: var(--mist);
--docs-text-3: var(--fog);
--docs-accent: var(--chalk);
--docs-accent-soft: rgba(255, 255, 255, 0.08);
--docs-accent-contrast: var(--void);
--docs-link: var(--blue);
--docs-shadow: 0 40px 100px rgba(0, 0, 0, 0.55);
--docs-shadow-soft: 0 18px 50px rgba(0, 0, 0, 0.35);
--vp-c-brand-1: var(--chalk);
--vp-c-brand-2: #d2d2d7;
--vp-c-brand-3: #a1a1a6;
--vp-c-brand-soft: rgba(255, 255, 255, 0.08);
--vp-c-bg: var(--docs-bg);
--vp-c-bg-alt: var(--docs-bg-soft);
--vp-c-bg-elv: var(--docs-bg-elevated);
--vp-c-bg-soft: var(--docs-bg-soft);
--vp-c-divider: var(--docs-line);
--vp-c-gutter: var(--docs-bg-inset);
--vp-c-text-1: var(--docs-text-1);
--vp-c-text-2: var(--docs-text-2);
--vp-c-text-3: var(--docs-text-3);
--vp-c-default-1: var(--docs-text-1);
--vp-c-default-2: var(--docs-text-2);
--vp-c-default-3: var(--docs-text-3);
--vp-c-default-soft: var(--docs-accent-soft);
--vp-font-family-base: -apple-system, BlinkMacSystemFont, 'SF Pro Display',
'SF Pro Text', 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB',
'Microsoft YaHei', system-ui, sans-serif;
--vp-font-family-mono: 'SF Mono', ui-monospace, Menlo, Consolas, monospace;
--vp-layout-max-width: 1440px;
--vp-sidebar-width: 268px;
--vp-nav-height: 52px;
--docs-reading-width: 720px;
--docs-home-width: 1180px;
--docs-radius-sm: 12px;
--docs-radius-md: 18px;
--docs-radius-lg: 24px;
}
* {
box-sizing: border-box;
}
html {
background: var(--void);
scroll-behavior: smooth;
scroll-padding-top: 72px;
}
body {
min-width: 320px;
overflow-x: hidden;
background: var(--void);
color: var(--chalk);
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
::selection {
color: var(--void);
background: var(--chalk);
}
:focus-visible {
outline: 2px solid var(--blue);
outline-offset: 3px;
}
/* ——— Nav ——— */
.VPNavBar {
position: sticky;
top: 0;
z-index: 30;
height: var(--vp-nav-height);
background: rgba(0, 0, 0, 0.72);
border-bottom: 1px solid rgba(255, 255, 255, 0.08);
backdrop-filter: saturate(180%) blur(20px);
}
.VPNavBarTitle .title {
color: var(--chalk);
font-weight: 600;
letter-spacing: -0.02em;
}
.VPNavBarTitle .logo {
width: 20px;
height: 20px;
border-radius: 5px;
}
.VPNavBarMenuLink,
.VPNavScreenMenuLink,
.VPLink {
color: var(--mist) !important;
transition: color 160ms ease;
}
.VPNavBarMenuLink:hover,
.VPNavBarMenuLink.active,
.VPNavScreenMenuLink:hover,
.VPLink:hover {
color: var(--chalk) !important;
}
.DocSearch-Button {
border: 1px solid rgba(255, 255, 255, 0.14);
border-radius: 999px;
background: rgba(255, 255, 255, 0.08);
color: var(--mist);
}
.DocSearch-Button:hover {
background: rgba(255, 255, 255, 0.14);
}
/* ——— Sidebar / docs reading ——— */
.VPSidebar {
border-right: 1px solid rgba(255, 255, 255, 0.08);
background: rgba(0, 0, 0, 0.45);
}
.VPSidebarItem.level-0 > .item > .text {
color: var(--fog);
font-size: 0.7rem;
font-weight: 600;
letter-spacing: 0.08em;
text-transform: uppercase;
}
[lang='zh-CN'] .VPSidebarItem.level-0 > .item > .text {
letter-spacing: 0.04em;
text-transform: none;
}
.VPSidebarItem.level-1 .text {
overflow: hidden;
font-size: 0.875rem;
text-overflow: ellipsis;
white-space: nowrap;
}
.VPSidebarItem.is-active > .item > .link {
margin: 0 -8px;
padding: 6px 8px;
border-radius: 8px;
background: rgba(255, 255, 255, 0.08);
}
.VPSidebarItem.is-active > .item > .link > .text {
color: var(--chalk);
font-weight: 600;
}
.VPDoc {
padding: 48px 0 96px;
}
.VPDoc .container {
max-width: 1180px;
margin: 0 auto;
}
.VPDoc .content-container {
width: 100%;
max-width: var(--docs-reading-width);
margin: 0 auto;
}
.VPDocAsideOutline {
border-left-color: rgba(255, 255, 255, 0.1);
}
.VPDocAsideOutline .outline-title {
color: var(--fog);
font-size: 0.72rem;
letter-spacing: 0.06em;
text-transform: uppercase;
}
.vp-doc {
color: var(--mist);
font-size: 17px;
line-height: 1.7;
}
.vp-doc h1,
.vp-doc h2,
.vp-doc h3,
.vp-doc h4 {
color: var(--chalk);
font-weight: 700;
letter-spacing: -0.03em;
}
.vp-doc h1 {
margin-bottom: 18px;
font-size: clamp(2.1rem, 4vw, 3rem);
line-height: 1.1;
}
.vp-doc h2 {
margin-top: 56px;
padding-top: 32px;
border-top: 1px solid rgba(255, 255, 255, 0.1);
font-size: 1.6rem;
}
.vp-doc h3 {
margin-top: 32px;
font-size: 1.15rem;
}
.vp-doc a {
color: var(--blue);
font-weight: 500;
text-underline-offset: 3px;
}
.vp-doc :not(pre) > code {
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 6px;
background: rgba(255, 255, 255, 0.06);
font-size: 0.86em;
}
.vp-doc div[class*='language-'] {
max-width: 100%;
margin: 22px 0;
border: 1px solid rgba(255, 255, 255, 0.08);
border-radius: var(--docs-radius-md);
box-shadow: var(--docs-shadow-soft);
}
.vp-doc .table-wrapper {
max-width: 100%;
margin: 24px 0;
overflow-x: auto;
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: var(--docs-radius-md);
-webkit-overflow-scrolling: touch;
}
.vp-doc table {
display: table;
width: 100%;
min-width: 560px;
margin: 0;
border-collapse: collapse;
}
.vp-doc th {
color: var(--chalk);
background: rgba(255, 255, 255, 0.05);
font-size: 0.84rem;
font-weight: 600;
white-space: nowrap;
}
.vp-doc td {
font-size: 0.92rem;
vertical-align: top;
}
.vp-doc th,
.vp-doc td {
padding: 12px 14px;
border-color: rgba(255, 255, 255, 0.08);
}
.vp-doc blockquote {
margin: 22px 0;
padding: 4px 0 4px 18px;
border-left: 2px solid var(--blue);
color: var(--mist);
background: transparent;
}
.vp-doc img {
display: block;
max-width: 100%;
height: auto;
margin: 28px auto;
border: 1px solid rgba(255, 255, 255, 0.08);
border-radius: var(--docs-radius-md);
box-shadow: var(--docs-shadow-soft);
}
.pager-link {
border-color: rgba(255, 255, 255, 0.1);
border-radius: var(--docs-radius-md);
background: var(--graphite);
}
.pager-link:hover {
border-color: rgba(255, 255, 255, 0.22);
}
/* ——— Home hero (Apple) ——— */
.VPHome {
overflow: hidden;
background: var(--void);
}
.VPHero {
max-width: 1080px;
margin: 0 auto;
padding: 88px 24px 24px;
text-align: center;
}
.VPHero .container {
display: flex;
flex-direction: column;
align-items: center;
gap: 0;
}
.VPHero .main {
width: 100%;
min-width: 0;
}
.VPHero .name,
.VPHero .text,
.VPHero .tagline {
max-width: 18em;
margin-right: auto;
margin-left: auto;
font-family: var(--vp-font-family-base);
text-wrap: balance;
}
.VPHero .name {
margin-bottom: 0.12em;
color: var(--fog);
font-size: clamp(1.05rem, 2vw, 1.25rem);
font-weight: 600;
letter-spacing: -0.01em;
line-height: 1.2;
}
.VPHero .text {
padding-top: 0;
color: var(--chalk);
font-size: clamp(2.6rem, 8vw, 5.5rem);
font-weight: 700;
letter-spacing: -0.045em;
line-height: 1.02;
}
.VPHero .tagline {
max-width: 34em;
padding-top: 1.1rem;
color: var(--fog);
font-size: clamp(1.05rem, 2.2vw, 1.35rem);
font-weight: 400;
line-height: 1.45;
}
.VPHero .actions {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 12px;
padding-top: 1.75rem;
}
.VPHero .action,
.VPButton {
min-height: 44px;
border-radius: 980px;
font-size: 1.05rem;
font-weight: 500;
transition: transform 160ms ease, background-color 160ms ease,
border-color 160ms ease;
}
.VPHero .action:hover,
.VPButton:hover {
transform: scale(1.02);
}
.VPButton.brand {
border-color: transparent;
color: #fff;
background: var(--blue-solid);
box-shadow: none;
}
.VPButton.brand:hover {
background: #0077ed;
}
.VPButton.alt {
border-color: rgba(255, 255, 255, 0.2);
color: var(--chalk);
background: rgba(255, 255, 255, 0.08);
}
.VPButton.alt:hover {
background: rgba(255, 255, 255, 0.14);
}
.VPHero .image {
order: 2;
width: min(100vw, 1120px);
max-width: none;
margin: 2.5rem 0 0;
min-height: 0;
}
.VPHero .image-container {
width: 100%;
height: auto;
}
.VPHero .image-bg,
.VPHero .image-src {
display: none !important;
}
/* Signature: transparent product still with light bloom */
.hero-visual {
position: relative;
width: 100%;
max-width: 1080px;
margin: 0 auto;
padding: 1rem 0 0;
}
.hero-visual__glow {
position: absolute;
left: 50%;
bottom: 8%;
z-index: 0;
width: min(90%, 900px);
height: 42%;
border-radius: 50%;
background: radial-gradient(
ellipse at center,
rgba(255, 255, 255, 0.14),
rgba(255, 255, 255, 0.04) 40%,
transparent 70%
);
filter: blur(28px);
transform: translateX(-50%);
pointer-events: none;
}
.hero-visual__shot {
position: relative;
z-index: 1;
display: block;
width: 100%;
height: auto;
margin: 0;
border: 0;
border-radius: 18px;
background: transparent;
box-shadow: 0 50px 120px rgba(0, 0, 0, 0.55);
object-fit: contain;
}
/* ——— Launch story modules ——— */
.launch {
width: 100%;
max-width: var(--docs-home-width);
margin: 0 auto;
padding: 0 24px 40px;
}
.story {
display: grid;
grid-template-columns: 1fr;
gap: 2.5rem;
align-items: center;
padding: 7.5rem 0;
}
.story__copy {
max-width: 18em;
margin: 0 auto;
text-align: center;
}
.story__eyebrow {
margin: 0 0 0.9rem;
color: var(--fog);
font-size: 1.05rem;
font-weight: 600;
letter-spacing: -0.01em;
}
.story__title {
margin: 0;
color: var(--chalk);
font-size: clamp(2.4rem, 6vw, 4rem);
font-weight: 700;
letter-spacing: -0.04em;
line-height: 1.05;
}
.story__title span {
display: block;
}
.story__body {
max-width: 28em;
margin: 1.1rem auto 0;
color: var(--fog);
font-size: clamp(1.05rem, 2vw, 1.25rem);
line-height: 1.5;
text-wrap: pretty;
}
.story__visual {
width: min(100%, 980px);
margin: 0 auto;
}
.story__visual img {
display: block;
width: 100%;
height: auto;
border: 1px solid rgba(255, 255, 255, 0.08);
border-radius: 20px;
background: var(--graphite);
box-shadow: var(--docs-shadow);
}
/* Modes */
.modes {
padding: 5rem 0 2rem;
text-align: center;
}
.modes__title {
margin: 0 auto;
max-width: 12em;
color: var(--chalk);
font-size: clamp(2.4rem, 6vw, 4rem);
font-weight: 700;
letter-spacing: -0.04em;
line-height: 1.05;
}
.modes__title span {
display: block;
}
.modes__list {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 2rem;
max-width: 980px;
margin: 3.5rem auto 0;
}
.mode h3 {
margin: 0 0 0.6rem;
color: var(--chalk);
font-size: 1.55rem;
font-weight: 700;
letter-spacing: -0.03em;
}
.mode p {
margin: 0;
color: var(--fog);
font-size: 1.05rem;
line-height: 1.5;
}
/* Gallery */
.gallery {
padding: 5rem 0 2rem;
text-align: center;
}
.gallery__title {
margin: 0;
color: var(--chalk);
font-size: clamp(2.2rem, 5vw, 3.4rem);
font-weight: 700;
letter-spacing: -0.04em;
}
.gallery__rail {
display: grid;
grid-auto-flow: column;
grid-auto-columns: minmax(280px, 360px);
gap: 1.25rem;
margin-top: 2.5rem;
padding: 0.5rem 0 1.5rem;
overflow-x: auto;
scroll-snap-type: x mandatory;
-webkit-overflow-scrolling: touch;
}
.gallery__item {
margin: 0;
scroll-snap-align: center;
}
.gallery__item img {
display: block;
width: 100%;
height: auto;
border: 1px solid rgba(255, 255, 255, 0.08);
border-radius: 16px;
background: var(--graphite);
box-shadow: var(--docs-shadow-soft);
}
/* Local-first */
.local {
max-width: 40rem;
margin: 0 auto;
padding: 7rem 0 2rem;
text-align: center;
}
.local__title {
margin: 0;
color: var(--chalk);
font-size: clamp(2.4rem, 6vw, 4rem);
font-weight: 700;
letter-spacing: -0.04em;
line-height: 1.05;
}
.local__body {
margin: 1.25rem 0 0;
color: var(--fog);
font-size: clamp(1.05rem, 2vw, 1.25rem);
line-height: 1.55;
}
/* Steps */
.steps {
padding: 5rem 0 2rem;
text-align: center;
}
.steps__title {
margin: 0;
color: var(--chalk);
font-size: clamp(2.2rem, 5vw, 3.4rem);
font-weight: 700;
letter-spacing: -0.04em;
}
.steps__list {
display: grid;
grid-template-columns: repeat(4, minmax(0, 1fr));
gap: 1.5rem;
max-width: 980px;
margin: 3rem auto 0;
padding: 0;
list-style: none;
}
.steps__index {
display: block;
margin-bottom: 0.75rem;
color: var(--fog);
font-size: 0.95rem;
font-weight: 600;
letter-spacing: 0.04em;
}
.steps__label {
color: var(--chalk);
font-size: 1.35rem;
font-weight: 700;
letter-spacing: -0.03em;
}
/* Finale */
.finale {
padding: 8rem 0 5rem;
text-align: center;
}
.finale__title {
margin: 0 auto;
max-width: 12em;
color: var(--chalk);
font-size: clamp(2.8rem, 7vw, 5rem);
font-weight: 700;
letter-spacing: -0.045em;
line-height: 1.02;
}
.finale__title span {
display: block;
}
.finale__body {
margin: 1.1rem 0 0;
color: var(--fog);
font-size: 1.15rem;
}
.finale__actions {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 12px;
margin-top: 2rem;
}
.pill {
display: inline-flex;
align-items: center;
justify-content: center;
min-height: 48px;
padding: 0 22px;
border-radius: 980px;
font-size: 1.05rem;
font-weight: 500;
text-decoration: none !important;
transition: transform 160ms ease, background-color 160ms ease;
}
.pill:hover {
transform: scale(1.02);
}
.pill--solid {
color: #fff;
background: var(--blue-solid);
}
.pill--solid:hover {
background: #0077ed;
}
.pill--ghost {
border: 1px solid rgba(255, 255, 255, 0.2);
color: var(--chalk);
background: rgba(255, 255, 255, 0.08);
}
.pill--ghost:hover {
background: rgba(255, 255, 255, 0.14);
}
/* ——— Responsive ——— */
@media (max-width: 959px) {
.VPHero {
padding-top: 64px;
}
.modes__list,
.steps__list {
grid-template-columns: 1fr;
gap: 1.75rem;
max-width: 28rem;
}
.story {
padding: 5rem 0;
}
}
@media (max-width: 767px) {
.VPDoc {
padding: 28px 0 64px;
}
.VPDoc .content {
padding-right: 18px;
padding-left: 18px;
}
.vp-doc {
font-size: 16px;
line-height: 1.65;
}
.vp-doc .table-wrapper {
margin-right: -18px;
margin-left: -18px;
border-right: 0;
border-left: 0;
border-radius: 0;
}
.VPHero {
padding: 48px 18px 12px !important;
margin-top: 0 !important;
text-align: center;
}
.VPHero .image {
width: 100vw;
margin-left: calc(50% - 50vw);
margin-right: calc(50% - 50vw);
}
.VPHero .actions {
width: 100%;
flex-direction: column;
}
.VPHero .action {
width: 100%;
}
.hero-visual__shot {
border-radius: 14px;
}
.launch {
padding: 0 18px 24px;
}
.story,
.modes,
.gallery,
.local,
.steps {
padding: 4rem 0 1rem;
}
.story__copy {
max-width: none;
}
.finale {
padding: 5rem 0 3.5rem;
}
.finale__actions {
width: 100%;
flex-direction: column;
}
.pill {
width: 100%;
min-height: 50px;
}
}
@media (prefers-reduced-motion: reduce) {
html {
scroll-behavior: auto;
}
*,
*::before,
*::after {
transition-duration: 0.01ms !important;
}
}