:root {
  color-scheme: light;
  --paper: #f6f4ee;
  --card: #fffefa;
  --ink: #262927;
  --muted: #535d57;
  --line: #d9d8d0;
  --green: #103d36;
  --green-hover: #0b302b;
  --green-pale: #e9eee3;
  --error: #862d1a;
  --mono: ui-monospace, "SF Mono", Consolas, "Liberation Mono", monospace;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; line-height: 1.5; }
[hidden] { display: none !important; }
a { color: var(--green); text-underline-offset: .2em; }
button, input { font: inherit; }
:focus-visible, .file-picker:has(input:focus-visible) {
  outline: 3px solid #166cbb;
  outline-offset: 3px;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link {
  position: absolute;
  z-index: 1;
  inset: .75rem auto auto .75rem;
  padding: .55rem .8rem;
  background: var(--card);
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }
.frame { width: min(1060px, calc(100% - 48px)); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--line); background: var(--card); }
.site-header .frame {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: .4rem 1rem;
  min-height: 64px;
  padding-block: .5rem;
}
.wordmark, .site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .3rem 1rem;
}
.wordmark {
  gap: .62rem;
  min-height: 44px;
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 740;
  letter-spacing: -.025em;
  text-decoration: none;
}
.brand-symbol {
  display: grid;
  grid-template: repeat(2, 5px) / repeat(2, 5px);
  gap: 3px;
  place-content: center;
  width: 33px;
  height: 33px;
  border-radius: 7px;
  color: #e8f0d1;
  background: var(--green);
}
.brand-symbol i { border-radius: 1px; background: currentColor; }
.brand-symbol i:first-child { grid-row: span 2; }
.brand-symbol i:last-child { background: #a9bc78; }
.site-nav a, .quiet-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: .87rem;
  font-weight: 630;
}

main { padding-bottom: 3rem; }
.intro { padding-block: clamp(1.9rem, 5vw, 3.25rem) 1.35rem; }
.intro h1 {
  margin: 0;
  max-width: 18ch;
  color: #16332f;
  font-size: clamp(2rem, 5.5vw, 3.55rem);
  line-height: 1.04;
  letter-spacing: -.052em;
  text-wrap: balance;
}
.intro p {
  max-width: 630px;
  margin: .7rem 0 0;
  color: var(--muted);
  font-size: clamp(.97rem, 1.9vw, 1.06rem);
}
.intro .quiet-link { margin-top: .35rem; }
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 2.05fr) minmax(0, 1fr);
  align-items: start;
  gap: 1rem;
}
.workbench { display: grid; min-width: 0; gap: 1rem; }
.panel {
  min-width: 0;
  padding: clamp(1rem, 2.8vw, 1.4rem);
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--card);
}
.panel h2, .panel h3 {
  margin: 0;
  color: var(--green);
  letter-spacing: -.023em;
  line-height: 1.25;
}
.panel h2 { font-size: 1.33rem; }
.panel h3 { font-size: 1rem; }
.panel p { margin: .55rem 0 0; }
.pickers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: .65rem;
  margin-top: .95rem;
}
.file-field { display: flex; min-width: 0; flex-direction: column; }
.file-picker {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .18rem .5rem;
  align-content: center;
  min-width: 0;
  min-height: 78px;
  height: 100%;
  padding: .65rem .77rem;
  border: 1px dashed #9ba89d;
  border-radius: 7px;
  background: #f5f7f0;
  cursor: pointer;
}
.file-picker:hover { border-color: var(--green); background: var(--green-pale); }
.file-picker:has(input:disabled) { cursor: default; opacity: .68; }
.file-picker strong { color: var(--green); font-size: .89rem; }
.file-name {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: .81rem;
  overflow-wrap: anywhere;
}
.optional { color: var(--muted); font-size: .76rem; font-weight: 520; }
.remove-reference { align-self: start; margin-top: .2rem; }
.file-pick-action { align-self: start; color: var(--green); font-size: .77rem; font-weight: 700; }
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem .65rem;
  margin-top: 1rem;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  max-width: 100%;
  padding: .48rem .76rem;
  border: 1px solid #a4b0a6;
  border-radius: 6px;
  color: var(--green);
  background: var(--card);
  font-size: .86rem;
  font-weight: 700;
  line-height: 1.3;
  cursor: pointer;
}
.button:hover { background: var(--green-pale); }
.button.primary { border-color: var(--green); color: #fbfff3; background: var(--green); }
.button.primary:hover { background: var(--green-hover); }
.button.text { padding-inline: .34rem; border-color: transparent; background: transparent; text-decoration: underline; text-underline-offset: .2em; }
.button:disabled { opacity: .55; cursor: default; }
.status, .help, .limits { color: var(--muted); font-size: .84rem; overflow-wrap: anywhere; }
.status:empty { margin: 0; }
.status:is([data-state="error"], .is-error, .error), .error { color: var(--error); }
.status[data-state="match"] { color: var(--green); font-weight: 650; }
.progress-block { margin-top: .9rem; }
.progress-block:has(progress[hidden]) { display: none; }
.progress-block progress { display: block; width: 100%; height: .68rem; accent-color: var(--green); }
.guide { background: #eef1e7; }
.guide section + section { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #d0d8c9; }
.guide p { color: #47564d; font-size: .88rem; }
.guide :is(h2, h3) { text-wrap: balance; }

.result-counts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .55rem;
  margin: .85rem 0;
}
.result-counts div {
  min-width: 0;
  padding: .55rem .65rem;
  border: 1px solid #dce2d7;
  border-radius: 7px;
  background: #f1f4ed;
}
.result-counts dt { color: var(--muted); font-size: .76rem; font-weight: 650; overflow-wrap: anywhere; }
.result-counts dd { margin: .12rem 0 0; color: var(--green); font: 700 1.35rem/1.15 var(--mono); }
.result-table-wrap { max-width: 100%; overflow-x: auto; }
.result-table { width: 100%; border-collapse: collapse; margin-top: .5rem; text-align: left; }
.result-table :is(th, td) { padding: .48rem .35rem; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.result-table th { color: var(--green); font-size: .84rem; }
.result-table td { font-size: .81rem; }
.result-table th:first-child { width: 75%; }
.result-table td:first-child { font-family: var(--mono); }


@media (max-width: 760px) {
  .workspace { grid-template-columns: 1fr; }
}
@media (max-width: 475px) {
  .frame { width: calc(100% - 28px); }
  .pickers { grid-template-columns: 1fr; }
  .result-counts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .intro h1 { text-wrap: initial; }
}
