:root {
    color-scheme: light;
    --ink: #181818;
    --muted: #62605c;
    --paper: #fbfaf6;
    --panel: #ffffff;
    --line: #dfddd6;
    --accent: #0f766e;
    --accent-strong: #115e59;
    --danger: #b42318;
    --shadow: 0 12px 35px rgba(24, 24, 24, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--paper);
    color: var(--ink);
}

body {
    margin: 0;
    min-width: 320px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: inherit;
}

.shell {
    width: min(760px, calc(100% - 32px));
    margin: 0 auto;
}

.topbar {
    border-bottom: 1px solid var(--line);
    background: rgba(251, 250, 246, 0.92);
    position: sticky;
    top: 0;
    z-index: 5;
    backdrop-filter: blur(12px);
}

.topbar-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    font-size: 1.35rem;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: 0;
}

.nav {
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: nowrap;
    justify-content: flex-end;
    border: 1px solid var(--line);
    background: var(--panel);
    border-radius: 8px;
    overflow: hidden;
}

.nav a,
.button {
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--ink);
    border-radius: 999px;
    padding: 10px 15px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
    box-shadow: none;
}

.nav a {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    border-left: 1px solid var(--line);
}

.nav a:first-child {
    border-left: 0;
}

.button.primary,
.nav a.primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.button.primary:hover,
.nav a.primary:hover {
    background: var(--accent-strong);
}

.button.danger {
    border-color: var(--danger);
    color: var(--danger);
}

.page {
    padding: 30px 0 56px;
    flex: 1 0 auto;
}

.intro {
    display: grid;
    gap: 8px;
    margin: 4px auto 22px;
    text-align: center;
    justify-items: center;
}

.intro h1 {
    margin: 0;
    font-size: clamp(1.55rem, 4vw, 2.4rem);
    line-height: 1.05;
    letter-spacing: 0;
    max-width: none;
}

.intro p {
    margin: 0;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.55;
    max-width: 520px;
}

.grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 22px;
    align-items: start;
}

.stack {
    display: grid;
    gap: 18px;
}

.feed-batch {
    display: grid;
    gap: 18px;
}

.feed-sentinel {
    min-height: 1px;
}

.card,
.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(24, 24, 24, 0.06);
}

.post {
    padding: 18px 18px 18px 22px;
    position: relative;
}

.post::before {
    content: "";
    position: absolute;
    top: 14px;
    bottom: 14px;
    left: 0;
    width: 4px;
    border-radius: 0 999px 999px 0;
    background: var(--accent);
}

.secret {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-size: 1.32rem;
    line-height: 1.5;
    margin: 0 0 16px;
}

.meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    color: var(--muted);
    font-size: 0.9rem;
}

.actions {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-actions {
    margin-bottom: 16px;
}

.admin-section {
    margin-top: 16px;
}

.admin-item {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
    margin-top: 14px;
    background: var(--panel);
}

.admin-item:first-of-type {
    margin-top: 0;
}

.admin-item p {
    margin: 0;
    overflow-wrap: anywhere;
    line-height: 1.45;
}

.admin-comments {
    margin-top: 14px;
    padding-left: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    border-left: 3px solid var(--line);
    display: grid;
    gap: 12px;
}

.admin-comment {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 12px;
}

.admin-comment p {
    margin: 0;
    overflow-wrap: anywhere;
    line-height: 1.45;
}

.panel {
    padding: 20px;
}

.panel h2 {
    margin: 0 0 14px;
    font-size: 1.12rem;
}

.gate {
    margin-bottom: 16px;
}

.invisible-gate {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.form {
    display: grid;
    gap: 12px;
}

.form.turnstile-solved .cf-turnstile {
    display: none;
}

.field {
    display: grid;
    gap: 6px;
}

.field span {
    color: var(--muted);
    font-weight: 700;
    font-size: 0.9rem;
}

textarea,
input[type="search"],
input[type="text"],
input[type="password"] {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    padding: 12px;
}

textarea {
    min-height: 122px;
    resize: vertical;
    line-height: 1.5;
}

.hint,
.error {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.45;
}

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

.error {
    color: var(--danger);
    font-weight: 700;
}

.comments {
    padding: 20px;
    border-top: 1px solid var(--line);
}

.comment {
    border-top: 1px solid var(--line);
    padding: 12px 0;
}

.comment:first-child {
    border-top: 0;
    padding-top: 0;
}

.comment p {
    margin: 0 0 6px;
    overflow-wrap: anywhere;
    line-height: 1.45;
}

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

.footer {
    border-top: 1px solid var(--line);
    padding: 24px 0;
    color: var(--muted);
    font-size: 0.9rem;
    flex-shrink: 0;
}

.ref {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.proof {
    display: grid;
    gap: 8px;
    border: 1px solid var(--accent);
    background: #eef8f6;
    padding: 16px;
    border-radius: 8px;
}

.proof strong {
    font-size: 1.05rem;
}

.proof code {
    display: block;
    overflow-wrap: anywhere;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 1.1rem;
}

@media (max-width: 780px) {
    .shell {
        width: min(100% - 20px, 760px);
    }

    .topbar-inner {
        align-items: flex-start;
        flex-direction: column;
        padding: 10px 0;
        gap: 10px;
    }

    .nav {
        width: 100%;
        justify-content: flex-start;
    }

    .nav a {
        flex: 1 1 33.333%;
        text-align: center;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .nav a,
    .button {
        padding: 11px 10px;
    }

    .page {
        padding-top: 22px;
    }

    .intro {
        margin-bottom: 24px;
    }

    .secret {
        font-size: 1.2rem;
    }
}
