:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #162033;
  background: #f5f7fb;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
[hidden] { display: none !important; }

.login-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(420px, 100%); display: grid; gap: 16px; padding: 28px; border: 1px solid #dce3ed; border-radius: 8px; background: #fff; box-shadow: 0 20px 60px rgba(22, 32, 51, 0.08); }
.login-card h1 { margin: 0; font-size: 24px; }
.eyebrow { margin: 0 0 4px; color: #667286; font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.muted { color: #667286; }
.status { min-height: 20px; margin: 0 0 12px; color: #667286; font-size: 13px; }

label { display: grid; gap: 6px; color: #667286; font-size: 13px; font-weight: 700; }
input, textarea, select, button { border: 1px solid #cbd5e1; border-radius: 6px; padding: 9px 11px; color: #162033; background: #fff; font: inherit; }
textarea { resize: vertical; }
button { cursor: pointer; border-color: #162033; color: #fff; background: #162033; font-weight: 800; }
button:disabled { cursor: not-allowed; opacity: 0.5; }
.secondary { color: #162033; border-color: #cbd5e1; background: #fff; }
.danger { border-color: #9f1d1d; background: #9f1d1d; }

.app-shell { max-width: 880px; margin: 0 auto; padding: 20px 18px 60px; }
.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 6px; }
.topbar h1 { margin: 2px 0 0; font-size: 20px; }
.topbar-actions { display: flex; gap: 8px; }
.back-link { display: inline-block; margin-bottom: 4px; color: #34527b; font-size: 13px; font-weight: 700; text-decoration: none; }
.back-link:hover { text-decoration: underline; }

.queue-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 0; padding: 12px 14px; border: 1px solid #dce3ed; border-radius: 8px; background: #fff; font-size: 13px; }
.queue-controls-text strong { font-size: 15px; }

.queue-group { margin-bottom: 18px; }
.queue-group-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.queue-group-head h2 { margin: 0; font-size: 15px; }
.pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 2px 9px; color: #344256; background: #edf2f8; font-size: 12px; font-weight: 800; }

.queue-list { display: grid; gap: 6px; }
.queue-row { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid #dce3ed; border-radius: 8px; background: #fff; text-decoration: none; color: inherit; }
.queue-row:hover { border-color: #34527b; }
.queue-row strong { font-size: 14px; }
.queue-row span { color: #667286; font-size: 12px; }
.queue-row-error { border-color: #f0c4c4; background: #fdf4f4; }
.queue-row-error span { color: #9f1d1d; }

/* Review page — compact, small font, meant to fit without scrolling */
.review-shell { max-width: 640px; }
.review-shell, .review-shell * { font-size: 13px; }
.review-shell h1 { font-size: 17px; }
.preview { display: grid; gap: 8px; padding: 14px; margin-bottom: 12px; border: 1px solid #dce3ed; border-radius: 8px; background: #fff; }
.preview-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.preview-head h2 { margin: 0; font-size: 16px; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 2px 8px; color: #344256; background: #edf2f8; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.preview-url { color: #34527b; font-size: 12px; text-decoration: none; }
.preview-url:hover { text-decoration: underline; }
.preview-summary { margin: 4px 0 0; line-height: 1.5; }
.error { margin: 0; color: #9f1d1d; font-weight: 700; }
.chip-row { display: flex; flex-wrap: wrap; gap: 5px; }
.chip-row span { padding: 2px 8px; border: 1px solid #dce3ed; border-radius: 999px; font-size: 11px; color: #4d5b70; }
.fact-table { width: 100%; margin-top: 4px; border-collapse: collapse; }
.fact-table th, .fact-table td { padding: 5px 8px; border-bottom: 1px solid #e5eaf1; text-align: left; vertical-align: top; }
.fact-table th { color: #667286; font-weight: 700; white-space: nowrap; }

.notes-label { margin-bottom: 10px; }
.notes-label textarea { width: 100%; min-height: 60px; font-size: 13px; }

.review-buttons { display: flex; gap: 8px; }
.review-buttons button { flex: 1; }

@media (max-width: 640px) {
  .queue-controls { flex-direction: column; align-items: stretch; }
}
