:root {
  --bg: #f6f5f2;
  --surface: #ffffff;
  --text: #16161a;
  --muted: #6b6b76;
  --line: #e4e2dc;
  --accent: #ff4f1f;
  --accent-ink: #ffffff;
  --ok: #1f8a4c;
  --warn: #b7791f;
  --err: #c53030;
  --radius: 12px;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #111114; --surface: #1a1a1f; --text: #f0efe9; --muted: #9a9aa5; --line: #2c2c33; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.5; }
a { color: inherit; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

header.site { border-bottom: 1px solid var(--line); background: var(--surface); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.brand { font-weight: 800; letter-spacing: -0.02em; text-decoration: none; font-size: 1.15rem; }
.brand span { color: var(--accent); }
nav a { text-decoration: none; color: var(--muted); margin-left: 18px; font-size: 0.95rem; }
nav a:hover { color: var(--text); }

main { padding: 32px 0 64px; }
h1 { font-size: 2rem; letter-spacing: -0.03em; margin: 0 0 12px; }
h2 { font-size: 1.25rem; margin: 32px 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.stat b { display: block; font-size: 1.8rem; letter-spacing: -0.03em; }

.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 999px;
  padding: 10px 18px; font-weight: 600; text-decoration: none; cursor: pointer; font-size: 0.95rem; }
.btn.secondary { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.small { padding: 6px 12px; font-size: 0.85rem; }
.btn[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }

table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; }
.table-scroll { overflow-x: auto; }

.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; border: 1px solid var(--line); }
.badge.published { color: var(--ok); border-color: var(--ok); }
.badge.failed { color: var(--err); border-color: var(--err); }
.badge.processing, .badge.publishing { color: var(--warn); border-color: var(--warn); }

form.stack label { display: block; font-weight: 600; margin: 14px 0 6px; font-size: 0.92rem; }
input[type=text], input[type=password], input[type=number], input[type=datetime-local], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg);
  color: var(--text); font: inherit; }
textarea { min-height: 90px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 400 !important; margin: 6px 0 !important; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline-form input[type=number] { width: 72px; }
.inline-form select { width: auto; }

.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; border: 1px solid var(--line); background: var(--surface); }
.flash.success { border-color: var(--ok); }
.flash.error { border-color: var(--err); }

.hero { padding: 48px 0 24px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); max-width: 760px; }
.hero p { font-size: 1.15rem; max-width: 640px; color: var(--muted); }
.prose { max-width: 760px; }
.prose h2 { margin-top: 28px; }
.tt-block { border-left: 3px solid var(--accent); padding-left: 14px; margin-top: 12px; }
footer.site { border-top: 1px solid var(--line); padding: 24px 0; color: var(--muted); font-size: 0.85rem; }
footer.site a { margin-right: 16px; }
