:root {
  --bg: #f6f7fb;
  --panel: #ffffff;
  --text: #172033;
  --muted: #687386;
  --line: #e4e8f0;
  --accent: #1d4ed8;
  --accent-dark: #173c9c;
  --warning: #92400e;
  --success: #166534;
  --danger: #991b1b;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.site-header { background: linear-gradient(135deg, #102144, #1d4ed8); color: white; padding: 56px 0; }
.site-header.slim { padding: 32px 0; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: 12px; opacity: .75; margin: 0 0 8px; }
h1 { font-size: clamp(30px, 5vw, 54px); line-height: 1.05; margin: 0; }
h2 { line-height: 1.25; }
.lead { max-width: 720px; font-size: 18px; opacity: .9; }
.button, button {
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
button:hover, .button:hover { background: var(--accent-dark); text-decoration: none; }
.button.secondary { background: #0f766e; }
.button.muted { background: #475569; }
input { border: 1px solid var(--line); border-radius: 8px; padding: 10px; max-width: 100px; }
.wide-input { width: min(360px, 100%); max-width: none; }
.content-grid { padding: 32px 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.draft-list { padding: 28px 0 48px; display: grid; gap: 14px; }
.draft-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .05);
}
.draft-card h2 { margin: 8px 0; font-size: 21px; line-height: 1.3; }
.draft-card p { margin: 0; }
.draft-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
}
.draft-note { color: var(--muted); font-size: 13px; margin-top: 10px !important; }
.card, .empty-card, .panel, .article { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 24px; box-shadow: 0 8px 24px rgba(15, 23, 42, .05); }
.card h2 { margin-top: 6px; }
.meta, .small { color: var(--muted); font-size: 13px; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.tags span { background: #eef2ff; color: #3730a3; padding: 4px 8px; border-radius: 999px; font-size: 12px; }
.article { margin-top: 28px; margin-bottom: 40px; max-width: 860px; }
.article h2 { margin-top: 30px; }
.source-box { margin-top: 40px; padding: 20px; border: 1px solid var(--line); background: #f8fafc; border-radius: 8px; }
.review-box { margin-top: 0; margin-bottom: 28px; }
.back-link { color: white; display: inline-block; margin-bottom: 16px; }
.admin-layout { display: grid; gap: 18px; padding: 28px 0 48px; }
.actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.search-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.panel-heading h2 { margin: 0; }
.pager { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.notice { background: #ecfdf5; border: 1px solid #bbf7d0; color: var(--success); padding: 14px 18px; border-radius: 8px; font-weight: 700; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { border-bottom: 1px solid var(--line); text-align: left; padding: 12px; vertical-align: top; }
th { background: #f8fafc; color: #334155; }
.badge { display: inline-block; padding: 4px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #e5e7eb; color: #374151; }
.badge.published, .badge.selected { background: #dcfce7; color: var(--success); }
.badge.draft, .badge.drafted, .badge.editable { background: #fef3c7; color: var(--warning); }
.badge.needs-source { background: #ffedd5; color: #9a3412; }
.badge.rejected, .badge.ignored, .badge.unused { background: #fee2e2; color: var(--danger); }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.row-actions button { padding: 7px 10px; border-radius: 9px; font-size: 12px; }
@media (max-width: 720px) {
  .header-inner, .actions, .panel-heading { align-items: flex-start; flex-direction: column; }
  .pager { flex-wrap: wrap; }
}
