Files
allmende/web/dist/style.css
T
nilsandClaude Sonnet 5.5 3b0351c774 Implement end-to-end encrypted buyer/seller messaging
Wire format (internal/message): sealed boxes to the listing's device key
(X25519 + HKDF + ChaCha20-Poly1305), padded, proof-of-work stamped, with
signed owner replies and address grants. Relay validation, bounded queues,
gossip on per-region message topics and sync (store, p2p).

Owner side (internal/inbox, API): inbox with hidden link messages and a
per-day new-thread limit, replies, grants, and a private per-listing
address. Public POST/GET /api/v1/messages for buyers.

Browser: noble-based sealing and reply verification checked against a Go
fixture, contact form, conversation view, message list, de/en strings.

Docs: PROTOCOL.md messaging section matches the implementation.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-17 19:44:59 +01:00

239 lines
6.2 KiB
CSS

:root {
--bg: #f7f6f2;
--surface: #ffffff;
--text: #1d2420;
--muted: #5f6b64;
--line: #dcdcd2;
--accent: #2f6b4f;
--accent-text: #ffffff;
--ok: #1f7a4d;
--ok-bg: #e3f3ea;
--bad: #b3261e;
--bad-bg: #fbe7e5;
--warn: #8a5a00;
--warn-bg: #fdf1d6;
--radius: 10px;
--maxw: 60rem;
color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
:root {
--bg: #14181a;
--surface: #1c2224;
--text: #e8ece9;
--muted: #9aa7a0;
--line: #2f3a3d;
--accent: #6fbf97;
--accent-text: #0e1a14;
--ok: #6fd6a0;
--ok-bg: #173325;
--bad: #ff8a80;
--bad-bg: #3a1c1a;
--warn: #f2c15b;
--warn-bg: #3a2e12;
}
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
margin: 0;
background: var(--bg);
color: var(--text);
font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); }
.top, main, .foot {
max-width: var(--maxw);
margin: 0 auto;
padding-left: 16px;
padding-right: 16px;
}
.top {
display: flex;
flex-wrap: wrap;
align-items: baseline;
gap: 4px 16px;
padding-top: 20px;
padding-bottom: 8px;
}
.brand {
font-size: 1.6rem;
font-weight: 700;
letter-spacing: -0.02em;
color: var(--text);
text-decoration: none;
}
.status, .muted, .hint { color: var(--muted); font-size: 0.9rem; }
.info { margin-left: 0.5rem; }
.tagline { color: var(--muted); margin: 4px 0 20px; }
.pad { padding: 16px; }
h1 { font-size: 1.6rem; line-height: 1.25; margin: 0; }
h2 { font-size: 1.05rem; margin: 0 0 8px; }
h3 { font-size: 1.05rem; line-height: 1.3; margin: 0; }
/* Search form */
.filters {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
gap: 12px;
background: var(--surface);
border: 1px solid var(--line);
border-radius: var(--radius);
padding: 16px;
}
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field-label { font-size: 0.85rem; font-weight: 600; }
input, select {
width: 100%;
min-height: 2.5rem;
padding: 6px 10px;
font: inherit;
color: var(--text);
background: var(--bg);
border: 1px solid var(--line);
border-radius: 8px;
}
input:focus-visible, select:focus-visible, .btn:focus-visible, a:focus-visible, summary:focus-visible {
outline: 3px solid var(--accent);
outline-offset: 2px;
}
.actions { display: flex; gap: 8px; align-items: end; grid-column: 1 / -1; }
.btn {
min-height: 2.5rem;
padding: 6px 16px;
font: inherit;
font-weight: 600;
color: var(--text);
background: var(--surface);
border: 1px solid var(--line);
border-radius: 8px;
cursor: pointer;
}
.btn.primary { color: var(--accent-text); background: var(--accent); border-color: var(--accent); }
/* Results */
.results { margin-top: 20px; }
.cards {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
gap: 12px;
}
.card {
display: block;
padding: 14px 16px;
color: inherit;
text-decoration: none;
background: var(--surface);
border: 1px solid var(--line);
border-radius: var(--radius);
}
.card:hover { border-color: var(--accent); }
.card p { margin: 4px 0 0; }
.card-top { display: flex; gap: 8px; justify-content: space-between; align-items: flex-start; }
.price { font-size: 1.15rem; font-weight: 700; }
.price.big { font-size: 1.5rem; margin: 6px 0 16px; }
.facts { color: var(--muted); }
.results-foot { margin: 16px 0 32px; }
.error { color: var(--bad); }
.warn { color: var(--warn); background: var(--warn-bg); padding: 8px 12px; border-radius: 8px; }
.badge {
flex: none;
padding: 1px 8px;
font-size: 0.75rem;
font-weight: 600;
white-space: nowrap;
border-radius: 999px;
}
.badge.ok { color: var(--ok); background: var(--ok-bg); }
.badge.bad { color: var(--bad); background: var(--bad-bg); }
/* Detail */
.back { display: inline-block; margin: 8px 0 16px; }
.detail-head { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; }
.panel {
margin: 0 0 12px;
padding: 14px 16px;
background: var(--surface);
border: 1px solid var(--line);
border-radius: var(--radius);
}
.panel p { margin: 0 0 8px; }
.desc { white-space: pre-wrap; overflow-wrap: anywhere; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0 0 8px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9rem; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; list-style: none; }
.chips li { padding: 2px 10px; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; }
.checks { list-style: none; margin: 8px 0; padding: 0; }
.checks li { display: flex; flex-wrap: wrap; gap: 0 8px; padding: 2px 0; }
.checks .mark { font-weight: 700; }
.checks .ok .mark { color: var(--ok); }
.checks .bad { color: var(--bad); }
details { margin-top: 8px; }
summary { cursor: pointer; }
pre {
overflow-x: auto;
padding: 12px;
font-size: 0.8rem;
background: var(--bg);
border: 1px solid var(--line);
border-radius: 8px;
}
.foot { padding-top: 24px; padding-bottom: 32px; color: var(--muted); font-size: 0.85rem; }
@media (max-width: 30rem) {
.detail-head { flex-direction: column; }
.kv { grid-template-columns: 1fr; }
}
/* Messages */
.nav { margin-left: auto; }
textarea {
width: 100%;
box-sizing: border-box;
padding: 8px 10px;
font: inherit;
color: var(--text);
background: var(--bg);
border: 1px solid var(--line);
border-radius: 8px;
resize: vertical;
}
textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.compose .actions { margin-top: 8px; align-items: center; }
.small { font-size: 0.85rem; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.thread, .convs { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; }
.msg { max-width: 85%; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.msg.out { justify-self: end; border-color: var(--accent); }
.msg .who { color: var(--muted); font-size: 0.85rem; margin-bottom: 4px; }
.grant { border: 2px solid var(--accent); border-radius: 8px; padding: 10px 12px; margin: 4px 0; }
input[readonly] { width: 100%; box-sizing: border-box; }