:root {
    --bg: #fbfbf8;
    --ink: #0f1720;
    --muted: #5b6470;
    --line: rgba(15, 23, 32, 0.12);
    --teal: #2dd4bf;
    --teal-dark: #0f766e;
    --teal-soft: #ccfbf1;
    --warn: #b91c1c;
    --warn-soft: #fee2e2;
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--ink);
    background: var(--bg);
}

* { box-sizing: border-box; }
body { margin: 0; line-height: 1.55; }
a { color: var(--teal-dark); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.88em; }

.topbar {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 0.9rem 1.5rem; background: var(--ink); color: #fff;
}
.topbar a { color: #fff; text-decoration: none; }
.topbar nav { display: flex; gap: 1.25rem; font-size: 0.95rem; }
.brand { display: flex; align-items: center; gap: 0.6rem; font-weight: 600; }
.cells { display: grid; grid-template-columns: repeat(2, 8px); gap: 3px; }
.cells i { width: 8px; height: 8px; background: var(--teal); }
.cells i:nth-child(2), .cells i:nth-child(3) { background: var(--teal-dark); }

.live { background: var(--teal-soft); color: var(--ink); padding: 0.7rem 1.5rem; border-bottom: 1px solid var(--teal); }

main { max-width: 1080px; margin: 0 auto; padding: 2rem 1.5rem 5rem; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.15; margin: 0.2rem 0 0.8rem; }
h2 { font-size: 1.2rem; margin: 2rem 0 0.8rem; }
.hero .num { color: var(--teal-dark); }
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.78rem; color: var(--muted); margin: 0; }
.lead { color: var(--muted); max-width: 46rem; }
.muted { color: var(--muted); }

.pill { display: inline-block; margin-left: 0.4rem; padding: 0.1rem 0.6rem; border-radius: 999px; font-size: 0.85rem; text-decoration: none; }
.pill-ok { background: var(--teal-soft); color: var(--teal-dark); }
.pill-warn { background: var(--warn-soft); color: var(--warn); }

.grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 2.5rem; }
@media (max-width: 760px) { .grid { grid-template-columns: 1fr; } }

.entry-form { display: grid; gap: 0.8rem; }
.entry-form label { display: grid; gap: 0.3rem; font-weight: 600; font-size: 0.92rem; }
.entry-form input, .entry-form textarea {
    font: inherit; padding: 0.55rem 0.7rem; border: 1px solid var(--line); border-radius: 4px; background: #fff;
}
.entry-form button {
    justify-self: start; font: inherit; font-weight: 600; padding: 0.55rem 1.2rem; border: 0; border-radius: 4px;
    background: var(--ink); color: #fff; cursor: pointer;
}
.entry-form button:hover { background: var(--teal-dark); }

.entries { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.9rem; }
.entries li { padding: 0.8rem 1rem; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.entries p { margin: 0.2rem 0; overflow-wrap: anywhere; }
.entries .meta { font-size: 0.85rem; color: var(--muted); }
.tag { display: inline-block; font-size: 0.8rem; padding: 0.05rem 0.5rem; border-radius: 3px; }
.tag-ok { background: var(--teal-soft); color: var(--teal-dark); }
.tag-wait { background: #f1f5f4; color: var(--muted); }

.flash { padding: 0.7rem 1rem; border-radius: 4px; }
.flash-success { background: var(--teal-soft); }
.flash-error { background: var(--warn-soft); color: var(--warn); }

.checks { width: 100%; border-collapse: collapse; font-size: 0.92rem; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.checks th, .checks td { padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.checks th { white-space: nowrap; font-weight: 600; }
.checks small { color: var(--muted); }
.checks .state { width: 2rem; text-align: center; font-weight: 700; }
.checks .is-ok .state { color: var(--teal-dark); }
.checks .is-warn .state { color: var(--warn); }
.checks .is-warn { background: #fffafa; }
.checks .is-info .state { color: var(--muted); }

.badge {
    position: fixed; right: 12px; bottom: 12px; z-index: 10;
    font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
    background: var(--ink); color: var(--teal-soft); padding: 6px 10px; border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
