* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 24px;
  font-family: Arial, sans-serif;
  background: #f7f7fb;
  color: #1f2937;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
}

h1 {
  margin: 0 0 8px;
}

.subtitle {
  margin: 0 0 20px;
  color: #4b5563;
}

.intro .intro-heading {
  margin: 0 0 10px;
  font-size: 1.15rem;
  font-weight: 700;
  color: #111827;
}

.intro .intro-lead {
  margin: 0 0 16px;
  line-height: 1.55;
  color: #374151;
  font-size: 0.95rem;
}

.intro .intro-subheading {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 600;
  color: #1f2937;
}

.intro .intro-steps {
  margin: 0;
  padding-left: 1.25rem;
  line-height: 1.55;
  color: #374151;
  font-size: 0.95rem;
}

.intro .intro-steps li {
  margin-bottom: 8px;
}

.intro .intro-steps li:last-child {
  margin-bottom: 0;
}

.card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
}

.search-row {
  display: grid;
  grid-template-columns: 220px 1fr 120px;
  gap: 10px;
  margin-bottom: 10px;
}

.actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

button {
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
}

button.primary {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

input, select {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 8px;
}

.table-wrap {
  overflow-x: auto;
}

#results-table {
  /* Min width prevents fixed-layout columns from being squeezed past content (overlap). */
  width: 100%;
  min-width: 1280px;
  table-layout: fixed;
  border-collapse: collapse;
  border-spacing: 0;
  font-size: 13px;
}

#results-table th, #results-table td {
  border: 1px solid #e5e7eb;
  padding: 8px;
  text-align: left;
  vertical-align: top;
  white-space: normal;
}

#results-table .col-select {
  width: 52px;
}

#results-table .col-search-input {
  width: 12%;
  min-width: 120px;
}

#results-table .col-url {
  width: 26%;
  min-width: 180px;
}

#results-table .col-domain {
  width: 14%;
  min-width: 100px;
}

#results-table .col-source-type {
  width: 14%;
  min-width: 110px;
}

#results-table .col-match-type {
  width: 8%;
  min-width: 72px;
}

#results-table .col-score {
  width: 9%;
  min-width: 132px;
}

#results-table .col-region {
  width: 13%;
  min-width: 172px;
}

/* Belt-and-suspenders: keep score + region cells from sharing one visual column */
#results-table th:nth-child(7),
#results-table td:nth-child(7) {
  min-width: 132px;
  box-sizing: border-box;
}

#results-table th:nth-child(8),
#results-table td:nth-child(8) {
  min-width: 172px;
  box-sizing: border-box;
}

#results-table .col-dup {
  width: 11%;
  min-width: 142px;
}

#results-table .col-date {
  width: 11%;
  min-width: 132px;
}

#results-table td.col-url,
#results-table .cell-url {
  word-break: break-all;
  overflow-wrap: anywhere;
  max-width: 0;
  overflow: hidden;
}

#results-table td:not(.cell-url) {
  word-break: break-word;
}

#status {
  min-height: 20px;
  margin-top: 10px;
  color: #111827;
}
