/* Light theme throughout — deliberately not following the OS dark preference,
   so the tool looks the same on every machine in the team. */
:root {
  --bg: #f7f8fa; --panel: #ffffff; --panel2: #f1f3f6; --line: #e0e4ea;
  --text: #1a1d23; --muted: #6b7280; --accent: #2563eb; --good: #16a34a;
  --bad: #dc2626; --radius: 10px;
  color-scheme: light;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 24px; margin: 24px 0 16px; }
h2 { font-size: 16px; margin: 28px 0 12px; letter-spacing: .01em; }
code { background: var(--panel2); padding: 1px 5px; border-radius: 4px; font-size: 12px; }

/* nav */
.nav {
  display: flex; align-items: center; gap: 20px; padding: 0 24px; height: 54px;
  background: var(--panel); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.brand { font-weight: 600; color: var(--text); }
.nav-links { display: flex; gap: 4px; flex: 1; }
.nav-links a {
  color: var(--muted); padding: 6px 12px; border-radius: 7px; font-size: 14px;
}
.nav-links a:hover { background: var(--panel2); text-decoration: none; }
.nav-links a.on { background: var(--panel2); color: var(--text); }
.nav-right { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); }
.dot.bad { background: var(--bad); }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px 64px; }

/* layout helpers */
.row { display: flex; align-items: center; gap: 12px; }
.between { justify-content: space-between; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.grow { flex: 1; } .grow2 { flex: 2; }
@media (max-width: 860px) { .cols { grid-template-columns: 1fr; } }

/* cards + forms */
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; margin: 16px 0; display: flex; flex-direction: column; gap: 14px;
}
.card h2 { margin: 0; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--text); }
input, select, textarea {
  background: var(--bg); color: var(--text); border: 1px solid var(--line);
  border-radius: 7px; padding: 9px 11px; font: inherit; font-size: 14px; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
input[type=checkbox] { width: auto; }
textarea { resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
button, .btn {
  background: var(--panel2); color: var(--text); border: 1px solid var(--line);
  border-radius: 7px; padding: 9px 14px; font: inherit; font-size: 14px;
  cursor: pointer; display: inline-block; white-space: nowrap;
}
button:hover, .btn:hover { border-color: var(--accent); text-decoration: none; }
.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 500; align-self: flex-start; }
.btn.small { padding: 5px 10px; font-size: 12.5px; }
.btn.danger:hover { border-color: var(--bad); color: var(--bad); }
button.link { background: none; border: none; color: var(--muted); padding: 0; }
button.link:hover { color: var(--text); }
.filters { flex-direction: row; flex-wrap: wrap; align-items: flex-end; }
.row-form { flex-direction: row; flex-wrap: wrap; align-items: flex-end; }
form.card .primary { align-self: flex-start; }
.actions { display: flex; gap: 6px; }
.actions form { display: inline; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; display: flex; flex-direction: column; gap: 2px;
}
.stat-n { font-size: 26px; font-weight: 600; letter-spacing: -.02em; }
.stat-l { font-size: 12px; color: var(--muted); }

/* tables */
table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 8px 0; }
th {
  text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line);
}
td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr.off { opacity: .5; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.compact td, .compact th { padding: 6px 8px; font-size: 13px; }

/* feed */
.feed { list-style: none; padding: 0; margin: 8px 0; }
.feed li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.feed.big li { padding: 16px 0; }
.headline { font-size: 16px; font-weight: 500; line-height: 1.4; }
.snippet { color: var(--muted); font-size: 13.5px; margin: 6px 0 0; }
.meta { color: var(--muted); font-size: 12.5px; margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* misc */
.tag {
  background: var(--panel2); border: 1px solid var(--line); color: var(--muted);
  font-size: 11.5px; padding: 2px 8px; border-radius: 20px; white-space: nowrap;
}
.tag.good { color: var(--good); border-color: color-mix(in srgb, var(--good) 40%, transparent); }
.tag.bad  { color: var(--bad);  border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.tag.dim  { opacity: .7; }
.muted { color: var(--muted); }
.small-text { font-size: 11.5px; word-break: break-all; }
.bad-text { color: var(--bad); }
.hint { color: var(--muted); font-size: 12.5px; line-height: 1.5; margin: 6px 0 0; }
.error { color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, transparent);
         padding: 10px 12px; border-radius: 7px; font-size: 13.5px; margin: 0; }
.ok { color: var(--good); font-size: 13.5px; margin: 0; }
.empty { color: var(--muted); padding: 32px; text-align: center;
         border: 1px dashed var(--line); border-radius: var(--radius); }
.pager { display: flex; align-items: center; gap: 16px; justify-content: center; margin: 24px 0; }

/* view tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 4px 0 8px; }
.tabs a {
  padding: 9px 16px; color: var(--muted); font-size: 14px;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.on { color: var(--accent); border-bottom-color: var(--accent); font-weight: 500; }

/* bulk action bar */
.bulkbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 14px; margin: 12px 0; position: sticky; top: 54px; z-index: 5;
}
.bulkbar .spacer { flex: 1; }
.bulkbar .divider { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.bulkbar button { padding: 6px 11px; font-size: 13px; }
.bulkbar button.small { padding: 5px 9px; font-size: 12.5px; }
button.danger { color: var(--bad); }
button.danger:hover { border-color: var(--bad); background: #fef2f2; }
.hidden-form { display: none; }

/* article rows */
.art { display: flex; gap: 12px; align-items: flex-start; }
.art-body { flex: 1; min-width: 0; }
.art-actions { display: flex; gap: 6px; flex-shrink: 0; }
.rowcheck { margin-top: 4px; width: auto; flex-shrink: 0; }
li.is-archived { opacity: .62; }
li.is-archived .headline { color: var(--muted); }

/* login */
.centered { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login { width: 340px; }
.login h1 { margin: 0; font-size: 20px; }
.login p { margin: 0; font-size: 13px; }
