
:root {
  color-scheme: light dark;
  --bg: #f6f7f9; --surface: #ffffff; --text: #16202c; --muted: #5a6573; --line: #dde2e8;
  --accent: #1f4e8c; --accent-text: #ffffff; --up: #1d7a46; --down: #b3261e; --tag: #eef2f7;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0f141a; --surface: #171e27; --text: #e7ecf2; --muted: #9aa6b4; --line: #2a3441;
    --accent: #7fb0f0; --accent-text: #0f141a; --up: #6fd09a; --down: #ff8a80; --tag: #1f2935; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.5; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; margin: 0; }
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 650; }
h2 { font-size: 1.15rem; margin: 2rem 0 1rem; }
h3 { font-size: 1.05rem; }
code { font-size: 0.85em; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.75rem; color: var(--muted); margin: 0 0 0.5rem; font-weight: 600; }
.lede { color: var(--muted); max-width: 60ch; margin: 0.75rem 0 0; }
.top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding: 2.5rem 1rem 1rem; max-width: 72rem; margin: 0 auto; }
main { max-width: 72rem; margin: 0 auto; padding: 0 1rem 3rem; }
.sites { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); }
.site { background: var(--surface); border: 1px solid var(--line); border-radius: 0.75rem; padding: 1.25rem; display: flex; flex-direction: column; gap: 0.5rem; }
.site p { margin: 0; }
.site h3 a { text-decoration: none; }
.site h3 a:hover { text-decoration: underline; }
.site-meta { display: flex; flex-wrap: wrap; gap: 0.75rem; font-size: 0.85rem; color: var(--muted); margin-top: auto !important; }
.host { font-size: 0.8rem; color: var(--muted); overflow-wrap: anywhere; }
.also { font-size: 0.9rem; }
.state::before { content: ""; display: inline-block; width: 0.55rem; height: 0.55rem; border-radius: 50%; margin-right: 0.35rem; vertical-align: 0.05em; }
.state.up::before { background: var(--up); }
.state.down::before { background: var(--down); }
.note, .empty { color: var(--muted); font-size: 0.9rem; }
.pulls { list-style: none; padding: 0; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 0.75rem; }
.pull { padding: 0.9rem 1.1rem; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.pull:first-child { border-top: 0; }
.pull > a { text-decoration: none; display: flex; flex-direction: column; min-width: 0; flex: 1 1 20rem; }
.pull-title { font-weight: 600; color: var(--text); }
.pull > a:hover .pull-title { text-decoration: underline; }
.pull-meta { font-size: 0.85rem; color: var(--muted); }
.tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: flex-start; }
.tags li { background: var(--tag); border-radius: 999px; padding: 0.15rem 0.6rem; font-size: 0.78rem; color: var(--muted); }
button { font: inherit; border-radius: 0.5rem; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-text); padding: 0.6rem 1.1rem; font-weight: 600; cursor: pointer; }
button.quiet { background: transparent; color: var(--accent); }
.team { max-width: 72rem; margin: 0 auto; padding: 0 1rem; display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; font-size: 0.92rem; color: var(--muted); }
.signin { max-width: 26rem; margin: 12vh auto 0; padding: 2rem 1.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: 0.75rem; }
.signin form { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 1.5rem; }
.signin label { font-weight: 600; font-size: 0.9rem; }
.signin input[type=password] { font: inherit; padding: 0.6rem 0.75rem; border: 1px solid var(--line); border-radius: 0.5rem; background: var(--bg); color: var(--text); }
.signin input[aria-invalid=true] { border-color: var(--down); }
.error { color: var(--down); margin: 0; font-size: 0.9rem; }
@media (max-width: 40rem) { .top { padding-top: 1.5rem; } .signin { margin-top: 1rem; } }

.bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; max-width: 72rem; margin: 0 auto; padding: 1rem; font-size: 0.9rem; }
.bar > a { font-weight: 650; text-decoration: none; color: var(--text); }
.bar-links { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }
.who { color: var(--muted); }
.prose { max-width: 48rem; margin: 0 auto; padding: 1rem 1rem 3rem; }
.prose.wide { max-width: 72rem; }
.prose p, .prose li, .prose td { max-width: 72ch; }
.button { display: inline-block; text-decoration: none; border-radius: 0.5rem; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-text); padding: 0.55rem 1rem; font-weight: 600; margin: 0 0.5rem 0.5rem 0; }
.button.quiet { background: transparent; color: var(--accent); }
code.block { display: block; padding: 0.6rem 0.75rem; background: var(--surface); border: 1px solid var(--line); border-radius: 0.5rem; overflow-wrap: anywhere; font-size: 0.9rem; }
table { border-collapse: collapse; width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 0.75rem; overflow: hidden; display: block; overflow-x: auto; }
th, td { text-align: left; vertical-align: top; padding: 0.7rem 0.9rem; border-top: 1px solid var(--line); font-size: 0.92rem; }
thead th { border-top: 0; color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }
.steps th[scope=row] { width: 30%; }
textarea, .prose input, .prose select { font: inherit; width: 100%; padding: 0.6rem 0.75rem; border: 1px solid var(--line); border-radius: 0.5rem; background: var(--surface); color: var(--text); }
#instructions { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.82rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.issued { background: var(--surface); border: 1px solid var(--accent); border-radius: 0.75rem; padding: 0.25rem 1rem; margin: 1rem 0; }
.actions form { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.actions button { padding: 0.3rem 0.7rem; font-size: 0.85rem; }
button.danger { border-color: var(--down); color: var(--down); }
.invite, .compose { display: grid; gap: 0.5rem; max-width: 36rem; }
.invite label, .compose label { font-weight: 600; font-size: 0.9rem; margin-top: 0.35rem; }
.invite button, .compose button { justify-self: start; margin-top: 0.5rem; }
.compose .row { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.search { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 1.5rem 0; }
.search input { flex: 1 1 16rem; width: auto; }
.search select { flex: 0 1 12rem; width: auto; }
.threads, .comments { list-style: none; padding: 0; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 0.75rem; }
.threads li, .comments li { padding: 0.9rem 1.1rem; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 0.2rem; max-width: none; }
.threads li:first-child, .comments li:first-child { border-top: 0; }
.thread-title { font-weight: 600; text-decoration: none; }
.thread-title:hover { text-decoration: underline; }
.tag { background: var(--tag); border-radius: 999px; padding: 0.1rem 0.55rem; font-size: 0.78rem; color: var(--muted); }
.comment .body p, .comment .body ul, .comment .body blockquote { margin: 0.4rem 0; }
.comments { margin: 1.25rem 0; }
blockquote, .quoted { border-left: 3px solid var(--line); margin: 0.75rem 0; padding: 0.1rem 0.9rem; color: var(--muted); }
.resolved-note { border: 1px solid var(--line); border-radius: 0.75rem; padding: 0.25rem 1rem; background: var(--surface); }
