:root {
  --navy: #091d2d;
  --brand: #193b66;
  --ink: #172f40;
  --muted: #6b7f8c;
  --line: #e3e9ed;
  --mint: #198365;
  --amber: #8a5f16;
  --amber-bg: #fff8e6;
  --amber-line: #f0e0b8;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: #f6f8fa;
  color: var(--ink);
  font: 15px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
}
a { color: var(--brand); }
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 28px;
  background: var(--navy);
  color: #fff;
}
.brand { color: #fff; font-size: 22px; font-weight: 650; text-decoration: none; letter-spacing: -.5px; }
.top nav { display: flex; gap: 20px; }
.top nav a { color: #c6d6e0; font-size: 13px; text-decoration: none; }
.top nav a:hover { color: #fff; }
main { max-width: 1240px; margin: 0 auto; padding: 34px 28px 10px; }
h1 { font-size: 30px; margin: 0 0 10px; letter-spacing: -.5px; }
.lead { font-size: 15px; color: #4a6272; margin: 0 0 22px; max-width: 900px; }
.toolbar { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs button {
  font: inherit;
  font-size: 13px;
  padding: 9px 15px;
  border: 1px solid var(--line);
  background: #fff;
  color: #4a6272;
  border-radius: 5px;
  cursor: pointer;
}
.tabs button[aria-selected="true"] { background: var(--mint); border-color: var(--mint); color: #fff; font-weight: 600; }
#search {
  flex: 1;
  min-width: 240px;
  font: inherit;
  font-size: 13px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
}
#search:focus, .card input:focus, .tabs button:focus-visible { outline: 2px solid #63bbc4; outline-offset: 1px; }
.source { font-size: 12px; color: var(--muted); line-height: 1.9; margin: 0 0 26px; max-width: 1080px; }
.source a { color: var(--mint); }
.empty { text-align: center; padding: 46px; color: var(--muted); }
.section { margin-bottom: 30px; }
.section > h2 { font-size: 16px; margin: 0 0 4px; }
.section > .sub { font-size: 12px; color: var(--muted); margin: 0 0 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 15px 17px; display: flex; flex-direction: column; gap: 11px; }
.card-top { display: flex; align-items: flex-start; gap: 11px; }
.rank { background: #eef4f7; color: #2a5568; font-size: 11px; font-weight: 650; border-radius: 4px; padding: 3px 7px; min-width: 26px; text-align: center; flex-shrink: 0; }
.card h3 { font-size: 14px; margin: 0; font-weight: 650; line-height: 1.4; }
.card h3 small { display: block; font-weight: 400; font-size: 11px; color: var(--muted); margin-top: 4px; word-break: break-word; }
.meta { display: flex; gap: 6px; flex-wrap: wrap; font-size: 10px; color: #5e7584; }
.meta span { background: #f2f6f8; border-radius: 3px; padding: 3px 7px; }
.meta .chip { display: inline-flex; align-items: center; gap: 4px; }
.meta .ok { background: #e4f2ea; color: #1d6b4e; }
.meta .warn { background: var(--amber-bg); color: var(--amber); }
.note { font-size: 11px; color: var(--amber); background: var(--amber-bg); border: 1px solid var(--amber-line); border-radius: 4px; padding: 8px 10px; margin: 0; line-height: 1.7; }
.row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.row input { flex: 1 1 140px; min-width: 0; font: inherit; font-size: 12px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 5px; }
.btn { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 9px 14px; border-radius: 5px; background: var(--brand); color: #fff; text-decoration: none; white-space: nowrap; }
.btn:hover { background: #122c4d; }
.btn.copied { background: var(--mint); }
footer { max-width: 1240px; margin: 0 auto; padding: 20px 28px 40px; font-size: 11px; color: var(--muted); border-top: 1px solid var(--line); }
[hidden] { display: none !important; }
@media (max-width: 640px) {
  main, .top, footer { padding-left: 16px; padding-right: 16px; }
  .grid { grid-template-columns: 1fr; }
  h1 { font-size: 24px; }
  #search { min-width: 0; }
}

/* Official website cards have no tracking-reference field. */
.row .btn:only-child{grid-column:1 / -1}
