:root {
  --paper: #e7eef2;
  --sheet: #f8fbfc;
  --ink: #14202b;
  --muted: #3d5160;
  --line: #cfdbe3;
  --accent: #5c2d91;
  --on-accent: #fbf8ff;
  --ui: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "Segoe UI Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { background: var(--paper); }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 1rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
  overflow-x: clip;
}

.column {
  max-width: 68rem;
  margin: 0 auto;
  padding: 3.5rem 1.5rem;
  min-width: 0;
}

h1, h2 { margin: 0; font-weight: 600; color: var(--ink); }

h1 { font-size: 1.75rem; margin-bottom: 0.75rem; }

h2 { font-size: 1.25rem; }

p { margin: 0; overflow-wrap: anywhere; }

.intro { font-size: 1.0625rem; }

.intro p + p,
.intro nav { margin-top: 0.5rem; }

nav a {
  color: var(--ink);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

a { color: var(--ink); }

a:focus,
button:focus,
input:focus,
.scroller:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

main { margin-top: 2.5rem; min-width: 0; }

.field { margin-bottom: 1.75rem; min-width: 0; }

form .field:last-of-type { margin-bottom: 2rem; }

label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
}

input[type="file"],
input[type="text"] {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--muted);
  border-radius: 2px;
  background: var(--sheet);
  color: var(--ink);
  font: inherit;
}

.hint {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 400;
}

.chosen {
  margin-top: 0.35rem;
  color: var(--ink);
  font-size: 0.9375rem;
}

button {
  min-height: 44px;
  padding: 0.65rem 1.1rem;
  border-radius: 2px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

#find {
  background: var(--accent);
  color: var(--on-accent);
  border: 1px solid var(--accent);
}

#find:disabled {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
  opacity: 1;
  cursor: wait;
}

#stale {
  margin-top: 1rem;
  font-weight: 600;
  color: var(--ink);
}

#result { position: relative; margin-top: 2.5rem; scroll-margin-top: 1.5rem; min-width: 0; }

.file-echo {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  opacity: 0;
  pointer-events: none;
  z-index: -1;
}

#status p + p { margin-top: 0.5rem; }

.alert {
  padding: 0.35rem 0 0.35rem 1.25rem;
  border-left: 4px solid var(--accent);
  color: var(--ink);
  font-weight: 600;
}

#summary,
.count,
.state,
.price-error {
  font-weight: 600;
  color: var(--ink);
}

#success { min-width: 0; }

#success > section { margin-top: 2.5rem; }

#success > section:first-of-type { margin-top: 0; }

#summary { margin-bottom: 2rem; }

h2 + .count,
h2 + .state { margin-top: 0.35rem; }

.dup-label { margin-top: 0.5rem; }

.empty,
.scroller { margin-top: 1rem; }

#activity-state { margin-top: 0.35rem; }

.scroller {
  overflow-x: auto;
  max-width: 100%;
  min-width: 0;
  background: var(--sheet);
  border: 1px solid var(--line);
}

table {
  border-collapse: collapse;
  background: var(--sheet);
  color: var(--ink);
  width: 100%;
}

.findings { width: max-content; min-width: 100%; }

th, td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-weight: 400;
  overflow-wrap: anywhere;
}

th { font-size: 0.9375rem; font-weight: 600; color: var(--ink); }

.findings td:nth-child(2) { font-family: var(--mono); }

.findings td:nth-child(5) { font-weight: 600; }

.findings th:nth-child(1),
.findings td:nth-child(1) { min-width: 10rem; }

.findings th:nth-child(2),
.findings td:nth-child(2) { min-width: 14rem; }

.findings th:nth-child(3),
.findings td:nth-child(3) { min-width: 12rem; }

.findings th:nth-child(4),
.findings td:nth-child(4) { min-width: 14rem; }

.findings th:nth-child(5),
.findings td:nth-child(5) { min-width: 8rem; }

#prices .note + .note { margin-top: 0.5rem; }

#prices .note:last-of-type,
#no-prices { margin-bottom: 1.25rem; }

#price-table { margin-bottom: 0; }

#price-table label {
  display: inline;
  margin: 0;
  font-size: 1rem;
  font-weight: 400;
}

#price-table input { max-width: min(10rem, 100%); }

.price-error { margin-top: 0.35rem; font-size: 1rem; }

#download-block { margin-top: 2rem; }

#download {
  background: var(--sheet);
  color: var(--ink);
  border: 1px solid var(--ink);
}

#download:disabled {
  color: var(--muted);
  border-color: var(--line);
  cursor: not-allowed;
  opacity: 1;
}

#download-alert { margin-top: 0.75rem; }

#download-hint { margin-top: 0.35rem; }

#notes h2 { margin-bottom: 0.75rem; }

#notes p + p,
#notes div + p { margin-top: 0.75rem; }

#unmatched-names p { margin-top: 0.35rem; }

#reference {
  margin-top: 3.5rem;
  border-top: 2px solid var(--accent);
  background: var(--sheet);
  padding: 1rem;
  min-width: 0;
}

#reference h2 { margin-bottom: 0.75rem; }

#reference p + p { margin-top: 0.5rem; }

#reference table { margin-top: 1.25rem; }

#success > section {
  background: var(--sheet);
  padding: 1rem;
  border-top: 2px solid var(--accent);
}

footer { margin-top: 3rem; }

@media (max-width: 719px) {
  .column { padding: 2rem 1rem; }
  #find, #download { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
