/* Plain, fast, server-rendered. No framework, no inline styles (the CSP forbids them). */
:root {
  --ink: #1d2126; --muted: #5d656f; --line: #dfe3e8; --bg: #f7f8fa; --card: #ffffff;
  --accent: #0f2a44; --accent-soft: #eef2f7; --warn: #b8574a; --ok: #2f7d4f; --pending: #8a6d1f;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.55 -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif; }
a { color: var(--accent); }
header.top { background: var(--accent); color: #fff; padding: 12px 20px; display: flex;
  align-items: center; gap: 18px; }
header.top a { color: #fff; text-decoration: none; opacity: .85; }
header.top a:hover, header.top a.on { opacity: 1; text-decoration: underline; }
header.top .brand { font-weight: 700; letter-spacing: .04em; margin-right: auto; }
main { max-width: 900px; margin: 0 auto; padding: 24px 20px 60px; }
h1 { font-size: 22px; margin: 0 0 6px; }
h2 { font-size: 17px; margin: 22px 0 8px; }
p.lede { color: var(--muted); margin: 0 0 18px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 8px;
  padding: 16px; margin-bottom: 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.tile { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 8px;
  padding: 14px; text-decoration: none; color: var(--ink); }
.tile:hover { border-color: var(--accent); }
.tile .genre { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
label { display: block; font-weight: 600; margin: 12px 0 4px; font-size: 13px; }
input[type=text], input[type=email], textarea, select { width: 100%; padding: 9px 10px;
  border: 1px solid var(--line); border-radius: 6px; font: inherit; background: #fff; }
textarea { min-height: 72px; }
button, .btn { background: var(--accent); color: #fff; border: 0; border-radius: 6px;
  padding: 9px 14px; font: inherit; cursor: pointer; text-decoration: none; display: inline-block; }
button.secondary, .btn.secondary { background: #fff; color: var(--accent); border: 1px solid var(--line); }
button:disabled { opacity: .5; cursor: not-allowed; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.note { background: #fff8e6; border: 1px solid #e8d9a8; border-radius: 6px; padding: 10px 12px;
  font-size: 13px; margin-bottom: 16px; }
.note.danger { background: #fdeceb; border-color: #f0c2bd; }
.pill { display: inline-block; font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.pill.ready { color: var(--ok); border-color: #bfe0cb; }
.pill.failed { color: var(--warn); border-color: #f0c2bd; }
.pill.queued, .pill.drafting { color: var(--pending); border-color: #e8d9a8; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.copyblock { position: relative; background: var(--accent-soft); border: 1px solid var(--line);
  border-radius: 6px; padding: 10px 12px; margin: 6px 0; white-space: pre-wrap; font-size: 14px; }
.copyblock button { position: absolute; top: 6px; right: 6px; padding: 3px 9px; font-size: 12px; }
.thumb { width: 92px; height: 92px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.guide-row { display: flex; gap: 14px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
details summary { cursor: pointer; font-weight: 600; }
.stack > * + * { margin-top: 10px; }
.errors { color: var(--warn); font-size: 14px; margin: 8px 0; }

/* --- admin ------------------------------------------------------------- */
.subnav { display: flex; gap: 14px; margin-bottom: 18px; font-size: 14px; }
.subnav a { color: var(--muted); text-decoration: none; padding-bottom: 3px; }
.subnav a.on { color: var(--ink); border-bottom: 2px solid var(--accent); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.cards .card { margin: 0; }
.card.danger { border-color: #f0c2bd; }
.note.ok { background: #eef7f1; border-color: #bfe0cb; }
.big { font-size: 28px; font-weight: 600; margin: 6px 0 0; }
table.wide { font-size: 13px; }
tr.bad td { background: #fdeceb; }
.pill.ok { color: var(--ok); border-color: #bfe0cb; }
.pill.bad { color: var(--warn); border-color: #f0c2bd; }

/* Utility classes rather than inline style attributes: the CSP is `style-src 'self'`,
   which blocks a style="" attribute, so anything inline would silently not apply. */
.row.spaced { margin-top: 13px; }
.tight { margin: 5px 0; }
.fill { flex: 1; }
.card.spaced { margin-top: 18px; }
