:root {
  --search-bg: #f4f7fb;
  --search-card: #fff;
  --search-text: #172033;
  --search-muted: #68748b;
  --search-border: #e0e6f0;
  --search-primary: #2457d6;
  --search-primary-dark: #173fa6;
  --search-success: #14805a;
  --search-warning: #9f6810;
  --search-radius: 15px;
  --search-shadow: 0 11px 30px rgba(33, 54, 102, .10);
}

* {
  box-sizing: border-box;
}

body.tdxl-search-page {
  margin: 0;
  color: var(--search-text);
  background: var(--search-bg);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

button,
input,
select {
  font: inherit;
}

.tdxl-search-shell {
  width: min(1260px, calc(100% - 28px));
  margin: 0 auto;
}

.tdxl-search-header {
  padding: 26px 0 20px;
  color: #fff;
  background:
    radial-gradient(circle at 15% 15%, rgba(255,255,255,.18), transparent 35%),
    linear-gradient(135deg, #163a96, #2867e3);
}

.tdxl-search-header h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 44px);
}

.tdxl-search-header p {
  margin: 0;
  color: rgba(255,255,255,.86);
  line-height: 1.8;
}

.tdxl-search-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.tdxl-search-nav a {
  padding: 8px 12px;
  border-radius: 9px;
  color: #fff;
  background: rgba(255,255,255,.14);
  text-decoration: none;
}

.tdxl-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 115px;
  gap: 10px;
  margin-top: 21px;
}

.tdxl-search-form input {
  min-height: 52px;
  padding: 12px 16px;
  border: 0;
  border-radius: 12px;
  outline: none;
  font-size: 16px;
}

.tdxl-search-form button {
  min-height: 52px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  color: #173475;
  background: #fff;
  font-weight: 800;
}

.tdxl-search-recent {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tdxl-search-recent button {
  padding: 6px 10px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 999px;
  cursor: pointer;
  color: #fff;
  background: rgba(255,255,255,.10);
  font-size: 12px;
}

.tdxl-search-main {
  padding: 20px 0 60px;
}

.tdxl-search-layout {
  display: grid;
  grid-template-columns: 245px minmax(0, 1fr);
  gap: 18px;
}

.tdxl-search-filter {
  align-self: start;
  position: sticky;
  top: 15px;
  padding: 18px;
  border: 1px solid var(--search-border);
  border-radius: var(--search-radius);
  background: var(--search-card);
  box-shadow: var(--search-shadow);
}

.tdxl-search-filter h2 {
  margin: 0 0 15px;
  font-size: 18px;
}

.tdxl-search-field {
  margin-bottom: 14px;
}

.tdxl-search-field label {
  display: block;
  margin-bottom: 6px;
  color: var(--search-muted);
  font-size: 13px;
  font-weight: 700;
}

.tdxl-search-field select {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #ccd5e4;
  border-radius: 9px;
  background: #fff;
}

.tdxl-search-reset,
.tdxl-search-mobile-filter {
  width: 100%;
  min-height: 40px;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  color: var(--search-text);
  background: #edf1f7;
  font-weight: 700;
}

.tdxl-search-mobile-filter {
  display: none;
  margin-bottom: 12px;
}

.tdxl-search-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 13px;
  padding: 14px 16px;
  border: 1px solid var(--search-border);
  border-radius: 12px;
  background: #fff;
}

.tdxl-search-summary strong {
  color: var(--search-primary);
}

.tdxl-search-results {
  display: grid;
  gap: 13px;
}

.tdxl-search-result {
  padding: 19px;
  border: 1px solid var(--search-border);
  border-radius: var(--search-radius);
  background: #fff;
  box-shadow: var(--search-shadow);
}

.tdxl-search-result h2 {
  margin: 0;
  font-size: 19px;
}

.tdxl-search-result h2 a {
  color: var(--search-text);
  text-decoration: none;
}

.tdxl-search-result h2 a:hover {
  color: var(--search-primary);
}

.tdxl-search-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 10px 0;
}

.tdxl-search-tag {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 0 9px;
  border-radius: 999px;
  color: #355078;
  background: #edf3fc;
  font-size: 12px;
  font-weight: 700;
}

.tdxl-search-tag.evidence-a {
  color: #116147;
  background: #e4f6ef;
}

.tdxl-search-tag.evidence-b {
  color: #76501b;
  background: #fff1d4;
}

.tdxl-search-result p {
  margin: 7px 0 0;
  color: var(--search-muted);
  line-height: 1.8;
}

.tdxl-search-result mark {
  padding: 0 2px;
  color: inherit;
  background: #fff0a8;
}

.tdxl-search-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 13px;
}

.tdxl-search-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 35px;
  padding: 0 13px;
  border: 1px solid var(--search-border);
  border-radius: 9px;
  cursor: pointer;
  color: var(--search-text);
  background: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}

.tdxl-search-action.primary {
  border-color: var(--search-primary);
  color: #fff;
  background: var(--search-primary);
}

.tdxl-search-empty {
  padding: 60px 20px;
  border: 1px dashed #c5cfdf;
  border-radius: 16px;
  color: var(--search-muted);
  background: #fff;
  text-align: center;
  line-height: 1.9;
}

.tdxl-search-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 18px;
}

.tdxl-search-pager button {
  min-width: 88px;
  min-height: 39px;
  border: 1px solid var(--search-border);
  border-radius: 9px;
  cursor: pointer;
  color: var(--search-text);
  background: #fff;
  font-weight: 700;
}

.tdxl-search-pager button:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.tdxl-search-launcher {
  position: fixed;
  left: 18px;
  bottom: 20px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 45px;
  padding: 0 15px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  color: #fff;
  background: var(--search-primary);
  box-shadow: var(--search-shadow);
  font-weight: 800;
}

.tdxl-search-overlay {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: none;
  place-items: start center;
  padding: 12vh 18px 20px;
  background: rgba(13, 22, 42, .72);
}

.tdxl-search-overlay.is-visible {
  display: grid;
}

.tdxl-search-overlay-card {
  width: min(660px, 100%);
  padding: 20px;
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0,0,0,.28);
}

.tdxl-search-overlay-card h2 {
  margin: 0 0 12px;
}

.tdxl-search-overlay-form {
  display: grid;
  grid-template-columns: 1fr 96px;
  gap: 9px;
}

.tdxl-search-overlay-form input {
  min-height: 45px;
  padding: 10px 12px;
  border: 1px solid #ccd5e4;
  border-radius: 9px;
}

.tdxl-search-overlay-form button {
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  color: #fff;
  background: var(--search-primary);
  font-weight: 800;
}

@media (max-width: 800px) {
  .tdxl-search-layout {
    grid-template-columns: 1fr;
  }

  .tdxl-search-filter {
    display: none;
    position: static;
  }

  .tdxl-search-filter.is-visible {
    display: block;
  }

  .tdxl-search-mobile-filter {
    display: block;
  }

  .tdxl-search-launcher {
    bottom: 72px;
  }
}

@media (max-width: 520px) {
  .tdxl-search-form {
    grid-template-columns: 1fr;
  }

  .tdxl-search-form button {
    min-height: 45px;
  }

  .tdxl-search-summary {
    align-items: flex-start;
    flex-direction: column;
  }
}