* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background: #0f1115;
  color: #e6e6e6;
}
a { color: #6ea8fe; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 24px 20px 60px; }
h1 { font-size: 20px; margin: 0 0 4px; }
.sub { color: #8a90a2; font-size: 13px; margin-bottom: 20px; }
.tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.tab { padding: 8px 16px; border-radius: 8px; cursor: pointer; background: #1a1e27; color: #b9c0d0; border: 1px solid #262b38; }
.tab.active { background: #2b3346; color: #fff; border-color: #3d5afe; }
.card { background: #161a22; border: 1px solid #232838; border-radius: 12px; padding: 18px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
input, button {
  font-size: 14px; border-radius: 8px; border: 1px solid #2a3040;
  background: #0d1017; color: #e6e6e6; padding: 10px 12px;
}
input { flex: 1; min-width: 260px; }
/* checkbox 继承上面这条会被拉伸成 min-width:260px，导致后面的文字标签隔老远——checkbox本来
   就该是内容大小，跟文本框分开处理。 */
input[type="checkbox"] { flex: none; width: auto; min-width: 0; }
button { background: #3d5afe; border-color: #3d5afe; color: #fff; cursor: pointer; font-weight: 600; }
button:disabled { opacity: .5; cursor: default; }
.hint { color: #7d8496; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.chip { font-size: 12px; padding: 4px 9px; background: #1e2431; border: 1px solid #2c3446; border-radius: 20px; cursor: pointer; color: #9fb0cc; }
.msg { margin-top: 12px; font-size: 13px; }
.ok { color: #4ade80; }
.err { color: #f87171; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: #8a90a2; }
table { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 13px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #222836; white-space: nowrap; }
th { color: #8a90a2; font-weight: 600; position: sticky; top: 0; background: #161a22; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
.tablewrap { overflow-x: auto; }
.asset-table { table-layout: fixed; }
.asset-table .arow-main td { overflow: hidden; text-overflow: ellipsis; }
.tag { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 10px; background: #23314a; color: #9fc0ff; }

.card-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 20px; }
.card-head .icon {
  width: 36px; height: 36px; border-radius: 10px; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; background: #1e2431;
}
.card-head h2 { margin: 0; font-size: 15px; }
.card-head p { margin: 4px 0 0; font-size: 12px; color: #7d8496; line-height: 1.5; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field + .field { margin-top: 14px; }
.field label { font-size: 12px; color: #9aa2b4; }
textarea {
  font-size: 13px; border-radius: 8px; border: 1px solid #2a3040;
  background: #0d1017; color: #e6e6e6; padding: 10px 12px; transition: border-color .15s;
}
textarea.drag-over { border-color: #3d5afe; background: #10162a; }

.arow-main td { border-top: 1px solid #2a3040; padding-top: 14px; background: #161a22; }
.arow-sub td { border-bottom: none; white-space: normal; background: #12151d; padding: 10px 10px 14px; }
.k { font-size: 10.5px; color: #5c6577; text-transform: uppercase; letter-spacing: .04em; }
.kv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px 22px; }
.kv-grid .kv { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.kv-grid .v { font-size: 13px; color: #d5d9e3; overflow-wrap: anywhere; }
.desc-line {
  display: block; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; max-width: 100%;
}

/* Go 版：tab 改成链接，退出按钮放右上角 */
a.tab { text-decoration: none; }
.topbar { display: flex; justify-content: space-between; align-items: flex-start; }
.topbar form { margin: 0; }
.topbar button { background: transparent; border-color: #2a3040; color: #9aa2b4; font-weight: 400; padding: 6px 12px; }
.login { max-width: 380px; margin: 12vh auto 0; }
.login input { width: 100%; min-width: 0; }
.login button { width: 100%; margin-top: 18px; }

/* CT 页 / 设置页 */
select {
  font-size: 14px; border-radius: 8px; border: 1px solid #2a3040;
  background: #0d1017; color: #e6e6e6; padding: 9px 10px;
}
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: #161a22; border: 1px solid #232838; border-radius: 12px; padding: 14px 16px; }
.stat-v { font-size: 22px; font-weight: 600; margin-top: 6px; font-variant-numeric: tabular-nums; }
.cols { display: grid; grid-template-columns: 1fr 2fr; gap: 16px; }
@media (max-width: 800px) { .cols { grid-template-columns: 1fr; } }
table.compact { margin-top: 0; }
td.clip { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.settings fieldset { border: 1px solid #232838; border-radius: 10px; padding: 14px 16px 16px; margin: 0 0 16px; }
.settings legend { color: #9aa2b4; font-size: 13px; padding: 0 6px; }
.settings input:not([type="checkbox"]) { min-width: 0; width: 100%; }
.settings .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px 16px; margin-top: 14px; }
.settings .grid .field + .field { margin-top: 0; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; }
.checks label { display: flex; align-items: center; gap: 6px; color: #d5d9e3; font-size: 14px; }
.stats-at { font-size: 12px; margin-bottom: 8px; }

/* 通用按钮和提示 */
a.brand { color: inherit; text-decoration: none; }
.sub a { color: #8a90a2; }
.btn, .btn-ghost, .btn-danger { display: inline-block; text-decoration: none; font-size: 14px; border-radius: 8px; padding: 9px 14px; cursor: pointer; }
.btn { background: #3d5afe; color: #fff; border: 1px solid #3d5afe; font-weight: 600; }
button.btn-ghost, a.btn-ghost { background: transparent; border: 1px solid #2f3647; color: #c6cbd8; font-weight: 400; }
button.btn-ghost:hover, a.btn-ghost:hover { border-color: #3d5afe; color: #fff; }
button.btn-danger { background: transparent; border: 1px solid #5a2a2f; color: #f87171; font-weight: 400; }
button.small, .small { padding: 4px 10px; font-size: 12px; }
input.short { min-width: 0; width: 140px; flex: none; }
.flash { background: #13233b; border: 1px solid #2b4a7a; color: #cfe0ff; padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; font-size: 14px; }
.badge { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 10px; background: #23283a; color: #9aa2b4; white-space: nowrap; }
.badge.ok { background: #12301f; color: #4ade80; }
.badge.bad { background: #3a1a1e; color: #f87171; }
.inline { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #c6cbd8; }
.inline-form { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.push-right { margin-left: auto; }
.narrow { max-width: 460px; }
.empty { text-align: center; padding: 40px 20px; }
.empty h2 { font-size: 17px; }
.subnav { display: flex; gap: 16px; margin-bottom: 12px; font-size: 13px; }
td.pre { white-space: pre-wrap; }
pre.json { background: #0d1017; border: 1px solid #222836; border-radius: 8px; padding: 10px; font-size: 12px; overflow-x: auto; max-height: 260px; color: #c6cbd8; margin: 8px 0; white-space: pre-wrap; word-break: break-all; }

/* 资产页 */
.layout-2 { display: grid; grid-template-columns: 220px 1fr; gap: 16px; margin-top: 16px; align-items: start; }
@media (max-width: 900px) { .layout-2 { grid-template-columns: 1fr; } }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }
.facets { padding: 14px; font-size: 13px; }
.facet + .facet { margin-top: 14px; }
.facet-row { display: flex; justify-content: space-between; padding: 3px 0; color: #c6cbd8; text-decoration: none; gap: 8px; }
.facet-row:hover { color: #fff; }
.facet-row span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bulkbar { font-size: 13px; }
table.assets td { max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
.help { display: inline-block; }
.help summary { list-style: none; }
.help-body { margin-top: 10px; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; font-size: 12px; background: #12151d; border: 1px solid #232838; border-radius: 10px; padding: 12px; }
.help-body > p { grid-column: 1 / -1; margin: 0; }
.help-group code { color: #9fc0ff; }
.probes { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; margin-top: 16px; }
.probe { padding: 14px; }
.probe-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; }
.probe-head .hint { font-size: 12px; }
.card input[type="file"] { min-width: 0; width: 100%; }
.card textarea { width: 100%; }
.card .field input { min-width: 0; }
.flash-err { background: #3b1518; border-color: #7a2b33; color: #ffd4d8; }
.msg.progress { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.spinner { width: 12px; height: 12px; border: 2px solid #2b4a7a; border-top-color: #cfe0ff; border-radius: 50%; animation: spin 1s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
a.tag { text-decoration: none; }
.probe { display: flex; flex-direction: column; font-size: 13px; min-width: 0; }
.probe-head b { font-size: 15px; }
table.facts { table-layout: fixed; margin-top: 10px; }
table.facts td { white-space: normal; padding: 6px 8px 6px 0; vertical-align: top; }
table.facts td:first-child { width: 40%; }
table.facts .v { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; color: #d5d9e3; }
.probe-err { font-size: 12px; margin-top: 8px; overflow-wrap: anywhere; }
.probe-foot { margin-top: auto; padding-top: 10px; font-size: 12px; color: #7d8496; }
.probe-foot summary { list-style: none; display: flex; justify-content: space-between; cursor: pointer; }
.probe-foot summary::-webkit-details-marker { display: none; }
.probe-raw::after { content: " ▸"; }
.probe-foot[open] .probe-raw::after { content: " ▾"; }
.probe-raw { color: #6ea8fe; }
a.pivot { text-decoration: none; }
a.pivot:hover { color: #6ea8fe; text-decoration: underline dotted; }
table.facts td .tag { margin: 0 2px 4px 0; }
.chip-groups { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.chip-group { display: grid; grid-template-columns: 6.5em 1fr; gap: 8px; align-items: baseline; }
.chip-group .k { text-transform: none; font-size: 11.5px; }
.chip-group .tag { margin: 0 2px 4px 0; }
.chip-group .tag:hover { background: #2e4266; color: #fff; }
tr.muted td { opacity: .55; }
.credit-box { font-size: 14px; white-space: nowrap; } .credit-box b { font-size: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; }
.subtabs { display: flex; gap: 4px; border-bottom: 1px solid #232838; margin: 0 0 16px; overflow-x: auto; }
.subtab { padding: 9px 16px; color: #8a90a2; text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; font-size: 14px; }
.subtab:hover { color: #e6e6e6; }
.subtab.active { color: #fff; border-bottom-color: #3d5afe; font-weight: 600; }
.subtabs.inner { margin-top: 4px; } .subtabs.inner .subtab { font-size: 13px; padding: 7px 12px; }
.narrow-wide { max-width: 760px; }
.radio-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.radio-card { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid #2a3040; border-radius: 10px; cursor: pointer; background: #0d1017; }
.radio-card:hover { border-color: #3d5afe; }
.radio-card:has(input:checked) { border-color: #3d5afe; background: #131a30; }
.settings .radio-card input { flex: none; min-width: 0; width: auto; margin-top: 3px; }
.radio-card span { display: flex; flex-direction: column; gap: 4px; }
.radio-card b { font-size: 14px; color: #e6e6e6; }
.radio-card small { font-size: 12px; color: #7d8496; line-height: 1.5; }
.country-picker input[type=search] { flex: 1; min-width: 220px; }
.country-group { margin-top: 12px; }
.country-group > .k, .country-group > summary { margin-bottom: 8px; cursor: pointer; text-transform: none; font-size: 12px; }
.country-group .checks label { min-width: 7em; }
.country-empty { margin-top: 10px; }

/* 管理员专属的页面、Tab、区块：小标签提示普通用户看不到 */
.admin-badge { display: inline-block; margin-left: 4px; padding: 0 5px; border-radius: 3px; font-size: 11px; line-height: 16px;
  font-weight: 500; vertical-align: 1px; color: #8a5a00; background: #fff3d6; border: 1px solid #f0d48a; }
.tab.active .admin-badge { color: #8a5a00; }

/* ---- 对外公开页 ---- */
.pub-header { display: flex; align-items: center; gap: 20px; margin-bottom: 18px; flex-wrap: wrap; }
.pub-brand { font-size: 20px; font-weight: 700; color: #fff; text-decoration: none; }
.pub-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.pub-nav a { padding: 7px 12px; border-radius: 8px; color: #b9c0d0; text-decoration: none; }
.pub-nav a.active, .pub-nav a:hover { background: #1e2431; color: #fff; }
.pub-header .push-right { margin-left: auto; }
.crumbs { display: flex; gap: 8px; flex-wrap: wrap; font-size: 13px; color: #7d8496; margin-bottom: 14px; }
.crumbs a { color: #8fa4c8; text-decoration: none; }
main > section, main > .card, main > .grid-2, main > .grid-3, main > .stats { margin-bottom: 16px; }
main .grid-2 > .card, main .grid-3 > .card { margin-bottom: 16px; }
main h1 { font-size: 24px; margin: 6px 0 6px; }
main h2 { font-size: 15px; margin: 0 0 10px; }
main .card-head { justify-content: space-between; align-items: center; margin-bottom: 12px; }
.pub-hero { padding: 18px 0 6px; }
.pub-hero form { max-width: 620px; margin-top: 14px; }
a.chip { text-decoration: none; }
.chip b { color: #e6e6e6; font-weight: 600; margin-left: 4px; }
table.dist { width: 100%; }
td.num { text-align: right; font-variant-numeric: tabular-nums; color: #c6cbd8; }
.summary { margin: 0; padding-left: 20px; line-height: 1.9; }
dl.kv-grid { grid-template-columns: 140px 1fr; margin: 0; }
dl.kv-grid dt { color: #7d8496; font-size: 13px; }
dl.kv-grid dd { margin: 0; overflow-wrap: anywhere; }
.tech-group { margin-bottom: 10px; }
.tech-group .chips { margin-top: 4px; }
.history-item { padding: 8px 0; border-bottom: 1px solid #232838; }
.history-item ul { margin: 4px 0 0; padding-left: 20px; }
.cta { border-color: #2d3a66; }
.cta-line { margin-top: 12px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.pager { gap: 16px; margin-bottom: 16px; }
main pre { background: #0d1017; border: 1px solid #222836; border-radius: 8px; padding: 10px; overflow-x: auto; }
.pub-empty { text-align: center; padding: 40px 18px; }
.pub-footer { margin-top: 40px; padding-top: 18px; border-top: 1px solid #232838; color: #7d8496; font-size: 13px; }
.pub-footer nav { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
@media (max-width: 720px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  dl.kv-grid { grid-template-columns: 1fr; }
}
.directory { columns: 3 220px; margin: 0; padding-left: 18px; line-height: 1.9; }
.pages .chip.active { background: #3d5afe; color: #fff; }

/* 爬虫说明等长文页 */
.prose h2 { margin: 1.4em 0 .5em; font-size: 1.1rem; }
.prose ul { padding-left: 1.3em; line-height: 1.8; }
.prose pre { white-space: pre-wrap; word-break: break-all; }
