:root {
  --red: #da242a;
  --red-dark: #b81c22;
  --ink: #1f2733;
  --muted: #6b7787;
  --line: #e5e9ef;
  --bg: #f5f6f8;
  --white: #fff;
  --soft: #fff2f2;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 14px; line-height: 1.65;
}
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 18px; }

.site-header { background: var(--red); color: #fff; }
.header-inner { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.brand { font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.badge { font-size: 11px; font-weight: 400; background: rgba(255,255,255,.18); border-radius: 10px; padding: 2px 9px; margin-left: 8px; vertical-align: middle; }
.header-note { font-size: 12px; opacity: .85; }
.site-footer { border-top: 1px solid var(--line); background: var(--white); padding: 22px 0 28px; margin-top: 30px; }
.site-footer p { margin: 0 0 5px; font-size: 12px; color: var(--muted); }

.hero { background: linear-gradient(180deg, #fff2f2, var(--bg)); padding: 42px 0 28px; border-bottom: 1px solid var(--line); }
.hero h1 { margin: 0 0 8px; font-size: 30px; color: var(--red-dark); }
.hero p { margin: 0; color: #5c6878; }
.section { padding: 30px 0 10px; }
.section-title { margin: 0 0 4px; font-size: 18px; color: #27364a; }
.section-sub { margin: 0 0 18px; font-size: 12.5px; color: var(--muted); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 13px; }
.tool-card {
  display: flex; gap: 12px; align-items: flex-start; background: var(--white);
  border: 1px solid var(--line); border-radius: 12px; padding: 16px;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.tool-card:hover { border-color: #f0a8ab; box-shadow: 0 6px 18px rgba(180,30,35,.08); transform: translateY(-2px); }
.tool-icon { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 10px; background: var(--soft); object-fit: contain; padding: 4px; }
.tool-main { min-width: 0; flex: 1; }
.tool-name { font-size: 15px; font-weight: 600; color: #223044; }
.tool-count { font-size: 11.5px; color: var(--red); background: var(--soft); border-radius: 10px; padding: 1px 8px; margin-left: 6px; white-space: nowrap; }
.tool-desc { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.55; }
.tool-updated { font-size: 11px; color: #98a3b2; margin-top: 7px; }

.breadcrumb { font-size: 12px; color: var(--muted); margin: 22px 0 16px; }
.breadcrumb a { color: var(--red); }
.cat-head h1 { margin: 0 0 6px; font-size: 26px; }
.stats-line { font-size: 12.5px; color: var(--muted); margin: 0 0 18px; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar input, .toolbar select, .form-input {
  padding: 9px 12px; border: 1px solid #d5dce6; border-radius: 8px;
  background: var(--white); color: var(--ink); font-size: 13px; outline: none;
}
.toolbar input:focus, .toolbar select:focus, .form-input:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(218,36,42,.09); }
.toolbar input { flex: 1 1 280px; }
.btn { padding: 9px 16px; border: 1px solid #d5dce6; border-radius: 8px; background: var(--white); color: #45546a; font-size: 13px; cursor: pointer; }
.btn:hover { border-color: var(--red); color: var(--red); }
.btn-primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); color: #fff; }
.count { font-size: 12px; color: var(--muted); margin-left: auto; white-space: nowrap; }

.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--white); }
.data-table { width: 100%; border-collapse: collapse; font-size: 12.5px; min-width: 680px; }
.data-table th { background: #fafbfc; color: #677589; font-weight: 500; text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table td { padding: 10px 12px; border-bottom: 1px solid #f0f3f7; vertical-align: top; max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr.row-main { cursor: pointer; }
.data-table tbody tr.row-main:hover { background: #fffafa; }
.row-seq { color: #9aa6b5; width: 38px; }
.badge-yes { color: #c0392b; background: #fdecea; border-radius: 8px; padding: 1px 7px; font-size: 11px; }
.badge-no { color: #2e8b57; background: #eaf7ef; border-radius: 8px; padding: 1px 7px; font-size: 11px; }
.row-detail td { background: #fffbfb; white-space: normal; max-width: none; color: #475568; }
.row-detail dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 5px 18px; margin: 0; }
.row-detail dt { color: #8b97a6; }
.row-detail dd { margin: 0 0 5px; word-break: break-word; }
.row-detail a { color: var(--red); }
.empty { padding: 44px 16px; text-align: center; color: var(--muted); background: var(--white); border: 1px dashed var(--line); border-radius: 10px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 22px 0 8px; flex-wrap: wrap; }
.pager .info { font-size: 12px; color: var(--muted); }

.panel { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 20px; margin-bottom: 16px; }
.panel h2 { margin: 0 0 14px; font-size: 16px; color: #27364a; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.field select, .field input { width: 100%; }
.result-box { background: var(--soft); border: 1px solid #f5d5d6; border-radius: 10px; padding: 16px 18px; }
.result-box h3 { margin: 0 0 10px; font-size: 15px; color: var(--red-dark); }
.result-table { width: 100%; border-collapse: collapse; font-size: 12.5px; background: var(--white); }
.result-table th, .result-table td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.result-table th { background: #fafbfc; font-weight: 500; }
.note { font-size: 12px; color: var(--muted); margin-top: 10px; }

@media (max-width: 720px) {
  .hero h1 { font-size: 25px; }
  .count { margin-left: 0; }
  .header-note { display: none; }
}
