:root {
  --ink: #2f2019;
  --muted: #78675d;
  --paper: #f6efdf;
  --surface: #fffaf0;
  --red: #b82f22;
  --red-dark: #81251e;
  --orange: #ee7b2d;
  --green: #64734b;
  --line: rgba(71, 45, 31, 0.18);
  --shadow: 0 18px 50px rgba(65, 39, 24, 0.12);
  color-scheme: light;
  font-family: "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
body { min-width: 320px; margin: 0; color: var(--ink); background: radial-gradient(circle at 86% 5%, rgba(238, 123, 45, 0.14), transparent 24rem), linear-gradient(180deg, #fbf5e8 0%, var(--paper) 100%); }
button, input, select { font: inherit; }
button { color: inherit; }

.site-header { display: flex; align-items: center; justify-content: space-between; width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 28px 0; }
.brand { display: inline-flex; gap: 12px; align-items: center; color: inherit; text-decoration: none; }
.brand-mark { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 50% 44% 50% 42%; color: #fff6df; background: var(--red); font-family: "STKaiti", "KaiTi", serif; font-size: 22px; transform: rotate(-5deg); }
.brand strong, .brand small { display: block; }
.brand strong { font-family: "STKaiti", "KaiTi", serif; font-size: 21px; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 12px; }
.stage-badge, .source-label, .count-badge { border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 250, 240, 0.7); }
.stage-badge { padding: 8px 12px; color: var(--muted); font-size: 12px; }
.header-actions { display: flex; gap: 14px; align-items: center; }
.header-actions > a { color: var(--red-dark); font-size: 13px; font-weight: 700; text-underline-offset: 4px; }
main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }

.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, 0.44fr); gap: 44px; align-items: end; padding: 76px 0 68px; border-top: 1px solid var(--line); }
.eyebrow, .section-number { margin: 0 0 12px; color: var(--red); font-size: 12px; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 760px; margin-bottom: 24px; font-family: "STKaiti", "KaiTi", serif; font-size: clamp(45px, 6vw, 78px); font-weight: 700; line-height: 1.06; letter-spacing: -0.045em; }
.hero-description { max-width: 680px; margin-bottom: 0; color: var(--muted); font-size: 17px; line-height: 1.85; }
.hero-note { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; overflow: hidden; border: 1px solid var(--ink); background: var(--ink); box-shadow: 10px 10px 0 var(--orange); transform: rotate(1.2deg); }
.hero-note span { padding: 18px 14px; background: var(--surface); font-family: "STKaiti", "KaiTi", serif; font-weight: 700; text-align: center; }

