Hub (FastAPI + no-build web UI): - Network health: live probe/target matrix, status strips, incidents - Probes: add (with install command), rename, remove, latency and throughput charts - Clients merged from AdGuard, DHCP, query log and probe ARP tables; names, categories, suspicious flag, notes, per-client DNS requests - Query log, domain detail (clients, related subdomains), blocked domains via the AdGuard Home /control API Probe: tests peers (ping, HTTP, throughput), gateway, LAN and public DNS, internet URLs and an optional VPS; buffers results while the hub is down. Gateway and ARP from /proc/net on Linux, route/arp on macOS. Install: install.sh (hub) and install-probe.sh (generated from it), each in docker mode (compose; default on Linux hosts) or native mode (venv + systemd or launchd; default on macOS and in LXC). Both modes deploy with an update command that checks the new commit and rolls back on failure. CLAUDE.md carries shared context for Claude Code sessions on each machine. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
390 lines
24 KiB
CSS
390 lines
24 KiB
CSS
/* =====================================================================
|
|
House style: tokens, base and components.
|
|
Copy into the project as-is (e.g. static/css/house.css) and put project
|
|
rules in a second file loaded after it (e.g. app.css). Don't edit this
|
|
copy for one project; override tokens in app.css instead.
|
|
|
|
The look: a dense, quiet utility UI. System fonts at 14px, neutral grays,
|
|
one blue accent, 48px top bar + 216px sidebar, 30px controls, hairline
|
|
borders instead of shadows. See references/house.md for the rules.
|
|
|
|
Allowed per-project override: the accent group (see house.md). Nothing else.
|
|
===================================================================== */
|
|
|
|
:root {
|
|
/* ---- Neutrals ------------------------------------------------------- */
|
|
--bg: #f7f7f8;
|
|
--surface: #ffffff;
|
|
--surface-2: #f0f1f3; /* wells, hover, segmented track, gutters */
|
|
--border: #dfe1e5;
|
|
--border-strong: #c9ccd2;
|
|
--fg: #1c1e21;
|
|
--fg-muted: #646a73;
|
|
--fg-subtle: #8a8f98;
|
|
|
|
/* ---- Accent (the one per-project knob) ------------------------------ */
|
|
--accent: #3b6ef5;
|
|
--accent-hover: #2f62e6;
|
|
--accent-fg: #ffffff; /* text on --accent */
|
|
--accent-soft: #e6edfe; /* active nav, chips, icon tiles */
|
|
--accent-text: #2f5fe0; /* accent-colored text and links on --bg/--surface */
|
|
--sel: #dce6ff; /* selected rows */
|
|
--ring: var(--accent);
|
|
|
|
/* ---- Semantic -------------------------------------------------------- */
|
|
--ok: #1f8a4c; --ok-soft: #e3f4ea;
|
|
--warn: #a35f00; --warn-soft: #fdf0dc;
|
|
--danger: #c93a3a; --danger-soft: #fbe6e6;
|
|
--info: #1b5fd1; --info-soft: #e4ecfb;
|
|
--on-danger: #ffffff;
|
|
|
|
/* ---- Code and syntax ------------------------------------------------- */
|
|
--code-bg: #f3f4f6;
|
|
--tok-key: #8a3ab9;
|
|
--tok-string: #0b7a3e;
|
|
--tok-number: #1b5fd1;
|
|
--tok-bool: #b5560b;
|
|
--tok-null: #8a8f98;
|
|
|
|
/* ---- Type ------------------------------------------------------------ */
|
|
--font-body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
--font-display: var(--font-body);
|
|
--font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
|
|
|
|
--text-2xs: 11px; /* nav headings, badges, chips */
|
|
--text-xs: 12px; /* status bar, hints, small buttons */
|
|
--text-sm: 13px; /* buttons, menus, toasts, mono */
|
|
--text-base: 14px; /* body */
|
|
--text-md: 15px; /* brand, prose */
|
|
--text-lg: 17px; /* modal and section titles */
|
|
--text-xl: 20px; /* page h2 */
|
|
--text-2xl: 26px; /* page h1 */
|
|
--leading: 1.5;
|
|
--leading-prose: 1.65;
|
|
--tracking-label: 0.06em;
|
|
--weight-medium: 500;
|
|
--weight-semibold: 600;
|
|
--weight-brand: 650;
|
|
|
|
/* ---- Space (4px base) ----------------------------------------------- */
|
|
--space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
|
|
--space-5: 20px; --space-6: 24px; --space-8: 32px; --space-10: 40px;
|
|
--space-12: 48px;
|
|
|
|
/* ---- Shape, size, elevation ---------------------------------------- */
|
|
--radius-sm: 4px; /* chips, mini buttons */
|
|
--radius-control: 6px; /* buttons, selects, nav */
|
|
--radius-md: 8px; /* inputs, menus, toasts */
|
|
--radius-card: 10px; /* cards */
|
|
--radius-lg: 12px; /* modals */
|
|
--radius-full: 999px;
|
|
|
|
--control-h: 30px;
|
|
--control-h-sm: 26px;
|
|
--topbar: 48px;
|
|
--sidebar: 216px;
|
|
--content-max: 960px;
|
|
--prose-max: 820px;
|
|
|
|
--shadow-raised: 0 1px 2px rgba(0, 0, 0, 0.12);
|
|
--shadow-popover: 0 6px 24px rgba(15, 20, 30, 0.12);
|
|
--shadow-modal: 0 6px 24px rgba(15, 20, 30, 0.12);
|
|
--backdrop: rgba(0, 0, 0, 0.45);
|
|
--scrim: rgba(0, 0, 0, 0.35);
|
|
|
|
/* ---- Motion and layers ---------------------------------------------- */
|
|
--ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
|
|
--dur-fast: 120ms;
|
|
--dur-base: 180ms;
|
|
--dur-slow: 300ms;
|
|
--z-sticky: 10; --z-scrim: 20; --z-drawer: 30; --z-dropdown: 40; --z-toast: 50;
|
|
|
|
color-scheme: light;
|
|
}
|
|
|
|
/* Dark: same tokens, redesigned values. Two blocks so the explicit
|
|
data-theme toggle wins over the OS setting in both directions. */
|
|
@media (prefers-color-scheme: dark) {
|
|
:root:not([data-theme='light']) {
|
|
--bg: #131417;
|
|
--surface: #1b1d21;
|
|
--surface-2: #24272c;
|
|
--border: #33373e;
|
|
--border-strong: #464b53;
|
|
--fg: #e6e7e9;
|
|
--fg-muted: #9aa0a9;
|
|
--fg-subtle: #7d838c;
|
|
--accent: #6b93ff;
|
|
--accent-hover: #82a4ff;
|
|
--accent-fg: #0d1220;
|
|
--accent-soft: #232f4d;
|
|
--accent-text: #7fa2ff;
|
|
--sel: #2a3a63;
|
|
--ok: #5fd08f; --ok-soft: #1c3527;
|
|
--warn: #f0b45a; --warn-soft: #3a2e1a;
|
|
--danger: #ff7b7b; --danger-soft: #3d2224;
|
|
--info: #82aaff; --info-soft: #222f4a;
|
|
--on-danger: #1b0d0d;
|
|
--code-bg: #24272c;
|
|
--tok-key: #d39cf5;
|
|
--tok-string: #8bd49c;
|
|
--tok-number: #82aaff;
|
|
--tok-bool: #f4a85e;
|
|
--tok-null: #8a8f98;
|
|
--shadow-raised: 0 1px 2px rgba(0, 0, 0, 0.4);
|
|
--shadow-popover: 0 6px 24px rgba(0, 0, 0, 0.45);
|
|
--shadow-modal: 0 6px 24px rgba(0, 0, 0, 0.45);
|
|
color-scheme: dark;
|
|
}
|
|
}
|
|
:root[data-theme='dark'] {
|
|
--bg: #131417;
|
|
--surface: #1b1d21;
|
|
--surface-2: #24272c;
|
|
--border: #33373e;
|
|
--border-strong: #464b53;
|
|
--fg: #e6e7e9;
|
|
--fg-muted: #9aa0a9;
|
|
--fg-subtle: #7d838c;
|
|
--accent: #6b93ff;
|
|
--accent-hover: #82a4ff;
|
|
--accent-fg: #0d1220;
|
|
--accent-soft: #232f4d;
|
|
--accent-text: #7fa2ff;
|
|
--sel: #2a3a63;
|
|
--ok: #5fd08f; --ok-soft: #1c3527;
|
|
--warn: #f0b45a; --warn-soft: #3a2e1a;
|
|
--danger: #ff7b7b; --danger-soft: #3d2224;
|
|
--info: #82aaff; --info-soft: #222f4a;
|
|
--on-danger: #1b0d0d;
|
|
--code-bg: #24272c;
|
|
--tok-key: #d39cf5;
|
|
--tok-string: #8bd49c;
|
|
--tok-number: #82aaff;
|
|
--tok-bool: #f4a85e;
|
|
--tok-null: #8a8f98;
|
|
--shadow-raised: 0 1px 2px rgba(0, 0, 0, 0.4);
|
|
--shadow-popover: 0 6px 24px rgba(0, 0, 0, 0.45);
|
|
--shadow-modal: 0 6px 24px rgba(0, 0, 0, 0.45);
|
|
color-scheme: dark;
|
|
}
|
|
|
|
/* ---------- base ---------- */
|
|
*, *::before, *::after { box-sizing: border-box; }
|
|
html, body { height: 100%; margin: 0; }
|
|
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
|
|
body { background: var(--bg); color: var(--fg); font: var(--text-base)/var(--leading) var(--font-body); -webkit-font-smoothing: antialiased; }
|
|
h1, h2, h3, h4 { font-family: var(--font-display); text-wrap: balance; }
|
|
a { color: var(--accent-text); }
|
|
button, input, select, textarea { font: inherit; color: inherit; }
|
|
img, svg, video, canvas { max-width: 100%; }
|
|
[hidden] { display: none !important; }
|
|
::selection { background: var(--sel); }
|
|
:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; }
|
|
textarea { tab-size: 4; }
|
|
|
|
.mono { font-family: var(--font-mono); font-size: var(--text-sm); }
|
|
.muted { color: var(--fg-muted); }
|
|
.small { font-size: var(--text-xs); }
|
|
.strong { font-weight: var(--weight-semibold); }
|
|
.nowrap { white-space: nowrap; }
|
|
.num { font-variant-numeric: tabular-nums; }
|
|
.spacer { flex: 1; }
|
|
.error-text { color: var(--danger); }
|
|
.ok-text { color: var(--ok); }
|
|
.label, .section-title { font-size: var(--text-xs); font-weight: var(--weight-semibold); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--fg-muted); }
|
|
.section-title { margin: var(--space-4) 0 6px; }
|
|
|
|
/* ---------- shell ---------- */
|
|
.shell {
|
|
display: grid;
|
|
grid-template-columns: var(--sidebar) minmax(0, 1fr);
|
|
grid-template-rows: var(--topbar) minmax(0, 1fr);
|
|
grid-template-areas: 'top top' 'side main';
|
|
height: 100vh;
|
|
height: 100dvh;
|
|
}
|
|
.shell.bare { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'top' 'main'; }
|
|
.shell.bare .sidebar, .shell.bare .menu-btn, .shell.bare .scrim { display: none !important; }
|
|
|
|
.topbar { grid-area: top; display: flex; align-items: center; gap: 10px; padding: 0 var(--space-3); background: var(--surface); border-bottom: 1px solid var(--border); }
|
|
.brand { display: flex; align-items: center; gap: var(--space-2); color: var(--fg); text-decoration: none; font-weight: var(--weight-brand); font-size: var(--text-md); white-space: nowrap; }
|
|
.brand-mark { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: var(--accent); color: var(--accent-fg); font-size: var(--text-base); }
|
|
.topbar-title { color: var(--fg-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
|
|
.topbar-title:not(:empty)::before { content: '/'; margin-right: 10px; opacity: 0.5; }
|
|
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 1px solid transparent; border-radius: var(--radius-md); background: transparent; color: var(--fg); cursor: pointer; font-size: 16px; }
|
|
.icon-btn:hover { background: var(--surface-2); }
|
|
.menu-btn { display: none; position: relative; }
|
|
.menu-btn.has-badge::after { content: ''; position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
|
|
|
|
.sidebar { grid-area: side; overflow-y: auto; padding: var(--space-3) 10px; background: var(--surface); border-right: 1px solid var(--border); }
|
|
.nav-filter { width: 100%; padding: 7px 10px; margin-bottom: 10px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg); }
|
|
.nav-group { margin-top: 14px; }
|
|
.nav-heading { padding: 0 var(--space-2) var(--space-1); font-size: var(--text-2xs); font-weight: var(--weight-semibold); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--fg-muted); }
|
|
.nav-item { display: flex; align-items: center; gap: 10px; padding: 6px var(--space-2); border-radius: var(--radius-control); color: var(--fg); text-decoration: none; }
|
|
.nav-item:hover { background: var(--surface-2); }
|
|
.nav-item.active { background: var(--accent-soft); color: var(--accent-text); font-weight: var(--weight-semibold); }
|
|
.nav-icon { display: inline-grid; place-items: center; min-width: 26px; height: 22px; padding: 0 3px; border-radius: 5px; background: var(--surface-2); font: var(--weight-semibold) var(--text-2xs) var(--font-mono); color: var(--fg-muted); }
|
|
.nav-item.active .nav-icon { background: var(--accent); color: var(--accent-fg); }
|
|
.nav-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
.scrim { display: none; }
|
|
|
|
.view { grid-area: main; min-width: 0; min-height: 0; overflow: auto; }
|
|
.loading, .empty { padding: var(--space-12) var(--space-6); text-align: center; color: var(--fg-muted); }
|
|
.empty .btn { margin-top: var(--space-2); }
|
|
|
|
/* ---------- pages (home, settings, anything that scrolls as a document) ---------- */
|
|
.page { max-width: var(--content-max); margin: 0 auto; padding: var(--space-8) var(--space-6) var(--space-12); }
|
|
.page h1 { margin: 0 0 var(--space-1); font-size: var(--text-2xl); }
|
|
.page h2 { margin: var(--space-8) 0 var(--space-2); font-size: var(--text-xl); }
|
|
.page-filter { width: 100%; max-width: 380px; margin: 18px 0 var(--space-5); padding: 9px var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
|
|
.page > p + .card-grid, .page > h1 + .card-grid { margin-top: var(--space-5); }
|
|
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--space-3); }
|
|
.card-link { display: flex; gap: 14px; padding: var(--space-4); border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); color: var(--fg); text-decoration: none; transition: border-color var(--dur-fast), transform var(--dur-fast); }
|
|
.card-link:hover { border-color: var(--accent); transform: translateY(-1px); }
|
|
.card-link-icon { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 9px; background: var(--accent-soft); color: var(--accent-text); font: 700 var(--text-base) var(--font-mono); }
|
|
.card-link-name { font-weight: var(--weight-semibold); margin-bottom: 2px; }
|
|
.card-link-desc { color: var(--fg-muted); font-size: var(--text-sm); }
|
|
.card { padding: var(--space-4); border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); }
|
|
|
|
/* ---------- screen chrome: toolbar / pane / statusbar ---------- */
|
|
.screen { display: flex; flex-direction: column; height: 100%; min-height: 0; }
|
|
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: var(--space-2) var(--space-3); background: var(--surface); border-bottom: 1px solid var(--border); }
|
|
.divider { width: 1px; height: 22px; margin: 0 var(--space-1); background: var(--border); }
|
|
.pane { min-width: 0; min-height: 0; overflow: auto; background: var(--surface); }
|
|
.pane-body { flex: 1; min-height: 0; overflow: auto; padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); }
|
|
.statusbar { display: flex; align-items: center; gap: var(--space-1); padding: 5px var(--space-3); border-top: 1px solid var(--border); background: var(--surface); font-size: var(--text-xs); min-height: 28px; }
|
|
.statusbar.ok { color: var(--ok); }
|
|
.statusbar.error { color: var(--danger); }
|
|
|
|
/* Two panes side by side; data-mode='a' or 'b' shows one. */
|
|
.split { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); }
|
|
.split[data-mode='a'], .split[data-mode='b'] { grid-template-columns: 1fr; }
|
|
.split[data-mode='a'] > :nth-child(2), .split[data-mode='b'] > :nth-child(1) { display: none; }
|
|
|
|
/* ---------- controls ---------- */
|
|
.btn {
|
|
display: inline-flex; align-items: center; gap: 6px; height: var(--control-h); padding: 0 11px;
|
|
border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--surface); color: var(--fg);
|
|
cursor: pointer; text-decoration: none; font-size: var(--text-sm); white-space: nowrap;
|
|
}
|
|
.btn:hover { background: var(--surface-2); }
|
|
.btn:disabled { opacity: 0.6; cursor: default; }
|
|
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); font-weight: var(--weight-semibold); }
|
|
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
|
|
.btn.danger { color: var(--danger); }
|
|
.btn.small { height: var(--control-h-sm); padding: 0 var(--space-2); font-size: var(--text-xs); }
|
|
.select { height: var(--control-h); padding: 0 6px; border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--surface); font-size: var(--text-sm); }
|
|
.input, .textarea { width: 100%; padding: 7px 10px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); outline: none; }
|
|
.input:focus, .textarea:focus { border-color: var(--accent); }
|
|
.input[aria-invalid='true'], .textarea[aria-invalid='true'] { border-color: var(--danger); }
|
|
.textarea { padding: var(--space-3) 14px; line-height: var(--leading); resize: vertical; }
|
|
.textarea.code { font-family: var(--font-mono); font-size: var(--text-sm); white-space: pre; overflow: auto; }
|
|
.field { display: grid; gap: var(--space-1); }
|
|
.field > label { font-size: var(--text-sm); font-weight: var(--weight-medium); }
|
|
.field > .hint { font-size: var(--text-xs); color: var(--fg-muted); }
|
|
.field > .error { font-size: var(--text-xs); color: var(--danger); }
|
|
.check { display: inline-flex; align-items: center; gap: 6px; font-size: var(--text-sm); white-space: nowrap; cursor: pointer; }
|
|
.segmented { display: inline-flex; padding: 2px; border-radius: 7px; background: var(--surface-2); }
|
|
.segmented button { height: var(--control-h-sm); padding: 0 var(--space-3); border: 0; border-radius: 5px; background: transparent; color: var(--fg-muted); cursor: pointer; font-size: var(--text-sm); }
|
|
.segmented button[aria-checked='true'] { background: var(--surface); color: var(--fg); font-weight: var(--weight-semibold); box-shadow: var(--shadow-raised); }
|
|
.linklike { padding: 0; border: 0; background: none; color: inherit; font-weight: var(--weight-semibold); text-decoration: underline; cursor: pointer; }
|
|
.mini { width: 22px; height: 20px; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--fg-muted); cursor: pointer; line-height: 1; }
|
|
.mini:hover { color: var(--fg); }
|
|
|
|
/* ---------- lists and tables ---------- */
|
|
.list-item { display: flex; align-items: center; gap: var(--space-3); padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--surface); }
|
|
.list-item + .list-item { margin-top: 6px; }
|
|
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
|
|
.table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
|
|
.table th { position: sticky; top: 0; padding: 6px var(--space-3); background: var(--surface-2); border-bottom: 1px solid var(--border); color: var(--fg-muted); font-weight: var(--weight-semibold); text-align: left; white-space: nowrap; }
|
|
.table td { padding: 6px var(--space-3); border-bottom: 1px solid var(--border); vertical-align: top; }
|
|
.table tr:last-child td { border-bottom: 0; }
|
|
.table tbody tr:hover { background: var(--surface-2); }
|
|
.table tr.selected { background: var(--sel); }
|
|
.table .num { text-align: right; }
|
|
|
|
/* ---------- badges, chips ---------- */
|
|
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--danger); color: var(--on-danger); font: var(--weight-semibold) var(--text-2xs)/20px var(--font-body); text-align: center; }
|
|
.chip { display: inline-block; padding: 1px 7px; border-radius: 9px; background: var(--surface-2); color: var(--fg-muted); font-size: var(--text-2xs); font-weight: var(--weight-semibold); }
|
|
.chip.new, .chip.accent { background: var(--accent-soft); color: var(--accent-text); }
|
|
.chip.ok { background: var(--ok-soft); color: var(--ok); }
|
|
.chip.warn { background: var(--warn-soft); color: var(--warn); }
|
|
.chip.danger { background: var(--danger-soft); color: var(--danger); }
|
|
|
|
/* ---------- toasts ---------- */
|
|
.toasts { position: fixed; right: var(--space-4); bottom: var(--space-4); z-index: var(--z-toast); display: flex; flex-direction: column; gap: var(--space-2); align-items: flex-end; pointer-events: none; }
|
|
.toast { max-width: min(420px, calc(100vw - 32px)); padding: 9px 14px; border-radius: var(--radius-md); background: var(--fg); color: var(--bg); box-shadow: var(--shadow-popover); font-size: var(--text-sm); animation: toast-in 0.15s ease-out; transition: opacity var(--dur-slow), transform var(--dur-slow); }
|
|
.toast.error { background: var(--danger); color: var(--on-danger); }
|
|
.toast.out { opacity: 0; transform: translateY(6px); }
|
|
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } }
|
|
|
|
/* ---------- dropdown menu ---------- */
|
|
.dropdown { position: relative; display: inline-flex; }
|
|
.caret { font-size: 10px; opacity: 0.7; }
|
|
.menu { position: absolute; top: calc(100% + 4px); right: 0; z-index: var(--z-dropdown); min-width: 200px; padding: var(--space-1); border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-popover); }
|
|
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px var(--space-2); border: 0; border-radius: 5px; background: none; color: var(--fg); text-align: left; cursor: pointer; font-size: var(--text-sm); }
|
|
.menu-item:hover, .menu-item:focus-visible { background: var(--surface-2); outline: none; }
|
|
|
|
/* ---------- modal ---------- */
|
|
.modal { width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); padding: 0; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); color: var(--fg); box-shadow: var(--shadow-modal); }
|
|
.modal.wide { width: min(980px, calc(100vw - 32px)); }
|
|
.modal::backdrop { background: var(--backdrop); }
|
|
.modal[open] { display: flex; flex-direction: column; }
|
|
.modal-head { display: flex; align-items: center; padding: var(--space-3) var(--space-3) var(--space-3) var(--space-5); border-bottom: 1px solid var(--border); }
|
|
.modal-head h2 { flex: 1; margin: 0; font-size: var(--text-lg); }
|
|
.modal-body { overflow: auto; padding: var(--space-4) var(--space-5) var(--space-5); }
|
|
.modal-foot { display: flex; justify-content: flex-end; gap: var(--space-2); padding: var(--space-3) var(--space-5); border-top: 1px solid var(--border); }
|
|
|
|
/* ---------- prose (rendered Markdown, help text, long-form) ---------- */
|
|
.prose { font-size: var(--text-md); line-height: var(--leading-prose); overflow-wrap: break-word; }
|
|
.prose > :first-child { margin-top: 0; }
|
|
.prose h1, .prose h2, .prose h3, .prose h4 { margin: 1.4em 0 0.5em; line-height: 1.25; }
|
|
.prose h1 { font-size: 1.9em; padding-bottom: 0.25em; border-bottom: 1px solid var(--border); }
|
|
.prose h2 { font-size: 1.45em; padding-bottom: 0.2em; border-bottom: 1px solid var(--border); }
|
|
.prose h3 { font-size: 1.2em; }
|
|
.prose p, .prose ul, .prose ol, .prose blockquote, .prose pre, .prose table { margin: 0 0 1em; }
|
|
.prose ul, .prose ol { padding-left: 1.6em; }
|
|
.prose li + li { margin-top: 0.25em; }
|
|
.prose li > input[type='checkbox'] { margin: 0 0.4em 0 -1.3em; vertical-align: middle; }
|
|
.prose li:has(> input[type='checkbox']) { list-style: none; }
|
|
.prose code { padding: 0.15em 0.35em; border-radius: var(--radius-sm); background: var(--code-bg); font: 0.88em var(--font-mono); }
|
|
.prose pre { padding: var(--space-3) 14px; border-radius: var(--radius-md); background: var(--code-bg); overflow: auto; }
|
|
.prose pre code { padding: 0; background: none; font-size: var(--text-sm); }
|
|
.prose blockquote { padding: 0 1em; border-left: 3px solid var(--border); color: var(--fg-muted); }
|
|
.prose table { border-collapse: collapse; display: block; overflow-x: auto; }
|
|
.prose th, .prose td { padding: 6px var(--space-3); border: 1px solid var(--border); }
|
|
.prose th { background: var(--surface-2); }
|
|
.prose img { max-width: 100%; }
|
|
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2em 0; }
|
|
|
|
/* ---------- code view with line numbers ---------- */
|
|
.code-view { flex: 1; min-height: 0; display: flex; overflow: auto; background: var(--surface); font: var(--text-sm)/20px var(--font-mono); }
|
|
.code-lines { flex: none; padding: var(--space-3) 10px var(--space-10); background: var(--surface-2); color: var(--fg-muted); text-align: right; white-space: pre; user-select: none; position: sticky; left: 0; }
|
|
.code-text { flex: 1; margin: 0; padding: var(--space-3) 14px var(--space-10); font: inherit; white-space: pre; }
|
|
.code-view.wrap .code-text { white-space: pre-wrap; overflow-wrap: anywhere; }
|
|
.code-view.wrap .code-lines { display: none; }
|
|
.t-key { color: var(--tok-key); }
|
|
.t-string { color: var(--tok-string); }
|
|
.t-number { color: var(--tok-number); }
|
|
.t-boolean { color: var(--tok-bool); }
|
|
.t-null { color: var(--tok-null); }
|
|
|
|
/* ---------- narrow screens ---------- */
|
|
@media (max-width: 800px) {
|
|
.shell { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'top' 'main'; }
|
|
.menu-btn { display: inline-grid; }
|
|
.sidebar { position: fixed; z-index: var(--z-drawer); top: var(--topbar); bottom: 0; left: 0; width: min(280px, 85vw); transform: translateX(-100%); transition: transform var(--dur-base) ease-out; box-shadow: var(--shadow-popover); }
|
|
.drawer-open .sidebar { transform: none; }
|
|
.drawer-open .scrim { display: block; position: fixed; inset: var(--topbar) 0 0 0; z-index: var(--z-scrim); background: var(--scrim); }
|
|
/* one row that scrolls sideways, so the work area keeps the screen */
|
|
.toolbar { padding: var(--space-2); flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
|
|
.toolbar > * { flex: none; }
|
|
.toolbar > .spacer { flex: 1 0 8px; }
|
|
.page { padding: var(--space-5) var(--space-4) var(--space-10); }
|
|
.split:not([data-mode='a']):not([data-mode='b']) { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }
|
|
}
|
|
|
|
@media (prefers-reduced-motion: reduce) {
|
|
*, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
|
|
}
|