Merge pull request 'feat: implement nib design system — warm amber palette, dual themes, new typography' (#4) from feat/design-system into main

Reviewed-on: #4
This commit was merged in pull request #4.
This commit is contained in:
2026-05-14 21:04:38 +00:00
4 changed files with 299 additions and 221 deletions
+3 -3
View File
@@ -3,8 +3,8 @@ package display
import "github.com/lerko/nib/internal/db" import "github.com/lerko/nib/internal/db"
var glyphMap = map[db.Glyph]string{ var glyphMap = map[db.Glyph]string{
db.GlyphNote: "", db.GlyphNote: "",
db.GlyphTodo: "", db.GlyphTodo: "",
db.GlyphEvent: "◇", db.GlyphEvent: "◇",
} }
@@ -25,7 +25,7 @@ func DisplayGlyph(glyph db.Glyph, cardType *db.CardType) string {
if g, ok := glyphMap[glyph]; ok { if g, ok := glyphMap[glyph]; ok {
return g return g
} }
return "" return ""
} }
func FormatID(id string) string { func FormatID(id string) string {
+16 -2
View File
@@ -2,7 +2,7 @@
'use strict'; 'use strict';
const GLYPHS = { const GLYPHS = {
note: '', todo: '', event: '◇', note: '', todo: '', event: '◇',
snippet: '◆', template: '◈', checklist: '☐', snippet: '◆', template: '◈', checklist: '☐',
decision: '⚖', link: '↗', decision: '⚖', link: '↗',
}; };
@@ -222,7 +222,7 @@
const groups = groupByDate(state.entities); const groups = groupByDate(state.entities);
let idx = 0; let idx = 0;
for (const g of groups) { for (const g of groups) {
html += `<div class="date-header">── ${g.label} ──</div>`; html += `<div class="date-header">${g.label}</div>`;
for (const e of g.entities) { for (const e of g.entities) {
html += renderEntityItem(e, idx); html += renderEntityItem(e, idx);
idx++; idx++;
@@ -754,6 +754,20 @@
return escHtml(s).replace(/'/g, '&#39;'); return escHtml(s).replace(/'/g, '&#39;');
} }
// ========== Theme ==========
const themeToggle = $('#theme-toggle');
let nibTheme = localStorage.getItem('nib:theme') || 'dark';
document.documentElement.setAttribute('data-theme', nibTheme);
themeToggle.textContent = nibTheme === 'paper' ? '◐' : '◑';
themeToggle.addEventListener('click', () => {
nibTheme = nibTheme === 'dark' ? 'paper' : 'dark';
document.documentElement.setAttribute('data-theme', nibTheme);
localStorage.setItem('nib:theme', nibTheme);
themeToggle.textContent = nibTheme === 'paper' ? '◐' : '◑';
});
// ========== Init ========== // ========== Init ==========
async function init() { async function init() {
+12 -2
View File
@@ -1,10 +1,19 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en" data-theme="dark">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<title>nib</title> <title>nib</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600&display=swap" rel="stylesheet">
<link rel="stylesheet" href="/style.css"> <link rel="stylesheet" href="/style.css">
<style>
@font-face { font-family: 'Monaspace Neon'; font-weight: 300; src: url('https://cdn.jsdelivr.net/gh/githubnext/monaspace@v1.000/fonts/webfonts/MonaspaceNeon-Light.woff2') format('woff2'); }
@font-face { font-family: 'Monaspace Neon'; font-weight: 400; src: url('https://cdn.jsdelivr.net/gh/githubnext/monaspace@v1.000/fonts/webfonts/MonaspaceNeon-Regular.woff2') format('woff2'); }
@font-face { font-family: 'Monaspace Neon'; font-weight: 500; src: url('https://cdn.jsdelivr.net/gh/githubnext/monaspace@v1.000/fonts/webfonts/MonaspaceNeon-Medium.woff2') format('woff2'); }
@font-face { font-family: 'Monaspace Neon'; font-weight: 700; src: url('https://cdn.jsdelivr.net/gh/githubnext/monaspace@v1.000/fonts/webfonts/MonaspaceNeon-Bold.woff2') format('woff2'); }
</style>
</head> </head>
<body> <body>
<div id="app"> <div id="app">
@@ -17,8 +26,9 @@
</nav> </nav>
</div> </div>
<form id="capture-bar" autocomplete="off"> <form id="capture-bar" autocomplete="off">
<input type="text" id="capture-input" placeholder="capture... (n to focus)" spellcheck="false"> <input type="text" id="capture-input" placeholder="capture — - todo # note * event" spellcheck="false">
</form> </form>
<button class="theme-toggle" id="theme-toggle" title="toggle theme"></button>
</header> </header>
<main> <main>
<aside id="tag-rail"></aside> <aside id="tag-rail"></aside>
+268 -214
View File
@@ -1,29 +1,63 @@
/* ── TOKENS ─────────────────────────────────────────── */
:root { :root {
--bg: #1a1b26; color-scheme: dark;
--bg-surface: #24283b; --bg: #0c0b09;
--bg-hover: #292e42; --surf: #111009;
--bg-selected: #33394d; --raised: #1a1715;
--text: #c0caf5; --border: #252118;
--text-dim: #565f89; --soft: #1e1b16;
--text-muted: #3b4261; --text: #e8dfc8;
--accent: #7aa2f7; --muted: #8c8070;
--accent-dim: #3d59a1; --dim: #504840;
--green: #9ece6a; --accent: #c8942a;
--red: #f7768e; --a-bg: rgba(200,148,42,.09);
--yellow: #e0af68; --todo: #d4a84b;
--orange: #ff9e64; --note: #6ab8b0;
--purple: #bb9af7; --event: #6898c8;
--cyan: #7dcfff; --remind: #c8784a;
--border: #292e42; --ok: #7aab72;
--radius: 6px; --danger: #b85858;
--font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', Menlo, monospace; --lineage: #9878bc;
--font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif; --pin: #c8942a;
--sans: 'Space Grotesk', system-ui, sans-serif;
--mono: 'Monaspace Neon', ui-monospace, monospace;
--r1: 2px;
--r2: 4px;
--r3: 8px;
--t-fast: 80ms ease;
--t-base: 200ms ease;
} }
* { margin: 0; padding: 0; box-sizing: border-box; } [data-theme="paper"] {
color-scheme: light;
--bg: #f4efe4;
--surf: #faf7f0;
--raised: #ece7db;
--border: #d4cdc0;
--soft: #e6e0d4;
--text: #1c1810;
--muted: #6a5e50;
--dim: #a09080;
--accent: #8a6018;
--a-bg: rgba(138,96,24,.08);
--todo: #7a5c00;
--note: #1a7070;
--event: #245890;
--remind: #984020;
--ok: #2a6828;
--danger: #882030;
--lineage: #5830a0;
--pin: #8a6018;
}
/* ── RESET ──────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
body { body {
font-family: var(--font-sans); font-family: var(--sans);
background: var(--bg); background: var(--bg);
color: var(--text); color: var(--text);
font-size: 14px; font-size: 14px;
@@ -38,14 +72,15 @@ body {
height: 100vh; height: 100vh;
} }
/* Header */ /* ── HEADER ─────────────────────────────────────────── */
header { header {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 16px; gap: 16px;
padding: 12px 20px; padding: 0 20px;
height: 36px;
border-bottom: 1px solid var(--border); border-bottom: 1px solid var(--border);
background: var(--bg-surface); background: var(--surf);
flex-shrink: 0; flex-shrink: 0;
} }
@@ -57,32 +92,33 @@ header {
} }
.logo { .logo {
font-family: var(--font-mono); font-family: var(--mono);
font-size: 18px; font-size: 15px;
font-weight: 700; font-weight: 300;
color: var(--accent); color: var(--accent);
letter-spacing: -0.5px; letter-spacing: .3em;
} }
nav { nav {
display: flex; display: flex;
gap: 4px; gap: 2px;
} }
.nav-btn { .nav-btn {
background: none; background: none;
border: 1px solid transparent; border: none;
color: var(--text-dim); color: var(--dim);
padding: 4px 12px; padding: 4px 8px;
border-radius: var(--radius); border-radius: var(--r1);
cursor: pointer; cursor: pointer;
font-size: 13px; font-size: 11px;
font-family: var(--font-mono); font-family: var(--sans);
transition: all 0.15s; font-weight: 500;
transition: color var(--t-fast), background var(--t-fast);
} }
.nav-btn:hover { color: var(--text); background: var(--bg-hover); } .nav-btn:hover { color: var(--muted); }
.nav-btn.active { color: var(--accent); border-color: var(--accent-dim); background: var(--bg); } .nav-btn.active { color: var(--accent); background: var(--a-bg); }
#capture-bar { #capture-bar {
flex: 1; flex: 1;
@@ -92,31 +128,36 @@ nav {
#capture-input { #capture-input {
width: 100%; width: 100%;
background: var(--bg); background: var(--bg);
border: 1px solid var(--text-muted); border: 1px solid var(--border);
color: var(--text); color: var(--text);
padding: 8px 12px; padding: 4px 10px;
border-radius: var(--radius); border-radius: var(--r2);
font-family: var(--font-mono); font-family: var(--mono);
font-size: 13px; font-size: 12px;
outline: none; outline: none;
transition: border-color 0.15s, box-shadow 0.15s; transition: border-color var(--t-fast);
} }
#capture-input:hover { #capture-input:hover { border-color: var(--muted); }
border-color: var(--accent-dim); #capture-input:focus { border-color: var(--accent); }
box-shadow: 0 0 0 1px var(--accent-dim); #capture-input::placeholder { color: var(--dim); }
.theme-toggle {
background: none;
border: 1px solid var(--border);
border-radius: var(--r1);
color: var(--dim);
font-family: var(--mono);
font-size: 13px;
padding: 2px 8px;
cursor: pointer;
flex-shrink: 0;
transition: color var(--t-fast), border-color var(--t-fast);
} }
#capture-input:focus { .theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
border-color: var(--accent);
box-shadow: 0 0 0 1px var(--accent);
}
#capture-input::placeholder { /* ── MAIN LAYOUT ────────────────────────────────────── */
color: var(--text-dim);
}
/* Main layout */
main { main {
display: grid; display: grid;
grid-template-columns: 180px 1fr 320px; grid-template-columns: 180px 1fr 320px;
@@ -124,36 +165,38 @@ main {
overflow: hidden; overflow: hidden;
} }
/* Tag rail */ /* ── TAG RAIL ───────────────────────────────────────── */
#tag-rail { #tag-rail {
border-right: 1px solid var(--border); border-right: 1px solid var(--border);
padding: 12px 0; padding: 12px 0;
overflow-y: auto; overflow-y: auto;
background: var(--surf);
} }
.tag-item { .tag-item {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
padding: 6px 16px; padding: 4px 16px;
cursor: pointer; cursor: pointer;
font-size: 13px; font-size: 11px;
color: var(--text-dim); color: var(--muted);
transition: all 0.1s; transition: color var(--t-fast), background var(--t-fast);
} }
.tag-item:hover { background: var(--bg-hover); color: var(--text); } .tag-item:hover { background: var(--raised); color: var(--text); }
.tag-item.active { color: var(--accent); background: var(--bg-selected); } .tag-item.active { color: var(--accent); background: var(--a-bg); }
.tag-name { font-family: var(--font-mono); } .tag-name { font-family: var(--mono); font-size: 11px; }
.tag-name::before { content: '#'; color: var(--text-muted); } .tag-name::before { content: '#'; color: var(--dim); }
.tag-count { .tag-count {
font-size: 11px; font-family: var(--mono);
color: var(--text-muted); font-size: 10px;
color: var(--dim);
min-width: 20px; min-width: 20px;
text-align: right; text-align: right;
} }
/* Entity panel */ /* ── ENTITY PANEL ───────────────────────────────────── */
#entity-panel { #entity-panel {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@@ -164,32 +207,30 @@ main {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 8px; gap: 8px;
padding: 8px 20px; padding: 6px 20px;
border-bottom: 1px solid var(--border); border-bottom: 1px solid var(--soft);
flex-shrink: 0; flex-shrink: 0;
} }
#month-nav:empty { #month-nav:empty { display: none; }
display: none;
}
.month-nav-btn { .month-nav-btn {
background: none; background: none;
border: none; border: none;
color: var(--text-dim); color: var(--dim);
font-family: var(--font-mono); font-family: var(--mono);
font-size: 13px; font-size: 11px;
cursor: pointer; cursor: pointer;
padding: 2px 6px; padding: 2px 6px;
border-radius: 4px; border-radius: var(--r1);
transition: all 0.1s; transition: color var(--t-fast), background var(--t-fast);
} }
.month-nav-btn:hover { color: var(--text); background: var(--bg-hover); } .month-nav-btn:hover { color: var(--text); background: var(--raised); }
.month-nav-label { .month-nav-label {
font-family: var(--font-mono); font-family: var(--mono);
font-size: 13px; font-size: 11px;
color: var(--text); color: var(--text);
min-width: 80px; min-width: 80px;
text-align: center; text-align: center;
@@ -198,75 +239,89 @@ main {
.month-nav-clear { .month-nav-clear {
background: none; background: none;
border: none; border: none;
color: var(--text-muted); color: var(--dim);
font-family: var(--font-mono); font-family: var(--mono);
font-size: 11px; font-size: 10px;
cursor: pointer; cursor: pointer;
margin-left: auto; margin-left: auto;
transition: color var(--t-fast);
} }
.month-nav-clear:hover { color: var(--text); } .month-nav-clear:hover { color: var(--text); }
/* Entity list */ /* ── ENTITY LIST ────────────────────────────────────── */
#entity-list { #entity-list {
overflow-y: auto; overflow-y: auto;
padding: 8px 0; padding: 4px 0;
flex: 1; flex: 1;
} }
.date-header { .date-header {
display: flex;
align-items: center;
gap: .6rem;
padding: 8px 20px 4px; padding: 8px 20px 4px;
font-size: 11px; font-size: 10px;
font-family: var(--font-mono); font-family: var(--mono);
color: var(--text-muted); color: var(--dim);
text-transform: lowercase; text-transform: uppercase;
letter-spacing: 0.5px; letter-spacing: .2em;
}
.date-header::after {
content: '';
flex: 1;
height: 1px;
background: var(--soft);
} }
.entity-item { .entity-item {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 10px; gap: 8px;
padding: 8px 20px; padding: 6px 20px;
cursor: pointer; cursor: pointer;
transition: background 0.1s; transition: background var(--t-fast);
border-left: 2px solid transparent; border-left: 2px solid transparent;
} }
.entity-item:hover { background: var(--bg-hover); } .entity-item:hover { background: var(--raised); }
.entity-item.selected { .entity-item.selected {
background: var(--bg-selected); background: var(--surf);
border-left-color: var(--accent); border-left-color: var(--accent);
} }
.entity-glyph { .entity-glyph {
font-size: 14px; font-family: var(--mono);
width: 20px; font-size: 12px;
width: 14px;
text-align: center; text-align: center;
flex-shrink: 0; flex-shrink: 0;
font-weight: 500;
} }
.glyph-note { color: var(--text-dim); } .glyph-note { color: var(--dim); }
.glyph-todo { color: var(--green); } .glyph-todo { color: var(--todo); }
.glyph-event { color: var(--yellow); } .glyph-event { color: var(--event); }
.glyph-snippet { color: var(--accent); } .glyph-snippet { color: var(--accent); }
.glyph-template { color: var(--purple); } .glyph-template { color: var(--lineage); }
.glyph-checklist { color: var(--orange); } .glyph-checklist { color: var(--remind); }
.glyph-decision { color: var(--cyan); } .glyph-decision { color: var(--note); }
.glyph-link { color: var(--red); } .glyph-link { color: var(--danger); }
.entity-body { .entity-body {
flex: 1; flex: 1;
font-size: 13px; font-family: var(--mono);
font-size: 12px;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.entity-time { .entity-time {
font-family: var(--font-mono); font-family: var(--mono);
font-size: 11px; font-size: 10px;
color: var(--text-dim); color: var(--dim);
flex-shrink: 0; flex-shrink: 0;
} }
@@ -277,40 +332,42 @@ main {
} }
.entity-tag { .entity-tag {
font-family: var(--font-mono); font-family: var(--mono);
font-size: 10px; font-size: 9px;
color: var(--accent-dim); color: var(--muted);
background: rgba(122, 162, 247, 0.1); border: 1px solid var(--border);
padding: 1px 6px; padding: 1px 6px;
border-radius: 3px; border-radius: var(--r1);
} }
.entity-meta { .entity-meta {
font-family: var(--font-mono); font-family: var(--mono);
font-size: 11px; font-size: 10px;
color: var(--text-muted); color: var(--dim);
flex-shrink: 0; flex-shrink: 0;
display: flex; display: flex;
gap: 8px; gap: 8px;
} }
.use-badge { .use-badge {
color: var(--yellow); color: var(--todo);
font-size: 10px; font-size: 10px;
} }
/* Detail pane */ /* ── DETAIL PANE ────────────────────────────────────── */
#detail-pane { #detail-pane {
border-left: 1px solid var(--border); border-left: 1px solid var(--border);
padding: 20px; padding: 20px;
overflow-y: auto; overflow-y: auto;
background: var(--surf);
} }
.detail-empty { .detail-empty {
color: var(--text-muted); color: var(--dim);
font-size: 13px; font-size: 12px;
text-align: center; text-align: center;
margin-top: 40px; margin-top: 40px;
font-family: var(--mono);
} }
.detail-header { .detail-header {
@@ -320,44 +377,43 @@ main {
margin-bottom: 16px; margin-bottom: 16px;
} }
.detail-glyph { font-size: 20px; } .detail-glyph { font-size: 16px; }
.detail-id { .detail-id {
font-family: var(--font-mono); font-family: var(--mono);
font-size: 11px; font-size: 10px;
color: var(--text-muted); color: var(--dim);
} }
.detail-body { .detail-body {
font-size: 14px; font-family: var(--mono);
font-size: 13px;
line-height: 1.7; line-height: 1.7;
margin-bottom: 16px; margin-bottom: 16px;
white-space: pre-wrap; white-space: pre-wrap;
word-break: break-word; word-break: break-word;
cursor: text; cursor: text;
border-radius: var(--radius); border-radius: var(--r2);
padding: 4px 6px; padding: 4px 6px;
margin-left: -6px; margin-left: -6px;
transition: background 0.1s; transition: background var(--t-fast);
} }
.detail-body:hover { .detail-body:hover { background: var(--raised); }
background: var(--bg-hover);
}
.detail-body-edit { .detail-body-edit {
display: block; display: block;
width: 100%; width: 100%;
min-height: 80px; min-height: 80px;
font-family: var(--font-sans); font-family: var(--mono);
font-size: 14px; font-size: 13px;
line-height: 1.7; line-height: 1.7;
margin-bottom: 16px; margin-bottom: 16px;
padding: 6px 8px; padding: 6px 8px;
background: var(--bg); background: var(--bg);
color: var(--text); color: var(--text);
border: 1px solid var(--accent); border: 1px solid var(--accent);
border-radius: var(--radius); border-radius: var(--r2);
outline: none; outline: none;
resize: vertical; resize: vertical;
white-space: pre-wrap; white-space: pre-wrap;
@@ -372,38 +428,43 @@ main {
} }
.detail-tag { .detail-tag {
font-family: var(--font-mono); font-family: var(--mono);
font-size: 12px; font-size: 11px;
color: var(--accent); color: var(--accent);
background: rgba(122, 162, 247, 0.1); border: 1px solid currentColor;
border-color: color-mix(in srgb, var(--accent) 38%, transparent);
background: var(--a-bg);
padding: 2px 8px; padding: 2px 8px;
border-radius: 4px; border-radius: var(--r1);
} }
.detail-actions { .detail-actions {
display: flex; display: flex;
gap: 8px; gap: 6px;
flex-wrap: wrap; flex-wrap: wrap;
} }
.action-btn { .action-btn {
background: var(--bg-hover); background: none;
border: 1px solid var(--border); border: 1px solid var(--border);
color: var(--text); color: var(--muted);
padding: 6px 14px; padding: 4px 12px;
border-radius: var(--radius); border-radius: var(--r1);
cursor: pointer; cursor: pointer;
font-size: 12px; font-size: 11px;
font-family: var(--font-mono); font-family: var(--mono);
transition: all 0.15s; display: inline-flex;
align-items: center;
gap: 4px;
transition: color var(--t-fast), border-color var(--t-fast);
} }
.action-btn:hover { border-color: var(--accent); color: var(--accent); } .action-btn:hover { border-color: var(--accent); color: var(--accent); }
.action-btn.primary { background: var(--accent-dim); border-color: var(--accent); color: white; } .action-btn.primary { border-color: var(--accent); color: var(--accent); background: var(--a-bg); }
.action-btn.danger { border-color: var(--red); color: var(--red); } .action-btn.danger { color: var(--danger); border-color: var(--danger); }
.action-btn.danger:hover { background: rgba(247, 118, 142, 0.1); } .action-btn.danger:hover { background: color-mix(in srgb, var(--danger) 8%, transparent); }
/* Template slot form */ /* ── TEMPLATE SLOTS ─────────────────────────────────── */
.slot-form { margin: 16px 0; } .slot-form { margin: 16px 0; }
.slot-field { .slot-field {
@@ -414,9 +475,9 @@ main {
} }
.slot-label { .slot-label {
font-family: var(--font-mono); font-family: var(--mono);
font-size: 12px; font-size: 11px;
color: var(--purple); color: var(--lineage);
min-width: 80px; min-width: 80px;
} }
@@ -426,15 +487,16 @@ main {
border: 1px solid var(--border); border: 1px solid var(--border);
color: var(--text); color: var(--text);
padding: 4px 8px; padding: 4px 8px;
border-radius: 4px; border-radius: var(--r2);
font-family: var(--font-mono); font-family: var(--mono);
font-size: 12px; font-size: 11px;
outline: none; outline: none;
transition: border-color var(--t-fast);
} }
.slot-input:focus { border-color: var(--purple); } .slot-input:focus { border-color: var(--lineage); }
/* Checklist */ /* ── CHECKLIST ──────────────────────────────────────── */
.checklist-step { .checklist-step {
display: flex; display: flex;
align-items: center; align-items: center;
@@ -442,25 +504,18 @@ main {
padding: 4px 0; padding: 4px 0;
} }
.checklist-step input[type="checkbox"] { .checklist-step input[type="checkbox"] { accent-color: var(--ok); }
accent-color: var(--green); .checklist-step.done span { text-decoration: line-through; color: var(--muted); }
}
.checklist-step.done span { /* ── DECISION CARD ──────────────────────────────────── */
text-decoration: line-through; .decision-field { margin-bottom: 12px; }
color: var(--text-dim);
}
/* Decision card */
.decision-field {
margin-bottom: 12px;
}
.decision-label { .decision-label {
font-family: var(--font-mono); font-family: var(--mono);
font-size: 11px; font-size: 10px;
color: var(--cyan); color: var(--note);
margin-bottom: 4px; text-transform: uppercase;
letter-spacing: .1em;
} }
.decision-value { .decision-value {
@@ -468,7 +523,7 @@ main {
color: var(--text); color: var(--text);
} }
/* Modal */ /* ── MODAL ──────────────────────────────────────────── */
.modal { display: none; } .modal { display: none; }
.modal.visible { display: flex; } .modal.visible { display: flex; }
@@ -484,17 +539,17 @@ main {
top: 50%; top: 50%;
left: 50%; left: 50%;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
background: var(--bg-surface); background: var(--surf);
border: 1px solid var(--border); border: 1px solid var(--border);
border-radius: 12px; border-radius: var(--r3);
padding: 24px; padding: 24px;
z-index: 101; z-index: 101;
min-width: 320px; min-width: 320px;
} }
.modal-content h3 { .modal-content h3 {
font-family: var(--font-mono); font-family: var(--mono);
font-size: 14px; font-size: 13px;
color: var(--text); color: var(--text);
margin-bottom: 16px; margin-bottom: 16px;
font-weight: 500; font-weight: 500;
@@ -503,27 +558,28 @@ main {
.type-picker { .type-picker {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 6px; gap: 4px;
} }
.type-btn { .type-btn {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 12px; gap: 12px;
padding: 10px 16px; padding: 8px 14px;
background: var(--bg); background: var(--bg);
border: 1px solid var(--border); border: 1px solid var(--border);
color: var(--text); color: var(--text);
border-radius: var(--radius); border-radius: var(--r2);
cursor: pointer; cursor: pointer;
font-size: 13px; font-size: 12px;
transition: all 0.15s; font-family: var(--mono);
transition: border-color var(--t-fast), background var(--t-fast);
} }
.type-btn:hover { border-color: var(--accent); background: var(--bg-hover); } .type-btn:hover { border-color: var(--accent); background: var(--raised); }
.type-btn.suggested { border-color: var(--accent-dim); background: rgba(122, 162, 247, 0.05); } .type-btn.suggested { border-color: var(--accent); background: var(--a-bg); }
.type-glyph { font-size: 16px; width: 24px; text-align: center; } .type-glyph { font-size: 14px; width: 20px; text-align: center; }
.modal-close { .modal-close {
display: block; display: block;
@@ -532,36 +588,36 @@ main {
padding: 6px; padding: 6px;
background: none; background: none;
border: none; border: none;
color: var(--text-muted); color: var(--dim);
font-size: 11px; font-size: 10px;
cursor: pointer; cursor: pointer;
font-family: var(--font-mono); font-family: var(--mono);
transition: color var(--t-fast);
} }
/* Load more */ .modal-close:hover { color: var(--muted); }
/* ── LOAD MORE ──────────────────────────────────────── */
.load-more-wrap { .load-more-wrap {
padding: 12px 20px; padding: 12px 20px;
text-align: center; text-align: center;
} }
.load-more-btn { .load-more-btn {
background: var(--bg-hover); background: none;
border: 1px solid var(--border); border: 1px solid var(--border);
color: var(--text-dim); color: var(--dim);
padding: 6px 24px; padding: 4px 20px;
border-radius: var(--radius); border-radius: var(--r1);
cursor: pointer; cursor: pointer;
font-family: var(--font-mono); font-family: var(--mono);
font-size: 12px; font-size: 11px;
transition: all 0.15s; transition: color var(--t-fast), border-color var(--t-fast);
} }
.load-more-btn:hover { .load-more-btn:hover { border-color: var(--accent); color: var(--accent); }
border-color: var(--accent);
color: var(--accent);
}
/* Absorb modal */ /* ── ABSORB MODAL ───────────────────────────────────── */
.absorb-list { .absorb-list {
max-height: 300px; max-height: 300px;
overflow-y: auto; overflow-y: auto;
@@ -570,25 +626,23 @@ main {
.absorb-source-item { .absorb-source-item {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 10px; gap: 8px;
padding: 8px 12px; padding: 6px 12px;
cursor: pointer; cursor: pointer;
border-radius: var(--radius); border-radius: var(--r2);
transition: background 0.1s; transition: background var(--t-fast);
} }
.absorb-source-item:hover { .absorb-source-item:hover { background: var(--raised); }
background: var(--bg-hover);
}
.absorb-source-item .entity-body { .absorb-source-item .entity-body {
font-size: 13px; font-size: 12px;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
/* Responsive */ /* ── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 900px) { @media (max-width: 900px) {
main { grid-template-columns: 1fr; } main { grid-template-columns: 1fr; }
#tag-rail { display: none; } #tag-rail { display: none; }
@@ -597,11 +651,11 @@ main {
inset: 0; inset: 0;
top: auto; top: auto;
height: 50vh; height: 50vh;
background: var(--bg-surface); background: var(--surf);
border-top: 1px solid var(--border); border-top: 1px solid var(--border);
border-left: none; border-left: none;
transform: translateY(100%); transform: translateY(100%);
transition: transform 0.2s; transition: transform var(--t-base);
z-index: 50; z-index: 50;
} }
#detail-pane.visible { transform: translateY(0); } #detail-pane.visible { transform: translateY(0); }