:root {
  color-scheme: light;
  font-family: Inter, "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #202124;
  background: #f3f5f7;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; background: #f3f5f7; }
button, textarea { font: inherit; }
button { cursor: pointer; }
.page-shell { width: min(100% - 32px, 1080px); margin: 0 auto; padding: 42px 0 60px; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 0 0 28px; }
.eyebrow { margin: 0 0 8px; color: #b3261e; font: 800 11px/1.2 ui-monospace, Consolas, monospace; letter-spacing: .13em; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 10px; font-size: clamp(28px, 4vw, 40px); line-height: 1.15; letter-spacing: 0; }
.subtitle { margin: 0; color: #62666c; font-size: 14px; line-height: 1.7; }
.retention { flex: 0 0 auto; padding: 8px 11px; border: 1px solid #d4d9df; background: #fff; color: #62666c; font: 700 12px ui-monospace, Consolas, monospace; }
.input-panel, .results-panel { border: 1px solid #d9dee4; background: #fff; }
.input-panel { padding: 24px; transition: padding 160ms ease; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
h2 { margin-bottom: 7px; font-size: 18px; line-height: 1.35; }
.section-heading p { margin: 0; color: #6b727a; font-size: 13px; line-height: 1.6; }
textarea { display: block; width: 100%; min-height: 190px; margin-top: 18px; padding: 14px; resize: vertical; border: 1px solid #cbd2da; border-radius: 3px; outline: 0; background: #fbfcfd; color: #202124; font: 13px/1.7 ui-monospace, Consolas, monospace; }
textarea:focus { border-color: #b3261e; box-shadow: 0 0 0 3px #b3261e1c; }
.input-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 15px; color: #6b727a; font-size: 12px; }
.input-actions { display: flex; gap: 8px; }
.edit-input-button { display: none; }
.recheck-button { display: none; }
.input-panel.is-collapsed { padding: 12px 16px; }
.input-panel.is-collapsed .section-heading { align-items: center; }
.input-panel.is-collapsed .section-heading h2 { margin: 0; font-size: 14px; }
.input-panel.is-collapsed .section-heading p,
.input-panel.is-collapsed textarea,
.input-panel.is-collapsed .input-footer { display: none; }
.input-panel.is-collapsed .edit-input-button { display: inline-flex; align-items: center; }
.input-panel.is-collapsed .recheck-button { display: inline-flex; align-items: center; }
.primary-button, .secondary-button, .export-button { min-height: 38px; padding: 0 15px; border-radius: 3px; font-weight: 700; }
.primary-button { border: 1px solid #b3261e; background: #b3261e; color: #fff; }
.primary-button:hover { background: #8f211a; }
.secondary-button, .export-button { border: 1px solid #cbd2da; background: #fff; color: #4d545c; }
.secondary-button:hover, .export-button:not(:disabled):hover { background: #f3f5f7; }
button:disabled { cursor: not-allowed; opacity: .45; }
.summary-panel { display: grid; grid-template-columns: repeat(4, 1fr); margin: 18px 0; border: 1px solid #d9dee4; background: #fff; }
.summary-item { min-height: 84px; padding: 16px 18px; border-right: 1px solid #e5e8ec; }
.summary-item:last-child { border-right: 0; }
.summary-item span { display: block; margin-bottom: 7px; color: #69717b; font-size: 12px; }
.summary-item strong { font: 800 27px/1 ui-monospace, Consolas, monospace; }
.summary-item.qualified strong { color: #137333; }
.summary-item.unqualified strong { color: #b3261e; }
.summary-item.pending strong { color: #8a5a00; }
.results-panel { padding: 24px; }
.export-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.qualified-button:not(:disabled) { border-color: #b7dfc0; color: #137333; }
.unqualified-button:not(:disabled) { border-color: #efb8b4; color: #b3261e; }
.results-list { display: grid; gap: 4px; margin-top: 14px; }
.empty-state { padding: 32px 16px; border: 1px dashed #cbd2da; color: #747b83; text-align: center; font-size: 13px; }
.result-row { display: grid; grid-template-columns: minmax(220px, .9fr) minmax(0, 1.7fr) auto; align-items: center; gap: 14px; min-height: 42px; padding: 7px 11px; border-left: 4px solid #b3261e; background: #fff3f2; }
.result-row.qualified { border-left-color: #2f8f46; background: #eff9f1; }
.result-email { min-width: 0; overflow-wrap: anywhere; font: 700 13px/1.5 ui-monospace, Consolas, monospace; }
.result-detail { min-width: 0; overflow-wrap: anywhere; color: #69717b; font-size: 12px; line-height: 1.45; }
.result-status { white-space: nowrap; font-size: 13px; font-weight: 800; }
.result-row.qualified .result-status { color: #137333; }
.result-row.unqualified .result-status { color: #b3261e; }
.result-row.pending { border-left-color: #b7791f; background: #fff9eb; }
.result-row.pending .result-status { color: #8a5a00; }
.result-row.error { border-left-color: #8a5a00; background: #fff9eb; }
.result-row.error .result-status, .result-row.error .result-detail { color: #8a5a00; }
@media (max-width: 680px) {
  .page-shell { width: min(100% - 20px, 1080px); padding-top: 24px; }
  .page-header { flex-direction: column; gap: 14px; }
  .input-panel, .results-panel { padding: 18px; }
  .summary-panel { grid-template-columns: repeat(2, 1fr); }
  .summary-item:nth-child(2) { border-right: 0; }
  .summary-item:nth-child(-n + 2) { border-bottom: 1px solid #e5e8ec; }
  .section-heading { flex-direction: column; }
  .export-actions { width: 100%; }
  .export-button { flex: 1; }
  .result-row { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 8px 10px; }
  .result-detail { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  .input-panel { transition: none; }
}
