:root {
  --ink: #132638;
  --muted: #6a7b89;
  --line: #dce4e9;
  --paper: #f4f7f8;
  --navy: #153b59;
  --blue: #0b6fa4;
  --cyan: #25a6bd;
  --green: #167c62;
  --amber: #b47310;
  --red: #b23a3a;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 14px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif; }
a { color: var(--blue); text-decoration: none; }
.topbar { display: flex; align-items: end; justify-content: space-between; gap: 32px; padding: 28px 4vw 20px; color: white; background: linear-gradient(125deg, #102f49, #17627d); box-shadow: 0 4px 18px #153b5933; }
.topbar h1 { margin: 0; font-size: clamp(22px, 3vw, 36px); letter-spacing: .04em; }
.eyebrow { margin: 0 0 5px; color: #79cadd; font-size: 11px; font-weight: 800; letter-spacing: .14em; }
nav { display: flex; flex-wrap: wrap; gap: 6px; }
nav a { padding: 8px 13px; color: #dceff5; border-radius: 6px; font-weight: 700; }
nav a:hover, nav a.active { color: white; background: #ffffff1d; }
main { width: min(1500px, 94vw); margin: 26px auto 48px; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 18px; }
.metrics article { position: relative; overflow: hidden; padding: 18px 20px; background: white; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px #14344c0b; }
.metrics article::after { content: ""; position: absolute; inset: auto 0 0; height: 4px; background: var(--cyan); }
.metrics .metric-total::after { background: var(--blue); }
.metrics .metric-confirmed::after { background: #219653; }
.metrics .metric-review::after { background: #e0a100; }
.metrics .metric-duplicate::after { background: #7b61a8; }
.metrics .metric-irrelevant::after { background: #8795a1; }
.metrics span { display: block; color: var(--muted); font-size: 12px; font-weight: 700; }
.metrics strong { display: block; margin-top: 2px; font: 800 30px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; }
.data-freshness { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: -2px 0 18px; padding: 4px 2px; color: #8a98a2; background: transparent; border: 0; border-radius: 0; font-size: 12px; }
.data-freshness span { display: flex; gap: 7px; align-items: center; }
.data-freshness strong { color: #778691; font-size: 12px; }
.panel { background: white; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 28px #14344c0c; overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px 14px; }
.panel h2 { margin: 0; font-size: 20px; }
.count { color: var(--muted); font-size: 12px; }
.filters { display: grid; grid-template-columns: 170px 160px 145px minmax(220px, 1fr) auto auto; gap: 10px; padding: 14px 22px 18px; border-top: 1px solid #edf1f3; }
.filters.compact { grid-template-columns: 1fr 1fr 1fr 1fr; max-width: 560px; }
label { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .04em; }
select, input { display: block; width: 100%; margin-top: 4px; padding: 9px 10px; color: var(--ink); background: white; border: 1px solid #bdcbd3; border-radius: 5px; font: inherit; }
textarea { display: block; width: 100%; margin-top: 4px; padding: 10px; color: var(--ink); background: white; border: 1px solid #bdcbd3; border-radius: 5px; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; resize: vertical; }
button, .button { align-self: end; padding: 9px 14px; border: 1px solid var(--blue); border-radius: 5px; background: var(--blue); color: white; font-weight: 800; cursor: pointer; }
.button.secondary { border-color: #bcc9d0; background: white; color: var(--ink); text-align: center; }
.table-wrap { overflow: auto; border-top: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; min-width: 980px; }
th { position: sticky; top: 0; z-index: 1; padding: 11px 12px; color: #e9f3f7; background: var(--navy); text-align: left; font-size: 11px; letter-spacing: .04em; white-space: nowrap; }
td { padding: 11px 12px; border-bottom: 1px solid #e6ecef; vertical-align: top; }
tbody tr:nth-child(even) { background: #f8fafb; }
tbody tr:hover { background: #edf7fa; }
td.yard { font-weight: 800; white-space: nowrap; }
td small { display: block; color: var(--muted); }
.badge { display: inline-block; padding: 3px 8px; border-radius: 999px; background: #e7eef2; color: #375264; font-size: 11px; font-weight: 800; white-space: nowrap; }
.badge.progress { color: #0d6385; background: #dff2f7; }
.badge.ok { color: var(--green); background: #dcf2ea; }
.badge.review { color: #94600b; background: #fff0d1; }
.badge.irrelevant { color: #66717a; background: #edf1f3; }
.source-link { display: inline-block; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.evidence { max-width: 360px; min-width: 240px; color: #3f515f; }
.empty { padding: 44px; color: var(--muted); text-align: center; }
.mobile-list { display: none; }
.mobile-card { padding: 14px 16px; border-top: 1px solid var(--line); background: white; }
.mobile-card:nth-child(even) { background: #f8fafb; }
.mobile-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.mobile-card-head strong { display: block; font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
.mobile-card-head span:not(.badge) { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.mobile-card dl { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 8px 10px; margin: 12px 0 0; }
.mobile-card dt { color: var(--muted); font-size: 12px; font-weight: 800; }
.mobile-card dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.article-body { padding: 18px 22px 22px; font-size: 15px; line-height: 1.75; color: #1a1a1a; overflow-wrap: break-word; }
.article-body p { margin: 0 0 14px; }
.article-body img { display: none; }
.article-body section { margin-bottom: 14px; }
.article-body strong { font-weight: 700; }
.article-body a { color: var(--blue); text-decoration: underline; }
.article-body .rich_pages { display: none; }
.legend { display: flex; gap: 18px; padding: 0 22px 18px; color: var(--muted); font-size: 12px; }
.dot { display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 50%; }
.dot.good { background: var(--green); }.dot.partial { background: var(--amber); }.dot.bad { background: var(--red); }
.status-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 0 22px 24px; }
.status-card { padding: 17px; border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: 8px; }
.status-card.partial { border-left-color: var(--amber); }.status-card.bad { border-left-color: var(--red); }
.status-card h3 { margin: 0 0 10px; font-size: 17px; }
.status-card dl { display: grid; grid-template-columns: 74px 1fr; gap: 6px; margin: 14px 0 0; }
.status-card dt { color: var(--muted); }.status-card dd { margin: 0; word-break: break-word; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 0 22px 18px; }
.setting-card { padding: 17px; border: 1px solid var(--line); border-radius: 8px; background: #fbfdfe; }
.setting-card h3 { margin: 0 0 10px; font-size: 18px; }
.setting-card dl { display: grid; grid-template-columns: 74px 1fr; gap: 6px; margin: 12px 0; }
.setting-card dt { color: var(--muted); }.setting-card dd { margin: 0; word-break: break-word; }
.hint, .panel-note { margin: 0; padding: 0 22px 18px; color: var(--muted); font-size: 12px; }
.setting-card .hint { padding: 0; }
.steps { margin: 8px 0 0; padding-left: 20px; color: #3f515f; }
.stack-form { display: grid; gap: 12px; padding: 0 22px 22px; }
.stack-form button { justify-self: start; }
.space-top { margin-top: 18px; }
.notice { margin: 0 22px 16px; padding: 11px 13px; border-radius: 6px; font-weight: 700; }
.notice.ok { color: var(--green); background: #dcf2ea; }
.notice.bad { color: var(--red); background: #ffe1df; }
.checkbox-label { display: flex; align-items: center; gap: 8px; align-self: end; padding-bottom: 8px; color: var(--ink); font-size: 13px; font-weight: 700; letter-spacing: 0; }
.checkbox-label input { display: inline-block; width: auto; margin: 0; }
footer { padding: 24px; color: var(--muted); text-align: center; font-size: 12px; }
@media (max-width: 900px) {
  .topbar { align-items: flex-start; flex-direction: column; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .filters { grid-template-columns: 1fr 1fr; }
  .status-grid { grid-template-columns: 1fr 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .metrics, .status-grid, .filters { grid-template-columns: 1fr; }
  main { width: 96vw; margin-top: 12px; }
  .topbar { padding: 20px 4vw; }
  .panel-head { align-items: flex-start; flex-direction: column; gap: 6px; padding: 16px; }
  .data-freshness { gap: 6px; margin-top: -4px; }
  .data-freshness span { width: 100%; }
  .filters { padding: 12px 16px 16px; }
  button, .button { width: 100%; text-align: center; }
}
@media (max-width: 700px) {
  .table-wrap { display: none; }
  .mobile-list { display: block; border-top: 1px solid var(--line); }
  .source-link { max-width: 100%; }
}
