:root {
    color-scheme: light dark;
    --bg: #f6f5f2;
    --panel: #ffffff;
    --text: #1f2328;
    --muted: #656d76;
    --border: #d8dde3;
    --accent: #6d4aff;
    --accent-text: #ffffff;
    --error-bg: #fde8e8;
    --error-text: #9b1c1c;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #14161a;
        --panel: #1d2026;
        --text: #e6e8eb;
        --muted: #9aa4b2;
        --border: #30363d;
        --accent: #8b73ff;
        --error-bg: #3a1d1d;
        --error-text: #ffb4b4;
    }
}

* {
    box-sizing: border-box;
}

body {
    margin: 0 auto;
    max-width: 760px;
    padding: 0 1rem 3rem;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a {
    color: var(--accent);
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
}

.brand-block {
    display: flex;
    flex-direction: column;
}

.brand {
    color: var(--text);
    font-size: 1.25rem;
    font-weight: 700;
    text-decoration: none;
}

.handle {
    color: var(--muted);
    font-size: 0.875rem;
}

.inline-form {
    display: inline;
}

.link-button {
    background: none;
    border: 0;
    color: var(--accent);
    cursor: pointer;
    font: inherit;
    padding: 0;
}

.hero h1,
.profile h1 {
    margin: 0 0 0.25rem;
}

.hero p,
.profile p {
    margin: 0.25rem 0;
}

.compose {
    display: grid;
    gap: 0.5rem;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    margin: 1.5rem 0;
}

.compose label {
    font-weight: 600;
}

textarea,
input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font: inherit;
}

button {
    justify-self: start;
    padding: 0.6rem 1.1rem;
    border: 0;
    border-radius: 8px;
    background: var(--accent);
    color: var(--accent-text);
    cursor: pointer;
    font: inherit;
    font-weight: 600;
}

.timeline h2 {
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
}

.post {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 0.9rem;
}

.post header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.timestamp {
    margin-left: auto;
    color: var(--muted);
    font-size: 0.8rem;
    text-decoration: none;
}

.content > :first-child {
    margin-top: 0;
}

.content > :last-child {
    margin-bottom: 0;
}

.content img {
    max-width: 100%;
    height: auto;
}

.content-warning {
    background: var(--error-bg);
    color: var(--error-text);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
}

.stats {
    display: flex;
    gap: 1.25rem;
    color: var(--muted);
}

.notice {
    border-radius: 8px;
    padding: 0.65rem 0.85rem;
}

.notice.error {
    background: var(--error-bg);
    color: var(--error-text);
}

.empty {
    color: var(--muted);
}

.narrow {
    max-width: 420px;
}

.setup {
    max-width: 560px;
}

.setup .stack {
    gap: 1rem;
}

.setup fieldset {
    display: grid;
    gap: 0.45rem;
    margin: 0;
    padding: 1rem;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.setup legend {
    padding: 0 0.35rem;
    font-weight: 700;
}

.setup label {
    margin-top: 0.25rem;
    font-weight: 600;
}

.field-help {
    margin: 0;
    color: var(--muted);
    font-size: 0.875rem;
}

code {
    font-size: 0.9em;
}

.stack {
    display: grid;
    gap: 0.6rem;
}

footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin-top: 2.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.8rem;
}
