/* RemiWatch: plain, light, readable. */

:root {
  color-scheme: light;
  --bg:      #ffffff;
  --text:    #1f2328;
  --muted:   #656d76;
  --line:    #d8dee4;
  --line-2:  #eaeef2;
  --hover:   #f6f8fa;
  --link:    #0b57d0;

  --ok:      #2f7d46;
  --stale:   #b7791f;
  --error:   #c0392b;
  --none:    #e4e7eb;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.muted { color: var(--muted); }

header.top {
  display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap;
  padding: 12px 24px; border-bottom: 1px solid var(--line);
}
header.top .name { font-weight: 600; color: var(--text); }
header.top nav { margin-left: auto; display: flex; gap: 16px; }

main { padding: 20px 24px 48px; max-width: 1400px; }
h1 { font-size: 20px; font-weight: 600; margin: 0 0 4px; }
h2 { font-size: 16px; font-weight: 600; margin: 24px 0 8px; }
.summary { margin: 0 0 16px; color: var(--muted); }
.summary b { color: var(--text); font-weight: 600; }
.crumbs { color: var(--muted); margin-bottom: 8px; }

/* status text */
.s-ok    { color: var(--ok); }
.s-stale { color: var(--stale); }
.s-error { color: var(--error); }
.s-dead  { color: var(--muted); }

/* status tape: one tick per repo, grouped by EL release */
.tape { display: block; width: 100%; height: 12px; }
.tape .t-ok    { fill: var(--ok); }
.tape .t-stale { fill: var(--stale); }
.tape .t-error { fill: var(--error); }
.tape .t-none  { fill: var(--none); }
.tape--dead { opacity: .3; }
.tape-scale { display: flex; gap: 8px; font-weight: normal; color: var(--muted); font-size: 12px; }
.tape-scale span { white-space: nowrap; overflow: hidden; }

.legend { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 13px; margin: 0 0 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; margin-right: 5px; vertical-align: -1px; }

/* tables */
.table-wrap { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; }
table.list th {
  text-align: left; font-weight: 600; padding: 8px 10px;
  border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--bg);
}
table.list th[data-sort] { cursor: pointer; user-select: none; }
table.list th[aria-sort="ascending"]::after  { content: " ▲"; font-size: 10px; color: var(--muted); }
table.list th[aria-sort="descending"]::after { content: " ▼"; font-size: 10px; color: var(--muted); }
table.list td { padding: 7px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.list tbody tr:hover td { background: var(--hover); }
table.list .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.list td.tape-cell { width: 45%; min-width: 240px; }
table.list .err { color: var(--muted); font-size: 12.5px; max-width: 40ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.list .sub { display: block; color: var(--muted); font-size: 12px; }
table.list tr.is-dead td, table.list tr.is-dead a { color: var(--muted); }

/* mirror matrix */
table.matrix { border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
table.matrix th, table.matrix td { border: 1px solid var(--line-2); padding: 4px 8px; text-align: center; white-space: nowrap; }
table.matrix th { font-weight: 600; background: var(--hover); }
table.matrix th.row { text-align: left; }
table.matrix td a { display: block; text-decoration: none; }
table.matrix td a:hover { text-decoration: underline; }
table.matrix .c-ok    { color: var(--ok); }
table.matrix .c-stale { color: var(--stale); }
table.matrix .c-error { color: var(--error); }
table.matrix .c-none  { color: var(--muted); }

.empty { padding: 32px 0; color: var(--muted); }

@media (max-width: 760px) {
  header.top, main { padding-left: 16px; padding-right: 16px; }
  .hide-sm { display: none; }
  table.list td.tape-cell { min-width: 110px; width: 40%; }
  table.list td, table.list th { padding-left: 6px; padding-right: 6px; }
  table.list .sub { display: none; }
  table.list a { overflow-wrap: anywhere; }
}

/* Nearest-mirror suggestion */
.nearest {
  margin: 0 0 20px; padding: 12px 14px; max-width: 760px;
  border: 1px solid var(--line); border-left: 3px solid var(--ok); background: var(--hover);
}
.nearest p { margin: 0; }
.nearest-head { font-size: 13px; }
.nearest-best { font-size: 16px; font-weight: 600; margin: 2px 0 6px !important; }
.nearest-best .muted { font-weight: 400; font-size: 14px; }
.nearest-url { display: block; overflow-x: auto; white-space: nowrap; padding: 4px 0; user-select: all; }
.nearest-alt { font-size: 13px; margin-top: 4px !important; }
.nearest-note { font-size: 12px; margin-top: 4px !important; }
table.list tr.is-nearest td:first-child { box-shadow: inset 3px 0 0 var(--ok); font-weight: 600; }
footer.foot { padding: 0 24px 24px; font-size: 12px; }

/* "Update right now" one-liner */
.now { margin: 0 0 24px; max-width: 980px; }
.now h2 { margin: 0 0 4px; }
.now p { margin: 0 0 8px; }
.now .small { font-size: 12.5px; }
.cmd { display: flex; align-items: stretch; border: 1px solid var(--line); background: var(--hover); margin: 0 0 6px; }
.cmd code { flex: 1; padding: 8px 10px; overflow-x: auto; white-space: nowrap; user-select: all; }
.cmd .copy {
  border: 0; border-left: 1px solid var(--line); background: var(--bg); color: var(--link);
  padding: 0 14px; font: inherit; cursor: pointer;
}
.cmd .copy:hover { background: var(--hover); }
