feat: goctf final
This commit is contained in:
commit
f205b802d5
128 files changed
+37794
No files matched your search
@@ -0,0 +1,69 @@
|
||||
const unbytes = new TextDecoder();
|
||||
|
||||
function g(a, b, carry) {
|
||||
const value = (a + b + carry) & 255;
|
||||
return ((value << 2) | (value >>> 6)) & 255;
|
||||
}
|
||||
|
||||
function f(x) {
|
||||
const a = x >>> 24, b = (x >>> 16) & 255, c = (x >>> 8) & 255, d = x & 255;
|
||||
const y1 = g(a ^ b, c ^ d, 1);
|
||||
const y2 = g(c ^ d, y1, 0);
|
||||
return (g(a, y1, 0) << 24 | y1 << 16 | y2 << 8 | g(d, y2, 1)) >>> 0;
|
||||
}
|
||||
|
||||
function fk(x, y) {
|
||||
const a = x >>> 24, b = (x >>> 16) & 255, c = (x >>> 8) & 255, d = x & 255;
|
||||
const u = y >>> 24, v = (y >>> 16) & 255, w = (y >>> 8) & 255, z = y & 255;
|
||||
const middle1 = g(a ^ b, (c ^ d) ^ u, 1);
|
||||
const middle2 = g(c ^ d, middle1 ^ v, 0);
|
||||
return (g(a, middle1 ^ w, 0) << 24 | middle1 << 16 | middle2 << 8 | g(d, middle2 ^ z, 1)) >>> 0;
|
||||
}
|
||||
|
||||
function block(left, right, keys) {
|
||||
let x = left, y = (right ^ left) >>> 0;
|
||||
for (let round = 3; round >= 1; round--) {
|
||||
const next = (x ^ f(y ^ keys[round])) >>> 0;
|
||||
x = y;
|
||||
y = next;
|
||||
}
|
||||
const initial = (x ^ f(y ^ keys[0])) >>> 0;
|
||||
return [(initial ^ keys[4]) >>> 0, (initial ^ y ^ keys[5]) >>> 0];
|
||||
}
|
||||
|
||||
export function decrypt(secret, cipher) {
|
||||
if (!/^[0-9a-f]+$/.test(cipher) || cipher.length % 16 || !/^[0-9a-f]{48}$/.test(secret))
|
||||
throw Error('Invalid message');
|
||||
const material = Array.from({ length: 6 }, (_, i) => parseInt(secret.slice(i * 8, i * 8 + 8), 16) >>> 0);
|
||||
let left = material[0], right = material[1], previous = material[5];
|
||||
const words = [];
|
||||
for (let i = 0; i < 6; i++) {
|
||||
const next = fk(left, (right ^ previous ^ material[i]) >>> 0);
|
||||
previous = left;
|
||||
left = right;
|
||||
right = next;
|
||||
words.push(next >>> 16, next & 65535);
|
||||
}
|
||||
const outputLeft = ((words[8] << 16 | words[9]) ^ material[2]) >>> 0;
|
||||
const outputRight = ((words[10] << 16 | words[11]) ^ material[3]) >>> 0;
|
||||
const keys = Array.from({ length: 4 }, (_, i) =>
|
||||
(((words[i] >>> 8) << 16 | (words[i] & 255) << 8) ^ outputLeft ^
|
||||
(i % 2 ? outputRight : 0) ^ material[i]) >>> 0);
|
||||
keys.push(((words[4] << 16 | words[5]) ^ outputLeft ^ outputRight ^ material[4]) >>> 0,
|
||||
((words[6] << 16 | words[7]) ^ outputRight ^ material[5]) >>> 0);
|
||||
const output = new Uint8Array(cipher.length / 2);
|
||||
for (let offset = 0; offset < output.length; offset += 8) {
|
||||
const [left, right] = block(
|
||||
parseInt(cipher.slice(offset * 2, offset * 2 + 8), 16) >>> 0,
|
||||
parseInt(cipher.slice(offset * 2 + 8, offset * 2 + 16), 16) >>> 0, keys
|
||||
);
|
||||
for (let i = 0; i < 4; i++) {
|
||||
output[offset + i] = left >>> (24 - 8 * i);
|
||||
output[offset + 4 + i] = right >>> (24 - 8 * i);
|
||||
}
|
||||
}
|
||||
const padding = output[output.length - 1];
|
||||
if (padding < 1 || padding > 8 || !output.slice(-padding).every(byte => byte === padding))
|
||||
throw Error('Invalid message padding');
|
||||
return unbytes.decode(output.slice(0, -padding));
|
||||
}
|
||||
@@ -0,0 +1,288 @@
|
||||
import { createApp, ref } from 'vue/dist/vue.esm-bundler.js';
|
||||
import { decrypt } from './crypto.js';
|
||||
import './style.css';
|
||||
|
||||
const textBytes = new TextEncoder();
|
||||
|
||||
createApp({
|
||||
setup() {
|
||||
const queue = ref(''), key = ref(''), pass = ref(''), recipient = ref('');
|
||||
const queueLabel = ref('untitled'), retention = ref(3600);
|
||||
const topic = ref('inbox'), delay = ref(0), text = ref('');
|
||||
const source = ref('int filter(int length) {\n return length <= 4096;\n}');
|
||||
const filterLabel = ref('unnamed'), revision = ref('');
|
||||
const selectedFilter = ref(null);
|
||||
const received = ref([]), filters = ref([]), nextAfter = ref(0), pageShowRead = ref(false);
|
||||
const state = ref(null), view = ref('messages'), showRead = ref(false);
|
||||
const feedback = ref({}), compiler = ref(''), listing = ref('');
|
||||
const path = suffix => '/api/queues/' + queue.value + suffix;
|
||||
const credentials = () => queue.value + ':' + key.value;
|
||||
|
||||
async function api(url, options = {}, accepted = []) {
|
||||
const response = await fetch(url, {
|
||||
...options,
|
||||
headers: { 'Content-Type': 'application/json', ...options.headers }
|
||||
});
|
||||
const body = await response.json();
|
||||
if (!response.ok && !accepted.includes(response.status)) throw Error(body.error || body.compiler || 'Request failed');
|
||||
return body;
|
||||
}
|
||||
|
||||
async function action(name, work) {
|
||||
feedback.value[name] = null;
|
||||
try {
|
||||
const result = await work();
|
||||
feedback.value[name] = typeof result === 'string' ? { kind: 'ok', text: result } : result;
|
||||
}
|
||||
catch (problem) { feedback.value[name] = { kind: 'error', text: problem.message }; }
|
||||
}
|
||||
|
||||
async function refresh() {
|
||||
state.value = await api(path(''));
|
||||
}
|
||||
const headers = () => ({ 'X-Queue-Key': key.value });
|
||||
|
||||
const create = () => action('access', async () => {
|
||||
const created = await api('/api/queues', {
|
||||
method: 'POST', body: JSON.stringify({ label: queueLabel.value, retention_seconds: Number(retention.value) })
|
||||
});
|
||||
queue.value = created.id;
|
||||
key.value = created.read_key;
|
||||
pass.value = credentials();
|
||||
state.value = created;
|
||||
recipient.value = created.id;
|
||||
received.value = [];
|
||||
nextAfter.value = 0;
|
||||
filters.value = [];
|
||||
selectedFilter.value = null;
|
||||
view.value = 'messages';
|
||||
return 'Mailbox created. Save your access pass.';
|
||||
});
|
||||
const open = () => action('open', async () => {
|
||||
const [id, secret, extra] = pass.value.trim().split(':');
|
||||
if (!id || !secret || extra) throw Error('Enter a mailbox access pass in the form UUID:read_key.');
|
||||
const info = await api('/api/queues/' + id);
|
||||
await api('/api/queues/' + id + '/messages?show_read=true', { headers: { 'X-Queue-Key': secret } });
|
||||
queue.value = id;
|
||||
key.value = secret;
|
||||
state.value = info;
|
||||
recipient.value = id;
|
||||
received.value = [];
|
||||
nextAfter.value = 0;
|
||||
filters.value = [];
|
||||
selectedFilter.value = null;
|
||||
view.value = 'messages';
|
||||
feedback.value.access = { kind: 'ok', text: 'Mailbox opened.' };
|
||||
});
|
||||
const leave = () => {
|
||||
queue.value = '';
|
||||
key.value = '';
|
||||
pass.value = '';
|
||||
state.value = null;
|
||||
received.value = [];
|
||||
nextAfter.value = 0;
|
||||
filters.value = [];
|
||||
selectedFilter.value = null;
|
||||
compiler.value = '';
|
||||
listing.value = '';
|
||||
feedback.value = {};
|
||||
feedback.value.open = { kind: 'ok', text: 'Mailbox closed.' };
|
||||
};
|
||||
const send = () => action('send', async () => {
|
||||
const id = recipient.value.trim();
|
||||
if (!text.value) throw Error('Write a message first.');
|
||||
const raw = textBytes.encode(text.value);
|
||||
if (raw.length > 4096) throw Error('Messages must be at most 4096 bytes.');
|
||||
await api('/api/queues/' + id + '/messages', {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({
|
||||
message: btoa(Array.from(raw, byte => String.fromCharCode(byte)).join('')),
|
||||
topic: topic.value,
|
||||
delay_ms: Number(delay.value)
|
||||
})
|
||||
});
|
||||
text.value = '';
|
||||
if (state.value) await refresh();
|
||||
return 'Message sent.';
|
||||
});
|
||||
const receive = () => action('receive', async () => {
|
||||
await refresh();
|
||||
const result = await api(path('/messages' + (showRead.value ? '?show_read=true' : '')), { headers: headers() });
|
||||
pageShowRead.value = showRead.value;
|
||||
nextAfter.value = result.has_more ? result.next_after : 0;
|
||||
received.value = result.messages.map(message => {
|
||||
try {
|
||||
return { id: message.id, topic: message.topic, text: decrypt(key.value, message.ciphertext) };
|
||||
} catch {
|
||||
return { id: message.id, topic: message.topic, text: 'Cannot open this message.' };
|
||||
}
|
||||
});
|
||||
await refresh();
|
||||
return result.messages.length ? result.messages.length + ' message(s) displayed.' : 'No messages to display.';
|
||||
});
|
||||
const loadMore = () => action('receive', async () => {
|
||||
if (!nextAfter.value) return 'No more messages.';
|
||||
const suffix = '/messages?after_id=' + nextAfter.value + (pageShowRead.value ? '&show_read=true' : '');
|
||||
const result = await api(path(suffix), { headers: headers() });
|
||||
nextAfter.value = result.has_more ? result.next_after : 0;
|
||||
received.value.push(...result.messages.map(message => {
|
||||
try {
|
||||
return { id: message.id, topic: message.topic, text: decrypt(key.value, message.ciphertext) };
|
||||
} catch {
|
||||
return { id: message.id, topic: message.topic, text: 'Cannot open this message.' };
|
||||
}
|
||||
}));
|
||||
await refresh();
|
||||
return result.messages.length + ' more message(s) displayed.';
|
||||
});
|
||||
const loadFilters = () => action('refreshFilters', async () => {
|
||||
filters.value = (await api(path('/filters'))).filters;
|
||||
return 'Revision list updated.';
|
||||
});
|
||||
const selectFilter = filter => action('selectFilter', async () => {
|
||||
const details = await api(path('/filters/' + filter.revision), { headers: headers() });
|
||||
revision.value = details.revision;
|
||||
selectedFilter.value = details;
|
||||
return 'Revision #' + details.revision + ' selected.';
|
||||
});
|
||||
const newDraft = () => {
|
||||
selectedFilter.value = null;
|
||||
revision.value = '';
|
||||
compiler.value = '';
|
||||
listing.value = '';
|
||||
feedback.value.compile = null;
|
||||
feedback.value.selectFilter = { kind: 'ok', text: 'Draft editor ready.' };
|
||||
};
|
||||
const install = () => action('compile', async () => {
|
||||
compiler.value = '';
|
||||
listing.value = '';
|
||||
const result = await api(path('/filter'), {
|
||||
method: 'POST', headers: headers(), body: JSON.stringify({ source: source.value, label: filterLabel.value })
|
||||
}, [422]);
|
||||
compiler.value = result.compiler || '';
|
||||
listing.value = result.listing || '';
|
||||
filters.value = (await api(path('/filters'))).filters;
|
||||
if (!result.ok) {
|
||||
return { kind: 'error', text: 'Revision #' + result.revision + ' rejected. See compiler output below.' };
|
||||
}
|
||||
return 'Revision #' + result.revision + ' ready. Select it to activate.';
|
||||
});
|
||||
const draftFrom = () => {
|
||||
if (!selectedFilter.value?.source) return;
|
||||
source.value = selectedFilter.value.source;
|
||||
filterLabel.value = selectedFilter.value.label;
|
||||
newDraft();
|
||||
};
|
||||
const activate = () => action('activate', async () => {
|
||||
await api(path('/filters/' + revision.value + '/activate'), {
|
||||
method: 'POST', headers: headers()
|
||||
});
|
||||
filters.value = (await api(path('/filters'))).filters;
|
||||
if (selectedFilter.value) selectedFilter.value.active = true;
|
||||
await refresh();
|
||||
return 'Revision #' + revision.value + ' activated.';
|
||||
});
|
||||
|
||||
return {
|
||||
queue, pass, recipient, queueLabel, retention, topic, delay, text,
|
||||
source, filterLabel, revision, selectedFilter, received, filters, state, view, showRead, nextAfter,
|
||||
feedback, compiler, listing, credentials,
|
||||
create, open, leave, send, receive, loadMore, loadFilters, selectFilter, newDraft, draftFrom, install, activate
|
||||
};
|
||||
},
|
||||
template: `
|
||||
<main>
|
||||
<header class="masthead">
|
||||
<div class="brand-mark">✦</div>
|
||||
<div><p class="eyebrow">LIGHTHOUSE / MAIL</p><h1>Lighthouse</h1><p>A quiet place for messages with a programmable door.</p></div>
|
||||
</header>
|
||||
<div v-if="!state" class="entry-grid">
|
||||
<section class="panel">
|
||||
<p class="eyebrow">NEW MAILBOX</p><h2>Create a mailbox</h2>
|
||||
<p class="muted">We generate the address and private access key for you.</p>
|
||||
<label>Mailbox name<input v-model="queueLabel" maxlength="48" autocomplete="off"></label>
|
||||
<label>Keep messages for (seconds)<input v-model.number="retention" type="number" min="60" max="604800"></label>
|
||||
<div class="actions"><button @click="create">Create mailbox</button><span v-if="feedback.access" class="action-feedback" :class="feedback.access.kind" :role="feedback.access.kind === 'error' ? 'alert' : 'status'">{{ feedback.access.text }}</span></div>
|
||||
</section>
|
||||
<section class="panel">
|
||||
<p class="eyebrow">RETURNING</p><h2>Open your mailbox</h2>
|
||||
<p class="muted">Use the access pass you received when you created it.</p>
|
||||
<label>Access pass<input v-model="pass" placeholder="UUID:read_key" spellcheck="false" autocomplete="off" @keyup.enter="open"></label>
|
||||
<div class="actions"><button class="secondary" @click="open">Open mailbox</button><span v-if="feedback.open" class="action-feedback" :class="feedback.open.kind" :role="feedback.open.kind === 'error' ? 'alert' : 'status'">{{ feedback.open.text }}</span></div>
|
||||
</section>
|
||||
<section class="panel send-panel">
|
||||
<p class="eyebrow">PUBLIC DELIVERY</p><h2>Send a message</h2>
|
||||
<p class="muted">No access pass needed. All you need is the recipient's mailbox address.</p>
|
||||
<label>Mailbox address<input v-model="recipient" spellcheck="false" placeholder="Recipient UUID"></label>
|
||||
<div class="fields twin"><label>Topic<input v-model="topic"></label><label>Delay · ms<input v-model.number="delay" type="number" min="0" max="60000"></label></div>
|
||||
<label>Message<textarea v-model="text" placeholder="Write a message..."></textarea></label>
|
||||
<div class="actions"><button @click="send">Send message</button><span v-if="feedback.send" class="action-feedback" :class="feedback.send.kind" :role="feedback.send.kind === 'error' ? 'alert' : 'status'">{{ feedback.send.text }}</span></div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<template v-else>
|
||||
<section class="panel identity-bar">
|
||||
<div><p class="eyebrow">YOUR MAILBOX</p><h2>{{ state.label }}</h2><p class="mono">{{ queue }}</p></div>
|
||||
<div class="identity-actions"><span>{{ state.ready_count ?? 0 }} unread / {{ state.stored_count ?? 0 }} stored</span><button class="secondary" @click="leave">Close mailbox</button></div>
|
||||
<details class="access"><summary>Access pass · keep private</summary><code>{{ credentials() }}</code></details>
|
||||
<span v-if="feedback.access" class="action-feedback" :class="feedback.access.kind" :role="feedback.access.kind === 'error' ? 'alert' : 'status'">{{ feedback.access.text }}</span>
|
||||
</section>
|
||||
<nav class="tabs" aria-label="Mailbox pages">
|
||||
<button :class="{ current: view === 'messages' }" @click="view = 'messages'">Messages</button>
|
||||
<button :class="{ current: view === 'filters' }" @click="view = 'filters'; loadFilters()">Door filters</button>
|
||||
</nav>
|
||||
|
||||
<div v-if="view === 'messages'" class="entry-grid">
|
||||
<section class="panel">
|
||||
<p class="eyebrow">INBOX</p><h2>Messages</h2>
|
||||
<p class="muted">Reading collects new messages. They remain available in history until they expire.</p>
|
||||
<div class="actions"><button @click="receive">Read new messages</button><span v-if="feedback.receive" class="action-feedback" :class="feedback.receive.kind" :role="feedback.receive.kind === 'error' ? 'alert' : 'status'">{{ feedback.receive.text }}</span><details class="read-options"><summary>Options</summary><label><input type="checkbox" v-model="showRead"> Include already read</label></details></div>
|
||||
<div class="inbox" v-if="received.length"><article v-for="message in received" :key="message.id"><small>#{{ message.id }} · {{ message.topic }}</small><p>{{ message.text }}</p></article></div>
|
||||
<p v-if="!received.length" class="muted empty">No messages displayed.</p>
|
||||
<button v-if="nextAfter" class="secondary" @click="loadMore">Load more messages</button>
|
||||
</section>
|
||||
<section class="panel">
|
||||
<p class="eyebrow">OUTBOX</p><h2>Send a message</h2>
|
||||
<p class="muted">Anyone with a mailbox address can send. The service seals the message for its reader.</p>
|
||||
<label>To · public mailbox address<input v-model="recipient" spellcheck="false"></label>
|
||||
<div class="fields twin"><label>Topic<input v-model="topic"></label><label>Delay · ms<input v-model.number="delay" type="number" min="0" max="60000"></label></div>
|
||||
<label>Message<textarea v-model="text" placeholder="Write a message..."></textarea></label>
|
||||
<div class="actions"><button @click="send">Send message</button><span v-if="feedback.send" class="action-feedback" :class="feedback.send.kind" :role="feedback.send.kind === 'error' ? 'alert' : 'status'">{{ feedback.send.text }}</span></div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<div v-else class="entry-grid filters-grid">
|
||||
<section class="panel">
|
||||
<template v-if="selectedFilter">
|
||||
<p class="eyebrow">REVISION #{{ selectedFilter.revision }}</p><h2>{{ selectedFilter.label }}</h2>
|
||||
<p class="muted">{{ selectedFilter.state }}{{ selectedFilter.active ? ' · active' : '' }} · {{ selectedFilter.created_at }}</p>
|
||||
<label>C source<textarea class="source" :value="selectedFilter.source" readonly placeholder="Source not saved for this revision"></textarea></label>
|
||||
<pre v-if="selectedFilter.compiler">{{ selectedFilter.compiler }}</pre>
|
||||
<details v-if="selectedFilter.listing"><summary>Instruction listing</summary><pre>{{ selectedFilter.listing }}</pre></details>
|
||||
<div class="actions"><button class="secondary" @click="newDraft">Compile new draft</button><button v-if="selectedFilter.source" class="secondary" @click="draftFrom">Use source as draft</button></div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<p class="eyebrow">FILTER EDITOR</p><h2>Compile new draft</h2>
|
||||
<p class="muted">A C function decides which messages enter. Compile a draft before activating it.</p>
|
||||
<label>Draft name<input v-model="filterLabel" maxlength="48"></label>
|
||||
<label>C source<textarea class="source" v-model="source" spellcheck="false"></textarea></label>
|
||||
<div class="actions"><button @click="install">Compile draft</button><span v-if="feedback.compile" class="action-feedback" :class="feedback.compile.kind" :role="feedback.compile.kind === 'error' ? 'alert' : 'status'">{{ feedback.compile.text }}</span></div>
|
||||
<pre v-if="compiler" class="diagnostic">{{ compiler }}</pre>
|
||||
<details v-if="listing"><summary>Instruction listing</summary><pre>{{ listing }}</pre></details>
|
||||
</template>
|
||||
</section>
|
||||
<section class="panel">
|
||||
<p class="eyebrow">FILTER HISTORY</p><h2>Revisions</h2>
|
||||
<p class="muted">Only one revision is active. Select a ready draft to make it the front door.</p>
|
||||
<div class="actions"><button class="secondary" @click="loadFilters">Refresh</button><span v-if="feedback.refreshFilters" class="action-feedback" :class="feedback.refreshFilters.kind" :role="feedback.refreshFilters.kind === 'error' ? 'alert' : 'status'">{{ feedback.refreshFilters.text }}</span></div>
|
||||
<div class="actions"><button :disabled="!selectedFilter || selectedFilter.state !== 'ready' || selectedFilter.active" @click="activate">Activate selected</button><span v-if="feedback.activate" class="action-feedback" :class="feedback.activate.kind" :role="feedback.activate.kind === 'error' ? 'alert' : 'status'">{{ feedback.activate.text }}</span></div>
|
||||
<span v-if="feedback.selectFilter" class="action-feedback" :class="feedback.selectFilter.kind" :role="feedback.selectFilter.kind === 'error' ? 'alert' : 'status'">{{ feedback.selectFilter.text }}</span>
|
||||
<ul class="history"><li v-for="filter in filters" :key="filter.revision"><button class="revision" :class="{ selected: selectedFilter?.revision === filter.revision }" @click="selectFilter(filter)"><span>#{{ filter.revision }} · {{ filter.label }}</span><span>{{ filter.active ? 'active' : filter.state }}</span></button></li></ul>
|
||||
<p v-if="!filters.length" class="muted empty">No revisions yet.</p>
|
||||
</section>
|
||||
</div>
|
||||
</template>
|
||||
<footer>LIGHTHOUSE / EVERY MESSAGE FINDS ITS SHORE</footer>
|
||||
</main>
|
||||
`
|
||||
}).mount('#app');
|
||||
@@ -0,0 +1,48 @@
|
||||
@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=DM+Sans:wght@400;500;600;700&display=swap');
|
||||
|
||||
:root{font-family:'DM Sans',system-ui,sans-serif;color:#e8e9de;background:#101c23;font-synthesis:none}
|
||||
*{box-sizing:border-box}
|
||||
body{margin:0;min-height:100vh;background:radial-gradient(ellipse at 85% 0%,#28414b 0%,transparent 45%),#101c23}
|
||||
main{max-width:1060px;margin:auto;padding:48px 28px 60px}
|
||||
.masthead{display:flex;align-items:center;gap:20px;margin-bottom:38px}
|
||||
.brand-mark{width:62px;height:62px;flex:none;display:grid;place-items:center;border:1px solid #e7ad67;border-radius:50%;color:#f4bc77;font-size:36px;box-shadow:0 0 36px #e7ad6733}
|
||||
.masthead h1{font-size:clamp(2rem,5vw,3.25rem);font-weight:600;letter-spacing:-.06em;margin:0}
|
||||
.masthead p:not(.eyebrow){margin:3px 0 0;color:#a6b9b9}
|
||||
.eyebrow{font:500 11px 'DM Mono',monospace;letter-spacing:.18em;color:#edb375;margin:0 0 10px}
|
||||
.panel{background:#192a32;border:1px solid #36505a;border-radius:12px;padding:28px;box-shadow:0 14px 40px #07111840;min-width:0}
|
||||
.entry-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;align-items:start}
|
||||
.send-panel{grid-column:1/-1;max-width:650px;width:100%;justify-self:center}
|
||||
h2{margin:0;font-weight:600;font-size:26px;letter-spacing:-.04em}
|
||||
.muted{color:#a7bbbb;font-size:13px;line-height:1.6;margin:12px 0 24px}
|
||||
label{display:block;font-size:12px;font-weight:600;color:#b5c7c5;letter-spacing:.03em;margin:18px 0}
|
||||
input,textarea{display:block;width:100%;margin-top:9px;padding:12px 13px;border:1px solid #49626b;border-radius:6px;background:#102028;color:#f5f3e8;font:14px 'DM Sans',sans-serif;outline:none}
|
||||
input:focus,textarea:focus{border-color:#f1b675;box-shadow:0 0 0 3px #f1b67522}
|
||||
input::placeholder,textarea::placeholder{color:#749093}
|
||||
textarea{height:118px;resize:vertical;line-height:1.5}
|
||||
.source{height:220px;font:13px/1.6 'DM Mono',monospace}
|
||||
.fields{display:grid;gap:14px}.fields label{margin-top:0}.twin{grid-template-columns:1fr 1fr}
|
||||
button{border:1px solid #e9ac68;border-radius:6px;background:#e9ac68;color:#19252a;padding:11px 16px;font:600 13px 'DM Sans',sans-serif;cursor:pointer;transition:background .15s,border-color .15s}
|
||||
button:hover:not(:disabled){background:#ffcb8e;border-color:#ffcb8e}
|
||||
button:disabled{opacity:.5;cursor:not-allowed}
|
||||
.secondary{background:transparent;color:#f1c494;border-color:#866f58}.secondary:hover:not(:disabled){background:#2c3c40}
|
||||
.actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:18px 0}
|
||||
.action-feedback{font-size:13px;line-height:1.45}.action-feedback.ok{color:#bce5ca}.action-feedback.error{color:#ffb7a7}.diagnostic{margin-top:12px}
|
||||
.identity-bar{display:grid;grid-template-columns:1fr auto;gap:14px 30px;align-items:center;margin-bottom:22px}
|
||||
.identity-bar .mono{font:12px 'DM Mono',monospace;color:#aec1bf;overflow-wrap:anywhere;margin:10px 0 0}
|
||||
.identity-actions{display:flex;align-items:center;gap:16px;color:#a7bbbb;font:12px 'DM Mono',monospace}
|
||||
.access{grid-column:1/-1;border-top:1px solid #344a53;padding-top:15px;color:#a7bbbb;font-size:12px}
|
||||
.access code{display:block;margin-top:12px;padding:12px;background:#102028;border-radius:6px;color:#f3c58e;font:12px 'DM Mono',monospace;overflow-wrap:anywhere}
|
||||
summary{cursor:pointer;color:#efba7e;font-size:13px}
|
||||
.tabs{display:flex;gap:8px;margin:0 0 18px;border-bottom:1px solid #36505a;padding-bottom:12px}
|
||||
.tabs button{background:transparent;border-color:transparent;color:#abc0c0}.tabs button.current{color:#1b2930;background:#e9ac68;border-color:#e9ac68}
|
||||
.read-options{font-size:12px}.read-options summary{color:#8da9a9}.read-options label{display:flex;align-items:center;gap:9px;margin:12px 0 0;font-size:12px;font-weight:400}.read-options input{width:auto;margin:0;accent-color:#e9ac68}
|
||||
.inbox{max-height:450px;overflow:auto;margin-top:22px}.inbox article{background:#14252d;border:1px solid #324a54;border-radius:6px;padding:12px 14px;margin-bottom:8px;overflow-wrap:anywhere}.inbox article p{margin:8px 0 0}.inbox small{color:#e4b47f;font:11px 'DM Mono',monospace}
|
||||
.empty{margin-top:24px}
|
||||
pre{white-space:pre-wrap;overflow-wrap:anywhere;background:#102028;border:1px solid #344a53;padding:15px;border-radius:6px;font:11px/1.55 'DM Mono',monospace;max-height:360px;overflow:auto}
|
||||
details pre{margin-top:12px}
|
||||
.history{list-style:none;padding:0;margin:18px 0 0}.history li{margin-bottom:8px}
|
||||
.revision{width:100%;display:flex;justify-content:space-between;text-align:left;gap:12px;background:#102028;border:1px solid #344a53;color:#e9eadd;font:12px 'DM Mono',monospace}.revision span:last-child{color:#e9ac68}.revision.selected{border-color:#e9ac68}
|
||||
.alert,.notice{padding:14px 18px;border-radius:6px;margin:0 0 18px}.alert{background:#502d32;border:1px solid #b66d70;color:#ffdfd6}.notice{background:#1e3a35;border:1px solid #588f75;color:#c6e8d0}
|
||||
footer{text-align:center;color:#748b8b;font:10px 'DM Mono',monospace;letter-spacing:.14em;margin-top:42px}
|
||||
@media(max-width:780px){.entry-grid{grid-template-columns:1fr}.identity-bar{grid-template-columns:1fr}.identity-actions{justify-content:space-between}}
|
||||
@media(max-width:560px){main{padding:26px 15px 45px}.masthead{gap:14px;margin-bottom:26px}.brand-mark{width:48px;height:48px;font-size:29px}.panel{padding:20px}.twin{grid-template-columns:1fr}.tabs button{flex:1}}
|
||||
Reference in new issue
Block a user