.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; padding-bottom: 80px; }
.search-panel, .shortlist { border: 1px solid var(--line); border-radius: 24px; background: rgba(255, 250, 240, 0.92); box-shadow: var(--shadow); }
.search-panel { padding: 28px; }
.form-heading, .section-heading, .shortlist-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.form-heading { margin-bottom: 24px; }
.form-heading h2, .section-heading h2, .shortlist-heading h2 { margin: 0; font-size: 22px; }
.form-heading > p, .section-heading > p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.section-number { margin-bottom: 6px; }
.form-grid { display: grid; grid-template-columns: 150px minmax(220px, 1fr) 150px; gap: 12px; align-items: end; }
label > span { display: block; margin: 0 0 8px 4px; color: var(--muted); font-size: 13px; }
input, select { width: 100%; min-height: 50px; border: 1px solid var(--line); border-radius: 14px; outline: 0; color: var(--ink); background: #fffdf7; }
input { padding: 0 16px; }
select { padding: 0 36px 0 14px; }
input:focus, select:focus { border-color: var(--orange); box-shadow: 0 0 0 4px rgba(238, 123, 45, 0.12); }
.primary-button, .candidate-action { display: flex; align-items: center; justify-content: space-between; border: 0; cursor: pointer; font-weight: 700; }
.primary-button { min-height: 50px; padding: 0 18px; border-radius: 14px; color: #fffaf0; background: var(--red); }
.primary-button:hover { background: var(--red-dark); transform: translateY(-1px); }
.primary-button:disabled { cursor: wait; opacity: 0.65; }
.primary-button.is-loading span:last-child { animation: pulse 0.9s infinite alternate; }
.quick-search { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 18px; }
.quick-search > span { margin-right: 2px; color: var(--muted); font-size: 13px; }
.quick-search button, .text-button { border: 0; cursor: pointer; color: var(--red-dark); background: transparent; text-decoration: underline; text-decoration-color: rgba(129, 37, 30, 0.25); text-underline-offset: 4px; }
.quick-search button:hover, .text-button:hover { color: var(--orange); }

.results-section { padding-top: 38px; }
.section-heading { margin-bottom: 18px; padding: 0 4px; }
.status-card { display: flex; gap: 16px; align-items: center; min-height: 130px; padding: 24px; border: 1px dashed rgba(71, 45, 31, 0.28); border-radius: 20px; color: var(--muted); background: rgba(255, 250, 240, 0.55); }
.status-card[hidden] { display: none; }
.status-card strong { color: var(--ink); }
.status-card p { margin: 6px 0 0; font-size: 14px; line-height: 1.6; }
.status-card[data-tone="error"] { border-color: rgba(184, 47, 34, 0.45); }
.status-icon { display: grid; width: 46px; height: 46px; flex: 0 0 auto; place-items: center; border-radius: 50%; color: #fff; background: var(--orange); font-size: 25px; }
.results-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.candidate-card { padding: 22px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: 0 10px 30px rgba(65, 39, 24, 0.08); animation: rise 360ms both; animation-delay: var(--delay); }
.candidate-topline { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.candidate-index { color: var(--orange); font-family: Georgia, serif; font-size: 13px; font-weight: 700; }
.source-label { padding: 5px 8px; color: var(--green); font-size: 11px; }
.candidate-card h3 { margin-bottom: 6px; font-family: "STKaiti", "KaiTi", serif; font-size: 24px; line-height: 1.2; }
.candidate-category { min-height: 22px; margin-bottom: 20px; color: var(--red); font-size: 13px; }
.candidate-card dl { margin: 0; }
.candidate-card dl div { display: grid; grid-template-columns: 42px 1fr; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.candidate-card dt { color: var(--muted); font-size: 12px; }
.candidate-card dd { margin: 0; font-size: 13px; line-height: 1.55; }
.coordinate { margin: 12px 0 18px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }
.candidate-action { width: 100%; padding: 12px 14px; border: 1px solid var(--ink); border-radius: 12px; background: transparent; }
.candidate-action:hover { color: var(--surface); background: var(--ink); }
.candidate-action.is-selected { border-color: var(--green); color: #fff; background: var(--green); }

.shortlist { position: sticky; top: 22px; padding: 24px; }
.shortlist-heading { align-items: center; }
.count-badge { display: grid; min-width: 34px; height: 34px; place-items: center; color: var(--surface); background: var(--red); font-weight: 800; }
.shortlist-intro { margin: 18px 0 22px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.shortlist-source { margin: -10px 0 18px; padding: 8px 10px; border-radius: 10px; color: var(--green); background: rgba(100, 115, 75, .1); font-size: 11px; line-height: 1.5; }
.shortlist-items { display: grid; gap: 10px; }
.shortlist-empty { display: grid; min-height: 150px; place-items: center; align-content: center; gap: 8px; border: 1px dashed var(--line); border-radius: 16px; color: var(--muted); text-align: center; }
.shortlist-empty span { font-size: 28px; }
.shortlist-empty p { max-width: 160px; margin: 0; font-size: 13px; line-height: 1.5; }
.shortlist-item { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; padding: 14px; border-radius: 14px; background: var(--paper); }
.shortlist-item strong { font-size: 14px; }
.representative-label { display: inline-block; margin-left: 7px; padding: 2px 5px; border-radius: 999px; color: #fff; background: var(--red); font-size: 9px; vertical-align: 2px; }
.shortlist-item p { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.shortlist-item button { border: 0; cursor: pointer; color: var(--muted); background: transparent; font-size: 20px; line-height: 1; }
.text-button { margin-top: 18px; padding: 4px 0; font-size: 13px; }
.text-button:disabled { cursor: not-allowed; opacity: 0.35; }
footer { padding: 28px 20px 44px; border-top: 1px solid var(--line); color: var(--muted); text-align: center; font-size: 12px; }
footer p { margin: 0; }
.turnstile-slot { min-height: 28px; color: var(--muted); font-size: 11px; line-height: 1.6; }

@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { to { transform: translateX(4px); } }
@media (max-width: 920px) { .hero { grid-template-columns: 1fr; } .hero-note { max-width: 520px; } .workspace { grid-template-columns: 1fr; } .shortlist { position: static; } }
@media (max-width: 660px) { .site-header, main { width: min(100% - 24px, 1180px); } .stage-badge { display: none; } .hero { padding: 52px 0 46px; } h1 { font-size: 46px; } .form-grid, .results-grid { grid-template-columns: 1fr; } .form-heading, .section-heading { align-items: flex-end; } .form-heading > p { display: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; } }
