:root {
  font-family: Inter, system-ui, sans-serif;
  color: #22302b;
  background: #f5f5ee;
  --line: #c9cec0;
  --green: #135542;
  --orange: #aa4c27;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
header {
  border-bottom: 1px solid var(--line);
  background: #f9faf4;
}
.nav,
main,
footer {
  max-width: 1080px;
  margin: auto;
  padding: 0 30px;
}
.nav,
footer,
.section-heading,
.options,
.paging,
.actions,
.filters,
nav {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.nav {
  height: 68px;
  justify-content: space-between;
}
.brand {
  font-weight: 850;
  letter-spacing: -1.3px;
  font-size: 1.45rem;
  text-decoration: none;
}
.brand span,
h1 span {
  color: var(--orange);
}
a {
  color: var(--green);
  text-underline-offset: 3px;
}
nav a,
footer a {
  font-size: 0.9rem;
}
nav {
  gap: 22px;
}
.intro {
  padding: 52px 0 28px;
}
.kicker,
.file-title {
  font: 700 0.76rem var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--green);
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: clamp(3.4rem, 8vw, 6.2rem);
  letter-spacing: -0.072em;
  line-height: 1.1;
  margin: 7px 0 12px;
  font-weight: 780;
}
h2 {
  font-size: 1.55rem;
  letter-spacing: -0.045em;
}
h3 {
  font-size: 1rem;
}
.intro p,
.method p {
  max-width: 68ch;
  line-height: 1.6;
  color: #42544b;
}
.panel {
  background: #fffef8;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: clamp(16px, 3vw, 30px);
  margin: 0 0 22px;
}
.section-heading,
.paging {
  justify-content: space-between;
}
.inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 24px 0;
}
.drop {
  display: grid;
  gap: 10px;
  padding: 22px;
  min-width: 0;
  position: relative;
  background: #f3f6ed;
  border: 1px dashed #779380;
  border-radius: 8px;
  cursor: pointer;
}
.drop:nth-child(2) {
  background: #f7f2e7;
}
.drop:hover,
.drop.drag {
  outline: 2px solid var(--green);
}
.drop:focus-within {
  outline: 3px solid #206bba;
  outline-offset: 3px;
}
.drop input {
  position: absolute;
  width: 100%;
  height: 100%;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.drop strong {
  overflow-wrap: anywhere;
  font-size: 1.06rem;
}
.file-title {
  display: flex;
  align-items: center;
  gap: 8px;
}
.mark {
  display: inline-grid;
  place-items: center;
  background: #dce6d8;
  width: 22px;
  height: 22px;
  font-size: 1rem;
}
.drop small,
#status,
.paging span {
  font-size: 0.83rem;
  color: #4a594e;
}
.options {
  align-items: end;
}
.options > div {
  flex: 1;
  min-width: 180px;
}
.options label,
.filters label {
  display: grid;
  gap: 5px;
  font-size: 0.85rem;
  font-weight: 650;
}
.options label {
  margin-bottom: 5px;
}
button,
select,
input[type="search"] {
  font: inherit;
  border-radius: 5px;
  background: #fffef8;
  border: 1px solid #839486;
  padding: 9px 12px;
  color: #243a2f;
  max-width: 100%;
}
button {
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 650;
}
button:hover:enabled {
  background: #e8eee4;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
button.primary {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
button.primary:hover:enabled {
  background: #0b4333;
}
button.plain {
  border-color: transparent;
}
.options select {
  width: 100%;
}
#status {
  padding-top: 15px;
  line-height: 1.4;
}
#status.error {
  color: #963122;
}
#stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 22px 0;
  border-block: 1px solid var(--line);
}
.stat {
  padding: 13px 6px;
  display: grid;
  gap: 3px;
}
.stat strong {
  font: 600 1.65rem var(--mono);
}
.stat small {
  text-transform: capitalize;
}
.filters {
  margin-bottom: 15px;
}
.filters label:last-child {
  flex: 1;
  min-width: 130px;
}
details {
  border-top: 1px solid var(--line);
  padding: 10px 0;
}
summary {
  cursor: pointer;
  display: flex;
  gap: 10px;
  align-items: center;
  font: 600 0.9rem var(--mono);
  overflow-wrap: anywhere;
}
summary:before {
  content: "▸";
}
details[open] summary:before {
  content: "▾";
}
.badge {
  font: 700 0.69rem var(--mono);
  text-transform: uppercase;
  display: inline-block;
  min-width: 64px;
  text-align: center;
  padding: 4px;
  border-radius: 3px;
  background: #edefe7;
}
.added {
  color: #215e42;
  background: #e0efdf;
}
.removed {
  color: #873729;
  background: #f6e4d9;
}
.changed {
  color: #754b13;
  background: #faebc9;
}
.field {
  padding: 10px 0 6px 20px;
  overflow: hidden;
}
.field-name {
  font-weight: 650;
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}
.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 4px;
}
.value {
  min-width: 0;
  background: #f3f4ec;
  border-radius: 4px;
  padding: 8px;
}
.value small {
  color: #5a655e;
}
pre {
  font: 0.82rem/1.45 var(--mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 3px 0;
}
.paging {
  margin-top: 15px;
}
.method {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 22px;
  padding: 16px 0 36px;
}
.method p {
  font-size: 0.92rem;
  margin: 5px 0 15px;
}
footer {
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  padding-bottom: 24px;
}
[hidden] {
  display: none !important;
}
:focus-visible {
  outline: 3px solid #2167a6;
  outline-offset: 3px;
}
@media (max-width: 650px) {
  .nav,
  main,
  footer {
    padding-left: 16px;
    padding-right: 16px;
  }
  .nav {
    height: auto;
    min-height: 62px;
    gap: 7px;
    padding-block: 10px;
  }
  nav {
    gap: 12px;
  }
  .intro {
    padding-top: 30px;
  }
  .inputs,
  .pair,
  .method {
    grid-template-columns: 1fr;
  }
  .drop {
    padding: 14px;
  }
  .options > div {
    flex-basis: 100%;
  }
  .section-heading {
    align-items: start;
  }
  .actions {
    gap: 7px;
  }
  .method {
    gap: 12px;
  }
  .stat strong {
    font-size: 1.3rem;
  }
  .stat small {
    font-size: 0.75rem;
  }
}
/* Input controls have intrinsic widths; constrain them to their mobile grid tracks. */
.drop {
  overflow: hidden;
}
.filters input,
.filters select,
.filters label,
.options select,
.method > div,
.stat {
  min-width: 0;
}
.filters input,
.filters select {
  width: 100%;
}
@media (max-width: 650px) {
  .inputs,
  .pair,
  .method {
    grid-template-columns: minmax(0, 1fr);
  }
  .filters {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }
  .filters label:last-child {
    min-width: 0;
  }
  #stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .stat {
    padding-inline: 1px;
  }
}

.source-guide { margin: 0 0 1rem; max-width: 78ch; line-height: 1.5; }
