:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  color: #202b3d;
  background: #f5f7fb;
  font-synthesis: none;
  --blue: #2563d9;
  --muted: #738095;
  --border: #e0e7f0;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font-size: 14px; line-height: 1.6; }
button, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; }
button, textarea, .table-scroll { -webkit-tap-highlight-color: transparent; }
button:focus-visible, .table-scroll:focus-visible { outline: 3px solid #bed3fc; outline-offset: 3px; }

.page-shell { width: min(1240px, calc(100% - 64px)); margin: 0 auto; padding: 38px 0 24px; }
.page-header { margin-bottom: 28px; }
.brand { display: flex; align-items: center; gap: 9px; color: #4e607a; font-size: 13px; font-weight: 600; letter-spacing: .2px; }
.brand-mark { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 7px; background: #e7effe; color: var(--blue); font-size: 15px; font-weight: 700; }
h1 { margin: 19px 0 7px; color: #17243a; font-size: 27px; font-weight: 650; letter-spacing: .4px; line-height: 1.4; }
.page-header > p { margin: 0; color: var(--muted); font-size: 14px; }
.workspace { display: grid; grid-template-columns: 350px minmax(0, 1fr); align-items: start; gap: 20px; }
.card { background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 4px 18px #223b6505; }
.input-card { padding: 23px; }
.card-heading { display: flex; align-items: center; justify-content: space-between; min-height: 27px; margin-bottom: 22px; }
h2 { margin: 0; font-size: 17px; line-height: 1.5; font-weight: 650; }
.section-marker { color: #a5b1c2; font-size: 12px; font-variant-numeric: tabular-nums; }
.field-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; }
.field-heading label { color: #4d5d73; font-size: 13px; }
.input-count { color: #8b97a9; font-size: 12px; font-variant-numeric: tabular-nums; }
.input-count.over-limit { color: #b42335; }
textarea { display: block; width: 100%; min-height: 254px; max-height: 520px; resize: vertical; border: 1px solid #d7e0ed; border-radius: 7px; padding: 11px 13px; background: #fafbfd; color: #273953; font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; font-size: 14px; line-height: 1.85; transition: border-color .15s, box-shadow .15s; }
textarea::placeholder { color: #a5afbd; }
textarea:focus { outline: 0; border-color: #6997ef; background: #fff; box-shadow: 0 0 0 3px #edf3ff; }
textarea[aria-invalid="true"] { border-color: #d7808b; }
textarea[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px #fff0f1; }
textarea[readonly] { color: #6d7e94; }
.field-help { margin: 9px 0 0; color: #8b97a9; font-size: 12px; }
.form-actions { display: grid; grid-template-columns: minmax(0, 1fr) 68px; gap: 10px; margin-top: 21px; }
.button { min-height: 41px; border: 1px solid transparent; border-radius: 7px; padding: 9px 11px; font-size: 14px; font-weight: 500; line-height: 1.5; transition: background .15s, border-color .15s; }
.button-primary { color: #fff; background: var(--blue); border-color: var(--blue); }
.button-primary:hover { background: #1e54be; border-color: #1e54be; }
.button-primary:disabled { background: #91ace0; border-color: #91ace0; }
.button-secondary { color: #63718a; background: #fff; border-color: #dbe3ee; }
.button-secondary:hover { background: #f3f6fb; }
.button-secondary:disabled { color: #a0acbd; background: #fafbfd; }
.input-rule { display: flex; align-items: flex-start; gap: 7px; margin-top: 20px; padding-top: 16px; border-top: 1px solid #edf1f6; color: #8b97a9; font-size: 12px; line-height: 1.7; }
.input-rule svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; }
.validation-errors { margin-top: 13px; padding: 11px 12px; border: 1px solid #f1d3d8; border-radius: 7px; color: #a13444; background: #fff7f8; font-size: 12px; }
.validation-errors p { margin: 0 0 4px; font-weight: 600; }
.validation-errors ul { max-height: 145px; overflow: auto; margin: 0; padding-left: 17px; }
.validation-errors li + li { margin-top: 3px; }

.result-card { min-height: 584px; overflow: hidden; }
.result-heading { gap: 16px; margin: 0; padding: 23px 25px 19px; border-bottom: 1px solid #edf1f6; }
.result-subtitle { margin: 5px 0 0; color: #8b97a9; font-size: 12px; }
.result-count { flex-shrink: 0; border: 1px solid #e3eaf4; border-radius: 5px; padding: 3px 9px; color: #6d7f99; background: #f7f9fd; font-size: 12px; font-variant-numeric: tabular-nums; }
.result-state { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 464px; padding: 45px 24px; text-align: center; }
.state-icon { display: grid; place-items: center; width: 62px; height: 62px; margin-bottom: 17px; border-radius: 18px; background: #f1f5fc; color: #87a1c6; }
.state-icon svg { width: 32px; height: 32px; }
.error-icon, .loading-spinner { display: none; }
.result-state[data-kind="error"] .state-icon { background: #fff3f2; color: #c27670; }
.result-state[data-kind="error"] .error-icon { display: block; }
.result-state[data-kind="error"] .search-icon, .result-state[data-kind="loading"] .search-icon { display: none; }
.result-state[data-kind="loading"] .loading-spinner { display: block; width: 25px; height: 25px; border: 2px solid #d9e5fa; border-top-color: #4c7bce; border-radius: 50%; animation: spin .8s linear infinite; }
.result-state h3 { margin: 0; color: #5c6c84; font-size: 15px; font-weight: 500; }
.result-state p { max-width: 350px; margin: 8px 0 0; color: #96a1b1; font-size: 13px; }
.result-summary { margin: 0; padding: 16px 25px; color: #74849b; font-size: 12px; }
.table-scroll { overflow: auto; max-height: 650px; }
table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; }
th { position: sticky; top: 0; z-index: 1; padding: 12px 24px; border-top: 1px solid #edf1f6; border-bottom: 1px solid #e9eef5; background: #f8fafc; color: #6b7b92; font-size: 12px; font-weight: 500; }
td { padding: 17px 24px; border-bottom: 1px solid #eef2f7; font-size: 13px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfcff; }
.phone-cell, .time-cell { font-variant-numeric: tabular-nums; }
.phone-cell { color: #334663; font-weight: 500; letter-spacing: .2px; }
.time-cell { color: #6e7d92; font-size: 12px; }
.status-tag { display: inline-flex; align-items: center; gap: 6px; color: #8a96a7; font-size: 12px; }
.status-tag--found { padding: 2px 8px; border-radius: 4px; color: #2d8865; background: #edf8f2; }
.status-tag--found::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #4c9e7c; }
.result-footnote { margin: 0; padding: 16px 25px; border-top: 1px solid #edf1f6; color: #99a4b3; font-size: 12px; }
.page-footer { margin-top: 21px; color: #a0aaba; font-size: 12px; text-align: center; }
.noscript-message { color: #a13444; text-align: center; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1020px) {
  .page-shell { width: calc(100% - 40px); padding-top: 28px; }
  .workspace { grid-template-columns: 310px minmax(0, 1fr); gap: 16px; }
  .input-card { padding: 20px; }
  .result-heading { padding: 20px; }
  th, td { padding-left: 18px; padding-right: 18px; }
  .result-summary, .result-footnote { padding-left: 20px; padding-right: 20px; }
}

@media (max-width: 760px) {
  .page-shell { width: calc(100% - 32px); padding-top: 23px; }
  .page-header { margin-bottom: 22px; }
  h1 { margin-top: 16px; font-size: 23px; }
  .workspace { grid-template-columns: 1fr; gap: 18px; }
  .card { border-radius: 10px; }
  .input-card { padding: 20px; }
  .card-heading { margin-bottom: 18px; }
  textarea { height: 182px; min-height: 160px; }
  .form-actions { margin-top: 17px; }
  .input-rule { margin-top: 17px; padding-top: 13px; }
  .result-card { min-height: 310px; }
  .result-heading { margin-bottom: 0; }
  .result-state { min-height: 240px; padding: 30px 20px; }
  .result-state p { max-width: 270px; }
  .result-count { padding: 3px 7px; }
  .table-scroll { max-height: 540px; }
  th, td { padding: 13px 16px; }
  .page-footer { margin-top: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}
