Files
beardrive/internal/webapp/frontend/src/style.css
T
Snow LeeandClaude Fable 5 3f9e465463 refactor(web): one md-width column for app views; read is for rendered files only
- --page-read and --page-app both resolve to 768px (Tailwind md)
- History, folder listings, and the onboarding empty state move to the
  default app column; Insights already sat there. Only rendered markdown
  keeps read (HTML files keep their wide frame).
- layout.spec.ts repinned first (test-first); 59/59 e2e green
- shell.tsx docstring and stale style.css width comments updated

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-19 16:37:40 -07:00

632 lines
42 KiB
CSS
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/* BearDrive viewer — near-black, hairline-crafted, honey accent.
Design language: Linear-grade restraint; the one accent (honey) is spent
only on active state, the live/brand mark, and the palette selection. */
:root {
--bg: #0a0b0d; /* main ground */
--bg-side: #0c0e10; /* sidebar / panels */
--bg-raise: #15171b; /* palette, modals, elevated cards */
--surface: rgba(255,255,255,.03); /* inputs, ghost buttons */
--hover: rgba(255,255,255,.06); /* row / control hover */
--border: rgba(255,255,255,.07);
--border-2: rgba(255,255,255,.11);
--code-bg: #0d0f12;
--text: #eef0f3;
--text-dim: #9aa0a9; /* AA on both grounds */
--text-faint: #868b93; /* ≥4.5:1 on near-black */
--text-ghost: #666b74; /* decorative icons only */
--accent: #f5a623; /* honey */
--accent-bright: #ffcf85; /* honey text / primary hover */
--accent-dim: #d3861a;
--accent-press: #e0951a;
--glow: rgba(245,166,35,.13);
--add: #4cc38a;
--del: #f26d6d;
--mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
--ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
--r-ctl: 7px;
--r-card: 10px;
--r-over: 14px;
/* Page columns. Three widths for every route — see .page below. */
--page-read: 768px; /* rendered files only (markdown prose) — Tailwind md */
--page-app: 768px; /* structured views: guide, listings, history, insights, settings, admin — Tailwind md */
--page-wide: 1200px; /* data-dense: treemap, coverage matrix, big tables */
--hero-top: clamp(32px, 8vh, 88px); /* one vertical start for short centered states */
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
/* The React shell renders inside #root; make it transparent to layout so
body's flex still governs sidebar + main. */
#root { display: contents; }
body {
display: flex;
background: var(--bg);
color: var(--text);
font: 13px/1.5 var(--ui);
letter-spacing: -.006em;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
}
::selection { background: var(--glow); color: var(--accent-bright); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-radius: 5px; }
.sprite { position: absolute; }
.ico {
width: 16px; height: 16px; flex: none;
stroke: currentColor; stroke-width: 1.6; fill: none;
stroke-linecap: round; stroke-linejoin: round;
}
button, input, a.btn { font-family: inherit; }
/* ---- sidebar ---- */
#sidebar {
width: 264px; min-width: 210px;
background: var(--bg-side);
border-right: 1px solid var(--border);
display: flex; flex-direction: column; overflow: hidden;
}
#vault {
display: flex; align-items: center; gap: 9px;
height: 52px; padding: 0 12px 0 14px;
border-bottom: 1px solid var(--border);
/* Own stacking context above the sections below, so the search tooltip
paints over their borders instead of sliding behind them. */
position: relative; z-index: 45;
}
#vault-badge {
width: 22px; height: 22px; border-radius: 6px; flex: none;
display: grid; place-items: center; font-size: 13px; line-height: 1;
background: linear-gradient(160deg, #ffcf85, #f5a623 55%, #d3861a);
box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 2px 6px -1px rgba(245,166,35,.4);
}
#vault-name { font-weight: 600; font-size: 13px; letter-spacing: -.01em; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vault-actions { display: flex; align-items: center; gap: 4px; }
#vault #signout, .icon-btn2 {
width: 28px; height: 28px; border-radius: 6px;
display: inline-flex; align-items: center; justify-content: center;
color: var(--text-ghost); background: transparent; border: none; cursor: pointer; text-decoration: none;
}
#vault #signout:hover, .icon-btn2:hover { color: var(--text); background: var(--hover); }
#vault #signout .ico, .icon-btn2 .ico { width: 16px; height: 16px; }
/* projects */
#projects { flex: none; max-height: 32%; overflow-y: auto; padding: 10px 8px 8px; border-bottom: 1px solid var(--border); }
.nav-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--text-faint); }
.nav-add { display: grid; place-items: center; width: 18px; height: 18px; border: none; background: transparent; color: var(--text-ghost); cursor: pointer; border-radius: 5px; }
.nav-add .ico { width: 14px; height: 14px; }
.nav-add:hover { color: var(--text); background: var(--hover); }
#projects ul { list-style: none; margin: 0; padding: 0; }
#projects .row {
display: flex; align-items: center; gap: 9px;
height: 31px; padding: 0 8px; border-radius: 7px;
color: var(--text-dim); cursor: pointer; position: relative;
white-space: nowrap; overflow: hidden;
}
.proj-mark {
width: 17px; height: 17px; border-radius: 5px; flex: none;
display: grid; place-items: center; font-size: 10px; font-weight: 700;
color: #0a0b0d; letter-spacing: -.02em; text-transform: uppercase;
}
#projects .row .label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
#projects .row:hover { background: var(--hover); color: var(--text); }
#projects .row.active { background: var(--glow); color: var(--accent-bright); }
#projects .row.active::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 2px; border-radius: 2px; background: var(--accent); }
/* file tree */
#tree { flex: 1; overflow-y: auto; padding: 8px 8px 24px; }
.tguide { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--border); pointer-events: none; }
#tree .row {
display: flex; align-items: center; gap: 6px;
height: 28px; padding: 0 8px; border-radius: 7px;
color: var(--text-dim); cursor: pointer; position: relative;
white-space: nowrap; overflow: hidden;
}
#tree .row:hover { background: var(--hover); color: var(--text); }
#tree .row.active { background: var(--glow); color: var(--accent-bright); }
#tree .row.active::before { content: ""; position: absolute; left: 0; top: 5px; bottom: 5px; width: 2px; border-radius: 2px; background: var(--accent); }
#tree .chev { width: 14px; height: 14px; flex: none; color: var(--text-ghost); transition: transform .12s; display: flex; align-items: center; justify-content: center; }
#tree .chev .ico { width: 13px; height: 13px; }
#tree .ticon { flex: none; display: flex; color: var(--text-ghost); }
#tree .ticon .ico { width: 15px; height: 15px; }
#tree .row:hover .ticon, #tree .row:hover .chev { color: var(--text-faint); }
#tree .row.active .ticon, #tree .row.active .chev { color: var(--accent); }
#tree .label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
#tree .file .label { font-size: 12.5px; }
#tree .file .chev { visibility: hidden; }
#tree .row.collapsed .chev { transform: rotate(-90deg); }
/* org bar */
.field-err { color: var(--del); font-size: 12px; margin: 6px 2px 0; }
/* Radix/shadcn content utilities set the CSS `translate` property; house
overlays center with `transform`. Both compose — neutralize the utility
so house positioning owns these surfaces. */
.modal, #palette { translate: none; }
/* react-table admin tables ride the .admin-item/.ai-* vocabulary */
.admin-card-table { padding: 0; overflow: hidden; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table th {
text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .05em;
text-transform: uppercase; color: var(--text-faint); padding: 6px 10px;
border-bottom: 1px solid var(--border); cursor: pointer; user-select: none;
}
.admin-table th:hover { color: var(--text-dim); }
.admin-table td { padding: 0; border-bottom: 1px solid var(--border); }
.admin-table tr.admin-item { display: table-row; }
.admin-table tr.admin-item td { padding: 8px 10px; }
.admin-table tr.admin-item td:first-child { width: 100%; }
/* ---- project menu ---- */
.nav-menu { list-style: none; margin: 6px 0 0; padding: 0; }
.nav-menu .row .ico { width: 15px; height: 15px; flex: none; color: var(--text-ghost); }
.nav-menu .row.active .ico { color: var(--accent-bright); }
/* ---- project switcher ---- */
.proj-row { display: flex; align-items: center; gap: 4px; padding: 0 10px 4px 12px; }
#project-select {
flex: 1; min-width: 0; height: 30px; padding: 0 9px;
display: inline-flex; align-items: center; gap: 8px;
border: 1px solid var(--border); border-radius: var(--r-ctl);
background: var(--surface); color: var(--text);
font: inherit; font-size: 12.5px; font-weight: 500; cursor: pointer;
white-space: nowrap; outline: none;
}
#project-select > span:last-of-type { overflow: hidden; text-overflow: ellipsis; }
#project-select:hover { background: var(--hover); border-color: var(--border-2); }
#project-select svg { color: var(--text-ghost); }
.proj-menu {
z-index: 80; min-width: var(--radix-select-trigger-width, 200px);
border: 1px solid var(--border-2); border-radius: 9px; padding: 4px;
background: var(--bg-raise); box-shadow: 0 10px 32px rgba(0, 0, 0, .35);
}
.proj-menu [role="option"] { font-size: 12.5px; color: var(--text-dim); border-radius: 6px; outline: none; }
.proj-menu [role="option"][data-highlighted] { background: var(--hover); color: var(--text); }
/* ---- account bar ---- */
#accountbar { position: relative; border-top: 1px solid var(--border); padding: 7px 10px; }
#account-btn {
width: 100%; display: flex; align-items: center; gap: 9px; text-align: left;
padding: 6px 8px; border: none; border-radius: 7px;
background: transparent; color: var(--text-dim); cursor: pointer; font: inherit;
}
#account-btn:hover { background: var(--hover); color: var(--text); }
#account-btn .avatar {
width: 26px; height: 26px; flex: none; border-radius: 50%;
display: inline-flex; align-items: center; justify-content: center;
color: #fff; font-size: 12px; font-weight: 700;
}
#account-btn .acct { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
#account-btn .acct b { font-size: 12.5px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#account-btn .acct small { font-size: 11px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#account-btn > .ico { width: 14px; height: 14px; color: var(--text-ghost); }
#account-menu {
min-width: var(--radix-dropdown-menu-trigger-width, 220px);
padding: 5px; border: 1px solid var(--border-2); border-radius: 9px;
background: var(--bg-raise); box-shadow: 0 10px 32px rgba(0, 0, 0, .35);
display: flex; flex-direction: column; z-index: 80; outline: none;
}
#account-menu [role="menuitem"] { outline: none; }
#account-menu [role="menuitem"][data-highlighted] { background: var(--hover); color: var(--text); }
#account-menu .menu-sec {
padding: 7px 9px 3px; font-size: 10.5px; font-weight: 600; letter-spacing: .04em;
text-transform: uppercase; color: var(--text-faint);
}
#account-menu [role="menuitem"] {
display: flex; align-items: center; gap: 8px; padding: 7px 9px;
border: none; border-radius: 6px; background: transparent; text-align: left;
color: var(--text-dim); font: inherit; font-size: 12.5px; cursor: pointer; text-decoration: none;
}
#account-menu [role="menuitem"]:hover { background: var(--hover); color: var(--text); }
#account-menu [role="menuitem"] b { font-weight: 600; }
#account-menu [role="menuitem"] .ico { width: 15px; height: 15px; }
#account-menu #signout { color: var(--danger, #e5534b); }
#account-menu #signout:hover { color: var(--danger, #e5534b); background: var(--hover); }
/* ---- main pane ---- */
#main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
#topbar {
position: relative; display: flex; align-items: center; gap: 9px;
height: 52px; padding: 0 16px; border-bottom: 1px solid var(--border);
}
.icon-btn { display: none; width: 34px; height: 34px; border: none; background: transparent; color: var(--text-dim); cursor: pointer; border-radius: 7px; align-items: center; justify-content: center; }
.icon-btn:hover { color: var(--text); background: var(--hover); }
#crumb { font-size: 12.5px; color: var(--text); font-weight: 500; letter-spacing: -.01em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#crumb .crumb-seg { color: var(--text-dim); cursor: pointer; }
#crumb .crumb-seg:hover { color: var(--accent-bright); }
#crumb .crumb-sep { color: var(--text-ghost); margin: 0 5px; }
#meta { flex: 1; min-width: 0; font-size: 12px; color: var(--text-faint); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn {
display: inline-flex; align-items: center; gap: 6px; flex: none;
height: 30px; padding: 0 11px; border-radius: var(--r-ctl);
border: 1px solid var(--border); background: var(--surface);
color: var(--text-dim); font-size: 12.5px; font-weight: 500; cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--hover); color: var(--text); border-color: var(--border-2); }
.btn .ico { width: 15px; height: 15px; }
.btn.ghost { color: var(--text-dim); }
/* Radix tooltip card (house style) */
.tipcard {
display: flex; align-items: center; gap: 7px; white-space: nowrap;
padding: 6px 9px; border-radius: 8px; border: 1px solid var(--border-2);
background: var(--surface-solid, var(--bg-raise)); color: var(--text); font-size: 12.5px; font-weight: 500;
box-shadow: 0 8px 24px rgba(0, 0, 0, .35); z-index: 80;
}
.tipcard kbd {
font: 11px var(--ui); color: var(--text-faint);
background: var(--hover); border: 1px solid var(--border-2); border-radius: 5px;
padding: 1px 5px;
}
#more-menu {
position: absolute; right: 12px; top: calc(100% - 4px); z-index: 80;
background: var(--bg-raise); border: 1px solid var(--border-2);
border-radius: var(--r-card); box-shadow: 0 18px 44px -14px rgba(0,0,0,.75);
padding: 6px; min-width: 168px;
}
.more-item { display: block; width: 100%; text-align: left; min-height: 40px; padding: 0 12px; background: transparent; border: none; cursor: pointer; color: var(--text); font: inherit; font-size: 13.5px; border-radius: var(--r-ctl); }
.more-item:hover { background: var(--hover); }
/* The scroll container owns scrolling and the page gutter — never a width.
Width and centering belong to .page (one per view), so every route shares
the same column edges and the gutter never eats into the reading measure. */
#content { flex: 1; overflow-y: auto; padding: 44px 40px 110px; scroll-behavior: smooth; }
.page { width: 100%; max-width: var(--page-app); margin-inline: auto; min-width: 0; }
.page.read { max-width: var(--page-read); }
.page.wide { max-width: var(--page-wide); }
.empty { color: var(--text-faint); text-align: center; margin-top: var(--hero-top); }
.empty-hint { display: block; margin-top: 6px; font-size: 12px; color: var(--text-faint); }
/* ---- onboarding ---- */
/* A hero card inside .page.read, not a page column of its own. */
.onboard { max-width: 560px; margin: var(--hero-top) auto 0; }
.onboard h1 { font-size: 25px; font-weight: 640; letter-spacing: -.02em; margin: 0 0 8px; color: #f4f6f9; }
.onboard > p { color: var(--text-dim); margin: 0 0 28px; font-size: 14px; }
.ob-card { background: var(--bg-side); border: 1px solid var(--border); border-radius: var(--r-card); padding: 20px 22px; margin-bottom: 14px; }
.ob-card h3 { margin: 0 0 6px; font-size: 14.5px; font-weight: 600; }
.ob-card p { margin: 0 0 14px; font-size: 13px; color: var(--text-dim); }
.ob-row { display: flex; gap: 9px; }
.ob-row input { flex: 1; height: 34px; padding: 0 12px; border-radius: var(--r-ctl); border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 13px; outline: none; }
.ob-row input:focus { border-color: var(--accent); background: var(--hover); }
/* primary + secondary buttons */
.pbtn { display: inline-flex; align-items: center; gap: 6px; flex: none; height: 32px; padding: 0 14px; border-radius: var(--r-ctl); border: none; background: var(--accent); color: #241704; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.pbtn:hover { background: var(--accent-bright); }
.pbtn .ico { width: 15px; height: 15px; }
.danger-btn { display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border-radius: var(--r-ctl); border: none; background: #b3382e; color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; }
.danger-btn:hover { background: #c94336; }
/* ---- admin panels ---- */
/* width comes from .page (app) — see #content */
.admin h1 { font-size: 21px; font-weight: 640; letter-spacing: -.02em; margin: 0 0 6px; color: #f4f6f9; }
.admin h3 { font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--text-faint); font-weight: 600; margin: 30px 0 10px; }
.admin-sub { color: var(--text-dim); font-size: 13.5px; margin: 0 0 6px; line-height: 1.55; }
.admin-h { display: flex; align-items: center; justify-content: space-between; margin: 30px 0 10px; }
.admin-h h3 { margin: 0; }
.admin-row { display: flex; gap: 9px; margin-bottom: 8px; }
.admin-row input { flex: 1; height: 34px; padding: 0 12px; border-radius: var(--r-ctl); border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 13px; outline: none; }
.admin-row input:focus { border-color: var(--accent); background: var(--hover); }
.admin-list { border: 1px solid var(--border); border-radius: var(--r-card); overflow: hidden; background: var(--bg-side); }
.admin-item { display: flex; align-items: center; gap: 11px; padding: 11px 14px; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.admin-item:last-child { border-bottom: none; }
.admin-item:hover { background: rgba(255,255,255,.015); }
.ai-main { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.ai-main.mono { font: 12px var(--mono); color: var(--text-dim); cursor: pointer; }
.ai-tag { font-size: 11.5px; color: var(--text-faint); flex: none; }
.admin-item select { height: 28px; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 6px; padding: 0 8px; font: inherit; font-size: 12.5px; cursor: pointer; }
.admin-item select:hover { border-color: var(--border-2); }
.ai-btn, .ai-del { flex: none; height: 27px; padding: 0 11px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--text-dim); font: inherit; font-size: 12px; font-weight: 500; cursor: pointer; }
.ai-btn:hover { background: var(--hover); color: var(--text); border-color: var(--border-2); }
.ai-del { color: var(--del); border-color: transparent; background: transparent; }
.ai-del:hover { background: rgba(242,109,109,.12); color: #ff8b8b; }
.admin-empty { padding: 14px; color: var(--text-faint); font-size: 13px; }
.admin-item.toggle { cursor: pointer; align-items: flex-start; }
.admin-item.toggle .ai-main { white-space: normal; }
.tg-label { font-size: 13.5px; font-weight: 550; color: var(--text); }
.tg-desc { font-size: 12px; color: var(--text-faint); margin-top: 3px; line-height: 1.5; }
.admin-item.toggle input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--accent); flex: none; }
/* ---- folder listing ---- */
/* .dirlist width comes from .page (app) */
.dl-title { display: flex; align-items: center; gap: 10px; font-size: 21px; font-weight: 640; letter-spacing: -.02em; margin: 0 0 4px; color: #f4f6f9; }
.dl-title-icon { display: flex; color: var(--accent); }
.dl-title-icon .ico { width: 20px; height: 20px; }
.dl-sub { color: var(--text-faint); font-size: 12.5px; margin: 0 0 18px; }
.dl-items { border: 1px solid var(--border); border-radius: var(--r-card); overflow: hidden; background: var(--bg-side); }
.dl-row { display: flex; align-items: center; gap: 11px; padding: 10px 14px; border-bottom: 1px solid var(--border); cursor: pointer; }
.dl-row:last-child { border-bottom: none; }
.dl-row:hover { background: var(--hover); }
.dl-row .ticon { flex: none; display: flex; color: var(--text-ghost); }
.dl-row .ticon .ico { width: 16px; height: 16px; }
.dl-row:hover .ticon { color: var(--text-faint); }
.dl-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; color: var(--text); }
.dl-meta { flex: none; font-size: 12px; color: var(--text-faint); font-variant-numeric: tabular-nums; }
/* read-heat dot: intensity grows with 30-day reads (heatLevel in app.js) */
.heatdot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.heatdot.lvl1 { opacity: .3; }
.heatdot.lvl2 { opacity: .55; }
.heatdot.lvl3 { opacity: .8; }
.heatdot.lvl4 { opacity: 1; box-shadow: 0 0 6px rgba(245, 166, 35, .55); }
.dl-empty { padding: 24px 14px; color: var(--text-faint); font-size: 13px; border: 1px dashed var(--border); border-radius: var(--r-card); text-align: center; }
.dl-h3 { margin: 28px 0 8px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--text-faint); font-weight: 600; }
.dl-hlist { border: 1px solid var(--border); border-radius: var(--r-card); background: var(--bg-side); overflow: hidden; max-width: none; }
.dl-hlist .hentry:last-child { border-bottom: none; }
.hentry.clickable { cursor: pointer; }
.hentry.clickable:hover { background: var(--hover); }
.dl-more { margin-top: 10px; }
/* ---- project home: the connect-an-agent guide ---- */
#vault-name.vault-link { cursor: pointer; }
#vault-name.vault-link:hover { color: var(--accent-bright); }
/* .guide width comes from .page (app) */
.gd-tabs { display: flex; gap: 2px; margin: 20px 0 16px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.gd-tab { font: inherit; font-size: 13px; font-weight: 600; padding: 7px 12px 9px; background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -1px; color: var(--text-faint); cursor: pointer; white-space: nowrap; }
.gd-tab:hover { color: var(--text); }
.gd-tab.active { color: var(--accent-bright); border-bottom-color: var(--accent); }
.gd-step { margin: 0 0 18px; }
.gd-step-head { display: flex; align-items: center; gap: 10px; margin-bottom: 3px; }
.gd-num { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--glow); color: var(--accent-bright); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.gd-step-title { font-weight: 600; font-size: 14px; color: var(--text); }
.gd-desc { margin: 2px 0 8px 32px; color: var(--text-faint); font-size: 13px; line-height: 1.5; }
.gd-extra { font-size: 12.5px; margin-top: 6px; }
.gd-code { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 10px; margin: 6px 0 6px 32px; padding: 10px 12px; background: var(--bg-raise); border: 1px solid var(--border); border-radius: var(--r-card); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.6; color: var(--text); }
.gd-code > code { display: block; min-width: 0; overflow-x: auto; white-space: pre; }
.gd-copy { align-self: start; font: inherit; font-family: inherit; font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 6px; border: 1px solid var(--border-2); background: var(--bg-raise); color: var(--text-faint); cursor: pointer; }
.gd-copy:hover { color: var(--accent-bright); border-color: var(--accent-dim); }
/* A single unnumbered step has no badge to indent under. */
.gd-solo .gd-desc, .gd-solo .gd-code { margin-left: 0; }
.gd-manual { margin: 10px 0 0; }
.gd-manual > summary { display: inline-block; font-size: 12.5px; font-weight: 600; color: var(--text-faint); cursor: pointer; padding: 4px 0; }
.gd-manual > summary:hover { color: var(--text); }
.gd-manual .gd-desc, .gd-manual .gd-code { margin-left: 0; }
.gd-done { margin: 22px 0 8px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--bg-side); color: var(--text-faint); font-size: 13px; line-height: 1.5; }
.home-insights { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--border); }
/* ---- insights (read×write matrix) ---- */
/* .insights width comes from .page (app) */
.in-title { font-size: 21px; font-weight: 640; letter-spacing: -.02em; margin: 0 0 4px; color: #f4f6f9; }
.in-title .in-scope { color: var(--text-ghost); font-weight: 500; font-size: 15px; }
.in-lens { display: flex; gap: 6px; margin: 0 0 14px; }
.in-lens-btn { font: inherit; font-size: 12px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--border); background: none; color: var(--text-faint); cursor: pointer; }
.in-lens-btn:hover { color: var(--text); }
.in-lens-btn.active { color: var(--accent); border-color: var(--accent); }
.in-chart { width: 100%; max-width: 760px; height: auto; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--bg-side); margin-bottom: 6px; }
.in-axis { stroke: var(--border); stroke-width: 1; }
.in-threshold { stroke: var(--border); stroke-width: 1; stroke-dasharray: 4 4; }
.in-danger-zone { fill: rgba(242, 109, 109, .05); }
.in-label { fill: var(--text-ghost); font-size: 11px; }
.in-quad { fill: var(--text-ghost); font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; }
.in-quad-danger { fill: #e07070; }
.in-pt { fill: var(--accent); opacity: .5; cursor: pointer; }
.in-pt:hover { opacity: 1; }
.in-pt.cold { fill: var(--text-ghost); opacity: .25; }
.in-pt.danger { fill: #e05d5d; opacity: .6; }
/* treemap */
.in-treemap { background: #0c0d10; }
.in-tm-group { fill: none; stroke: var(--border); stroke-width: 1; cursor: pointer; pointer-events: all; }
.in-tm-glabel { fill: var(--text-faint); font-size: 10px; text-transform: uppercase; letter-spacing: .05em; cursor: pointer; }
.in-tm-cell { cursor: pointer; }
.in-tm-cell:hover { stroke: #fff; stroke-width: 1; }
.in-tm-label { fill: #0c0d10; font-size: 10.5px; font-weight: 620; cursor: pointer; pointer-events: none; }
/* hot path */
.in-hotpath { border: 1px solid var(--border); border-radius: var(--r-card); background: var(--bg-side); overflow: hidden; }
.in-hp-row { display: flex; align-items: center; gap: 10px; padding: 6px 12px; border-bottom: 1px solid var(--border); cursor: pointer; }
.in-hp-row:last-child { border-bottom: none; }
.in-hp-row:hover { background: var(--hover); }
.in-hp-name { flex: 0 0 300px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; color: var(--text); }
.in-hp-name.danger { color: var(--accent); }
.in-hp-bar { flex: 1; display: flex; height: 10px; border-radius: 3px; overflow: hidden; }
.in-hp-agent { background: var(--accent); }
.in-hp-human { background: #5b8def; }
.in-hp-count { flex: none; width: 40px; text-align: right; font-size: 11.5px; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.in-legend { margin: 8px 2px 0; font-size: 11.5px; color: var(--text-faint); }
.in-sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: -1px; }
.in-sw.agent { background: var(--accent); }
.in-sw.human { background: #5b8def; }
/* coverage matrix */
.in-matrix rect { transition: opacity .1s; }
.in-matrix rect:hover { opacity: .85; }
/* ---- history ---- */
/* .history width comes from .page (app) */
.hentry { padding: 11px 12px; border-bottom: 1px solid var(--border); }
.hentry:hover { background: rgba(255,255,255,.015); }
.hline { display: flex; gap: 10px; align-items: center; }
.hkind { display: inline-flex; color: var(--add); }
.hkind .ico { width: 13px; height: 13px; }
.hentry.edit .hkind { color: var(--accent); }
.hentry.delete .hkind { color: var(--del); }
.htag { flex: none; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; padding: 1px 6px; border-radius: 4px; }
.hentry.add .htag { color: var(--add); background: rgba(76,195,138,.12); }
.hentry.edit .htag { color: var(--accent-bright); background: var(--glow); }
.hentry.delete .htag { color: #ff8b8b; background: rgba(242,109,109,.12); }
.hpath { font-weight: 500; cursor: pointer; color: var(--text); font-size: 13px; }
.hpath:hover { color: var(--accent-bright); }
.htime { margin-left: auto; color: var(--text-faint); font-size: 12px; font-variant-numeric: tabular-nums; }
.hmeta { display: flex; align-items: center; gap: 14px; margin-top: 4px; padding-left: 23px; font-size: 12px; color: var(--text-dim); }
.hdev, .hsize { color: var(--text-faint); }
.hsize { font-variant-numeric: tabular-nums; white-space: nowrap; flex: none; }
.hnote { margin-top: 4px; padding-left: 23px; font-size: 12px; color: var(--text-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.hnote:hover { color: var(--text); }
.hnote.open { white-space: normal; overflow-wrap: anywhere; }
.hnote::before { content: "› "; color: var(--text-ghost); }
.hnote a { color: var(--accent-bright); text-decoration: none; }
.hnote a:hover { text-decoration: underline; }
/* ---- command palette ---- */
#palette { position: fixed; top: 12vh; left: 50%; transform: translateX(-50%); z-index: 151; display: block; width: min(560px, 92vw); background: var(--bg-raise); border: 1px solid var(--border-2); border-radius: var(--r-over); box-shadow: 0 24px 70px -18px rgba(0,0,0,.8); overflow: hidden; outline: none; padding: 0; }
#palette-inputwrap { display: flex; align-items: center; gap: 11px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
#palette-inputwrap [data-slot="command-input-wrapper"] { flex: 1; display: flex; border-bottom: 0; padding: 0; height: auto; }
#palette-inputwrap [data-slot="command-input-wrapper"] > svg:not(.ico) { display: none; }
#palette input, #palette input:focus { border: none; background: transparent; box-shadow: none; outline: none; padding: 0; }
#palette-inputwrap .ico { width: 17px; height: 17px; color: var(--text-faint); }
#palette-input { flex: 1; width: 100%; border: none; background: transparent; color: var(--text); font: inherit; font-size: 15px; letter-spacing: -.01em; outline: none; padding: 0; }
#palette-input::placeholder { color: var(--text-ghost); }
#palette-results { list-style: none; margin: 0; padding: 8px; max-height: 46vh; overflow-y: auto; }
#palette-results [cmdk-item] { display: flex; align-items: center; gap: 11px; height: 38px; padding: 0 10px; border-radius: 9px; cursor: pointer; color: var(--text-dim); font-size: 13.5px; }
#palette-results [cmdk-item][data-selected="true"] { background: var(--glow); }
#palette-results [cmdk-item][data-selected="true"] .picon { color: var(--accent); }
#palette-results [cmdk-item][data-selected="true"] .plabel { color: var(--accent-bright); }
#palette-results [cmdk-item][data-selected="true"] .plabel b { color: var(--accent-bright); }
#palette-results li { display: flex; align-items: center; gap: 11px; height: 38px; padding: 0 10px; border-radius: 9px; cursor: pointer; color: var(--text-dim); font-size: 13.5px; }
#palette-results li.selected { background: var(--glow); }
#palette-results li.selected .picon { color: var(--accent); }
#palette-results li.selected .plabel { color: var(--accent-bright); }
#palette-results li.selected .plabel b { color: var(--accent-bright); }
#palette-results li .picon { width: 18px; flex: none; display: flex; justify-content: center; color: var(--text-faint); }
#palette-results li .picon .ico { width: 15px; height: 15px; }
#palette-results li .plabel { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
#palette-results li .plabel b { color: var(--accent-bright); font-weight: 600; }
#palette-results li .pkind { flex: none; font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-ghost); }
#palette-results .pempty { color: var(--text-faint); cursor: default; justify-content: center; height: auto; padding: 14px; }
#palette-hint { padding: 9px 16px; border-top: 1px solid var(--border); font-size: 11px; color: var(--text-ghost); }
/* ---- modal ---- */
[data-slot="dialog-overlay"] { position: fixed; inset: 0; background: rgba(6,7,9,.6); backdrop-filter: blur(3px); z-index: 150; }
.modal { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 151; display: block; background: var(--bg-raise); border: 1px solid var(--border-2); border-radius: var(--r-over); padding: 22px 24px; width: min(460px, calc(100vw - 40px)); box-shadow: 0 24px 70px -18px rgba(0,0,0,.8); outline: none; }
.modal h3 { margin: 0 0 10px; font-size: 16px; font-weight: 620; letter-spacing: -.01em; }
.modal p { margin: 0 0 16px; font-size: 13.5px; color: var(--text-dim); line-height: 1.55; }
.modal p b { color: var(--text); }
.modal-url { font: 12px var(--mono); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-ctl); padding: 9px 11px; color: var(--text-dim); word-break: break-all; margin-bottom: 16px; }
.modal-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.modal-label { display: block; font-size: 12.5px; color: var(--text-dim); margin: 0 0 6px; }
.modal-msg { margin: 0 0 16px; font-size: 13.5px; color: var(--text-dim); line-height: 1.55; }
.modal-input { width: 100%; height: 36px; padding: 0 12px; border-radius: var(--r-ctl); border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 14px; margin-bottom: 16px; outline: none; }
.modal-input:focus { border-color: var(--accent); background: var(--hover); }
/* ---- toast ---- */
[data-sonner-toast] { background: var(--bg-raise) !important; color: var(--text) !important; border: 1px solid var(--border-2) !important; border-radius: 10px !important; font-size: 13.5px !important; box-shadow: 0 18px 44px -12px rgba(0,0,0,.7) !important; }
[data-sonner-toast][data-type="error"] { border-color: rgba(242,109,109,.5) !important; color: #ffb0aa !important; }
#sb-backdrop { display: none; }
/* ---- responsive ----
900px covers tablet portrait (768) and phone landscape (844): with the
fixed 264px sidebar plus the full topbar those widths overflow the page
(measured 849px needed at 768) — they need the off-canvas/collapsed
chrome just like phones. */
@media (max-width: 900px) {
#sidebar { position: fixed; z-index: 60; top: 0; left: 0; height: 100%; transform: translateX(-100%); transition: transform .2s ease; box-shadow: 0 0 40px rgba(0,0,0,.6); }
body.sb-open #sidebar { transform: translateX(0); }
body.sb-open #sb-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 50; }
.icon-btn { display: inline-flex; width: 44px; height: 44px; }
#content { padding: 24px 18px 70px; }
#topbar { padding: 0 8px; gap: 4px; }
.btn .lbl { display: none; }
#topbar .btn { min-width: 44px; min-height: 44px; padding: 0; justify-content: center; gap: 0; }
#topbar .btn .ico { width: 18px; height: 18px; }
#more-btn:not([hidden]) { display: inline-flex; }
#history-btn, #upload-btn, #download { display: none !important; }
/* Desktop right-aligns the actions via #meta's flex:1 — with meta
hidden here, the crumb becomes the spacer so Search/Share/⋯ pin to
the top-right corner. */
#meta { display: none; }
#crumb { flex: 1; }
#vault { padding: 0 8px 0 12px; }
.icon-btn2, #signout, #tree .row, #projects .row { height: 44px; }
#account-btn { min-height: 44px; }
#project-select { min-height: 44px; }
.nav-add { min-width: 44px; min-height: 44px; }
/* Columns already collapse on their own (.page is width: 100%); only
content that can't shrink needs its own escape hatch. */
.markdown table, pre.plain { display: block; overflow-x: auto; max-width: 100%; }
.ob-row { flex-direction: column; }
.ob-row input { flex: none; min-height: 44px; }
/* Admin rows: 27-28px selects/buttons are too small to tap; let rows
wrap so the controls keep room next to long names/URLs. */
.admin-item { flex-wrap: wrap; row-gap: 8px; padding: 12px 14px; }
.admin-item select { height: 44px; }
.ai-btn, .ai-del { height: auto; min-height: 44px; padding: 0 12px; }
/* No hover on touch: a truncated email/URL would be unreadable — wrap
it. The name/URL takes the whole row (tag + buttons drop below):
without full-row basis, a long flex:none .ai-tag starves the URL down
to one character per line. break-word prefers natural break points
(@, .) and still splits long unbroken URLs when it must. */
.admin-item .ai-main { flex: 1 1 100%; white-space: normal; overflow-wrap: break-word; }
/* The code-block Copy button needs a real touch target; give one-line
blocks the height to hold it. */
.gd-code { min-height: 62px; padding-top: 12px; padding-bottom: 12px; }
.gd-copy { min-height: 44px; padding: 0 14px; }
.gd-tab { min-height: 44px; }
.in-lens-btn { min-height: 44px; padding: 0 14px; }
.modal-input { height: 44px; }
.modal-actions button { height: auto; min-height: 44px; }
.pbtn { height: auto; min-height: 44px; }
#palette-results li { height: auto; min-height: 44px; }
.more-item { min-height: 44px; }
}
/* The destructive Revoke must not sit flush against the safe Done on a
touch row — push it to the far side (share dialog only; prompts and
confirms have no .ai-del). */
.modal-actions .ai-del { margin-right: auto; }
@media (max-width: 430px) {
/* The name wins the row: drop the verbose meta (the heat dot still
conveys activity) instead of truncating "readme.md" to "readme...." */
.dl-meta { display: none; }
.ai-tag { font-size: 11px; }
.htime { white-space: nowrap; font-size: 12px; }
.hline { flex-wrap: wrap; }
/* Four share-dialog buttons don't fit one row at 360 — the destructive
Revoke takes its own line rather than sitting 9px from Done. */
.modal-actions .ai-del { flex: 0 0 100%; justify-content: center; text-align: center; }
}
/* ---- markdown reading view ---- */
/* .markdown is typography only; the column is .page.read around it */
.markdown h1, .markdown h2, .markdown h3, .markdown h4 { color: #f4f6f9; line-height: 1.25; letter-spacing: -.018em; margin: 1.5em 0 .5em; text-wrap: balance; }
.markdown h1:first-child { margin-top: 0; }
.markdown h1 { font-size: 1.85em; font-weight: 660; letter-spacing: -.024em; }
.markdown h2 { font-size: 1.32em; font-weight: 620; margin-top: 1.7em; }
.markdown h3 { font-size: 1.08em; font-weight: 620; }
.markdown p, .markdown li { color: #c6cbd3; font-size: 14.5px; line-height: 1.72; }
.markdown p { margin: 0 0 1em; }
.markdown strong { color: var(--text); font-weight: 620; }
.markdown a { color: var(--accent-bright); text-decoration: none; border-bottom: 1px solid rgba(245,166,35,.28); }
.markdown a:hover { border-bottom-color: var(--accent); }
.markdown ul, .markdown ol { margin: 0 0 1em; padding-left: 1.4em; }
.markdown li { margin-bottom: .4em; }
.markdown li::marker { color: var(--text-ghost); }
.markdown code { background: var(--hover); border: 1px solid var(--border); padding: .1em .4em; border-radius: 5px; font: 12.5px/1.5 var(--mono); color: #e4d9c4; }
.markdown pre { background: var(--code-bg); border: 1px solid var(--border); border-radius: var(--r-card); padding: 14px 16px; overflow-x: auto; margin: 1.3em 0; }
.markdown pre code { background: none; border: none; padding: 0; color: #c6cbd3; }
.markdown blockquote { margin: 1.3em 0; padding: .3em 1em; border-left: 2px solid var(--accent); background: linear-gradient(90deg, var(--glow), transparent); border-radius: 0 8px 8px 0; color: #d8cdb6; }
.markdown blockquote p { margin: .3em 0; color: #d8cdb6; }
.markdown table { border-collapse: collapse; margin: 1.3em 0; font-size: 13.5px; }
.markdown th, .markdown td { border-bottom: 1px solid var(--border); padding: 9px 13px; text-align: left; }
.markdown th { color: var(--text-faint); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; border-bottom-color: var(--border-2); }
.markdown tr:hover td { background: rgba(255,255,255,.02); }
.markdown img { max-width: 100%; border-radius: 8px; border: 1px solid var(--border); }
.markdown hr { border: none; border-top: 1px solid var(--border); margin: 2.2em 0; }
/* Frontmatter key/value table (server-rendered from a doc's YAML header). */
.markdown table.frontmatter { margin: 0 0 1.8em; font-size: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; border-collapse: separate; border-spacing: 0; }
.markdown table.frontmatter th { text-transform: none; letter-spacing: 0; font-size: 11.5px; color: var(--text-faint); font-weight: 600; text-align: left; white-space: nowrap; vertical-align: top; padding: 6px 14px 6px 12px; border-bottom: 1px solid var(--border); }
.markdown table.frontmatter td { color: var(--text-dim); padding: 6px 12px 6px 0; border-bottom: 1px solid var(--border); }
.markdown table.frontmatter tr:last-child th, .markdown table.frontmatter tr:last-child td { border-bottom: none; }
.markdown table.frontmatter code { white-space: pre-wrap; font-size: 11px; }
.markdown input[type="checkbox"] { accent-color: var(--accent); }
/* rendered HTML files: a sandboxed page in a framed viewport */
.htmlview { display: block; width: 100%; height: calc(100vh - 150px); border: 1px solid var(--border); border-radius: var(--r-card); background: #fff; }
/* missing path: friendly not-found with the uploading hint */
.notfound { margin-top: var(--hero-top); text-align: center; color: var(--text-dim); }
.notfound h1 { color: var(--text); font-size: 1.4em; margin-bottom: .5em; }
.notfound code { background: var(--hover); border: 1px solid var(--border); padding: .15em .5em; border-radius: 6px; }
.notfound .nf-sub { max-width: 440px; margin: 12px auto 20px; font-size: 13px; color: var(--text-faint); line-height: 1.6; }
/* plain file / binary views */
pre.plain { background: var(--code-bg); border: 1px solid var(--border); border-radius: var(--r-card); padding: 14px 16px; overflow-x: auto; font: 12.5px/1.6 var(--mono); color: #c6cbd3; white-space: pre-wrap; overflow-wrap: anywhere; }
/* long unbreakable lines wrap instead of blowing out the column: .page has min-width: 0 */
.filecard { margin-top: var(--hero-top); text-align: center; color: var(--text-dim); }
.filecard .name { font-size: 1.2em; color: var(--text); margin-bottom: .3em; }
.filecard .btn { margin-top: 14px; }