:root {
  --panel: #f7f7f7;
  --line: #cfcfcf;
  --ink: #0f1115;
  --muted: #5a5f66;
  --head: #d8d8d8;
  --ok: #106b3d;
  --warn: #9a5b00;
  --err: #9f1b1b;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: linear-gradient(180deg, #f0f0f0 0%, #e7e7e7 100%);
  color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.wrap { max-width: 1600px; margin: 0 auto; padding: 20px 28px; }
.title { margin: 0 0 10px; font-size: 32px; font-weight: 800; }
.nav { margin-bottom: 12px; }
.nav a { color: #0d4f9e; text-decoration: none; font-weight: 700; }
.sub { color: var(--muted); margin-bottom: 16px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.card {
  display: block; text-decoration: none; color: inherit; background: var(--panel);
  border: 1px solid #d8d8d8; border-radius: 12px; box-shadow: 0 2px 0 rgba(0,0,0,0.04); padding: 16px;
}
.card:hover { background: #f2f2f2; }
.icon { font-size: 28px; margin-bottom: 8px; }
.name { font-size: 20px; font-weight: 800; }
.desc { margin-top: 6px; color: var(--muted); font-size: 13px; }
.status { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; align-items: center; }
.chip {
  background: #fff; border: 1px solid #d4d4d4; border-radius: 999px;
  padding: 8px 12px; font-size: 13px; color: var(--muted); box-shadow: 0 1px 0 rgba(0,0,0,0.04);
}
.state-fresh { color: var(--ok); font-weight: 700; }
.state-stale, .state-updating { color: var(--warn); font-weight: 700; }
.state-error { color: var(--err); font-weight: 700; }
.banner {
  display: none; margin-bottom: 12px; padding: 10px 12px; border-radius: 8px;
  border: 1px solid #e9be72; background: #fff4df; color: #7a4a00; font-weight: 600;
}
.banner.show { display: block; }
.section {
  background: var(--panel); border: 1px solid #d8d8d8; border-radius: 12px;
  overflow: hidden; margin-bottom: 18px; box-shadow: 0 2px 0 rgba(0,0,0,0.04);
}
.section h2 {
  margin: 0; padding: 14px 16px; background: #e3e3e3;
  border-bottom: 3px solid #161616; font-size: 20px; letter-spacing: .2px;
}
table { width: 100%; border-collapse: collapse; background: #f4f4f4; table-layout: fixed; }
thead th {
  position: sticky; top: 0; background: var(--head); z-index: 1; border-bottom: 2px solid #111;
  font-size: 13px; text-transform: uppercase; letter-spacing: .4px; color: #111; padding: 10px 8px;
  text-align: right; white-space: normal; word-break: break-word; line-height: 1.15; cursor: pointer;
}
thead th:first-child { text-align: left; }
tbody td {
  border-bottom: 1px solid var(--line); padding: 6px 8px; text-align: right; font-variant-numeric: tabular-nums;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
tbody tr:nth-child(even) td { background: #efefef; }
.active-flag { margin-left: 8px; color: #0f7b30; font-weight: 800; font-size: 11px; letter-spacing: .4px; }
.done-flag { margin-left: 8px; color: #b10f0f; font-weight: 800; font-size: 11px; letter-spacing: .4px; }
.cell-link { margin-left: 8px; font-size: 11px; font-weight: 700; color: #0d4f9e; text-decoration: none; }
.cell-link:hover { text-decoration: underline; }
.flag-wrap { position: relative; display: inline-block; margin-left: 4px; font-size: 11px; vertical-align: super; }
.flag-tip {
  display: none; position: absolute; left: calc(100% + 8px); top: 50%; transform: translateY(-50%);
  background: #1f2329; color: #fff; font-size: 11px; line-height: 1.2; white-space: nowrap;
  border-radius: 6px; padding: 5px 7px; z-index: 2000; box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.flag-wrap:hover .flag-tip { display: block; }
.sort-arrow { margin-left: 6px; font-size: 11px; color: #4f555c; }
.footer { color: var(--muted); font-size: 12px; margin-top: 8px; }
@media (max-width: 900px) {
  .title { font-size: 26px; }
  .wrap { padding: 12px; }
  .section h2 { font-size: 17px; }
  thead th, tbody td { font-size: 12px; }
}
