@font-face {
  font-family: Jakarta;
  src: url("./jakarta-500.ttf") format("truetype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: Jakarta;
  src: url("./jakarta-600.ttf") format("truetype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}
:root {
  color-scheme: light;
  --ink: #262923;
  --muted: #61665c;
  --line: #dedfd7;
  --paper: #fffefa;
  --wash: #f4f4ee;
  --green: #304a38;
  --rust: #a24527;
  --soft: #e9eee5;
  font-family: Jakarta, system-ui, sans-serif;
  font-weight: 500;
  color: var(--ink);
  background: var(--wash);
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
a {
  color: inherit;
}
button,
a,
input,
select,
summary {
  -webkit-tap-highlight-color: transparent;
}
button,
a,
summary {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.42;
  cursor: default;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #b06d36;
  outline-offset: 4px;
}
.skip {
  position: absolute;
  top: -80px;
  left: 16px;
  z-index: 10;
  padding: 12px 18px;
  background: var(--ink);
  color: white;
}
.skip:focus {
  top: 12px;
}
.site-header {
  max-width: 1440px;
  margin: auto;
  padding: 26px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  background: var(--green);
  color: #fffefa;
  border-radius: 9px;
  letter-spacing: -1px;
  font-size: 20px;
}
.brand-divider {
  color: #a2a79b;
  margin: 0 3px;
}
.brand-section {
  font-weight: 500;
  color: var(--muted);
}
.local-badge {
  font-size: 11px;
  color: var(--green);
  display: flex;
  align-items: center;
  gap: 8px;
}
.local-badge > span {
  height: 6px;
  width: 6px;
  background: #59794c;
  border-radius: 50%;
}
main {
  max-width: 1320px;
  margin: auto;
  padding: 48px 40px 28px;
}
.intro {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 70px;
  align-items: end;
  margin-bottom: 38px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 0.16em;
  font-weight: 600;
  color: var(--rust);
  margin: 0 0 14px;
}
h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}
h1 {
  font-weight: 600;
  font-size: clamp(34px, 4.2vw, 56px);
  line-height: 1.13;
  letter-spacing: -0.055em;
  margin-bottom: 0;
}
h1 > span {
  color: #7c8475;
}
.intro-note {
  max-width: 440px;
  font-size: 14px;
  line-height: 1.75;
}
.intro-note > p:last-child {
  margin-bottom: 0;
}
.quiet {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
.section-label {
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-label > span {
  font-size: 10px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}
.section-label h2 {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.02em;
}
.file-panel,
.mapping-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 24px 28px;
  margin-bottom: 18px;
  border-radius: 5px;
}
.file-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px 24px;
}
.file-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 10px 15px;
  border: 1px solid transparent;
  border-radius: 4px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  background: none;
}
.button-primary {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.button-primary:hover:not(:disabled) {
  background: #213828;
}
.button-secondary {
  border-color: var(--line);
  background: var(--paper);
  color: var(--ink);
}
.button-secondary:hover:not(:disabled) {
  background: var(--soft);
}
.button-quiet {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.button-quiet:hover:not(:disabled) {
  color: var(--ink);
}
.file-label {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.file-label:focus-within {
  outline: 3px solid #b06d36;
  outline-offset: 4px;
}
.file-label input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.limits {
  grid-column: 1/-1;
  font-size: 11px;
  color: var(--muted);
  margin: 0;
}
.file-state {
  grid-column: 1/-1;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 14px;
  border-top: 1px solid var(--line);
  padding-top: 15px;
}
.file-state p {
  margin: 0;
}
#file-name {
  font-size: 12px;
  max-width: 350px;
  overflow-wrap: anywhere;
}
#status {
  font-size: 11px;
  color: var(--muted);
  flex: 1;
  min-width: 220px;
}
.sample-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: #eee4d2;
  color: #795021;
  padding: 4px 6px;
}
.error {
  grid-column: 1/-1;
  background: #fff0e9;
  border-left: 3px solid var(--rust);
  padding: 12px 16px;
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.mapping-panel .section-label {
  margin-bottom: 12px;
}
.mapping-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 24px 0;
}
.field-label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
}
.field-label select {
  min-width: 0;
  width: 100%;
  background: white;
  border: 1px solid #c8cdc1;
  border-radius: 3px;
  padding: 11px 9px;
  color: var(--ink);
  font-size: 12px;
}
.field-label .required {
  color: var(--rust);
}
.mapping-footer {
  margin-top: 22px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.mapping-footer p {
  margin: 0;
  max-width: 560px;
}
.source-preview {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  font-size: 11px;
}
.source-preview summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--green);
  padding: 4px 0;
}
.source-preview[open] summary {
  margin-bottom: 10px;
}
.raw-fields {
  margin: 12px 0 0;
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(0, 3fr);
  font-size: 11px;
}
.raw-fields dt,
.raw-fields dd {
  margin: 0;
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.raw-fields dt {
  color: var(--muted);
  font-weight: 600;
}
.reader-panel {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 5px;
  overflow: hidden;
}
.reader-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
}
.search-box {
  padding: 22px 24px;
  background: #eceee6;
  border-bottom: 1px solid var(--line);
}
.search-box > label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 9px;
}
.search-input-wrap {
  display: flex;
  gap: 10px;
}
.search-input-wrap input {
  width: 100%;
  min-width: 0;
  border: 1px solid #bdc6b4;
  border-radius: 3px;
  background: var(--paper);
  padding: 13px 16px;
  font-size: 14px;
}
.search-input-wrap button {
  white-space: nowrap;
}
.search-box .quiet {
  margin: 9px 0 0;
  font-size: 10px;
}
.workbench {
  display: grid;
  grid-template-columns: minmax(290px, 0.85fr) minmax(0, 1.5fr);
  align-items: start;
}
.results-pane {
  border-right: 1px solid var(--line);
  min-width: 0;
}
.pane-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.pane-heading h3,
.pane-heading h4 {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
}
.pane-heading p,
.pane-heading > span {
  font-size: 10px;
  color: var(--muted);
  margin: 0;
}
.results-pane > .pane-heading {
  padding: 18px 20px;
  background: #f7f7f1;
  border-bottom: 1px solid var(--line);
}
.results-list,
.context-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.results-list {
  max-height: 700px;
  overflow: auto;
  scrollbar-width: thin;
}
.result-button {
  display: block;
  text-align: left;
  width: 100%;
  padding: 16px 20px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
}
.result-button:hover {
  background: #f2f3eb;
}
.result-button[aria-current="true"] {
  background: #e7ecdf;
  box-shadow: inset 3px 0 var(--green);
}
.result-topline {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 7px;
}
.result-person {
  font-size: 12px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.result-reference {
  font-size: 9px;
  color: var(--muted);
  white-space: nowrap;
}
.result-excerpt {
  display: block;
  font-size: 11px;
  line-height: 1.65;
  color: var(--muted);
  overflow-wrap: anywhere;
  max-height: 3.3em;
  overflow: hidden;
}
.result-date {
  display: block;
  font-size: 9px;
  color: #747d6b;
  margin-top: 8px;
  overflow-wrap: anywhere;
}
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 14px 15px;
}
.pagination .button {
  font-size: 10px;
  min-height: 34px;
  padding: 8px 10px;
}
.pagination > span {
  font-size: 9px;
  color: var(--muted);
}
.record-pane {
  padding: 28px 30px;
  min-width: 0;
  min-height: 480px;
}
.reader-empty {
  min-height: 390px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted);
}
.reader-empty h3 {
  font-size: 16px;
  color: var(--ink);
  margin: 22px 0 8px;
}
.reader-empty p {
  font-size: 12px;
  max-width: 240px;
  line-height: 1.7;
}
.paper-lines {
  display: block;
  width: 66px;
  height: 80px;
  border: 1px solid #bfc7b5;
  border-radius: 3px;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 10px,
    #cdd3c4 10px,
    #cdd3c4 11px,
    transparent 11px,
    transparent 18px
  );
  background-size: 38px 55px;
  background-position: 13px 13px;
  background-repeat: no-repeat;
}
.record-kicker {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 15px;
}
#record-heading {
  font-size: 23px;
  letter-spacing: -0.035em;
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: anywhere;
  margin: 0 0 18px;
}
.message-metadata {
  display: grid;
  grid-template-columns: 65px minmax(0, 1fr);
  gap: 8px 15px;
  font-size: 11px;
  margin: 0 0 25px;
}
.message-metadata dt {
  color: var(--muted);
}
.message-metadata dd {
  margin: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.message-content {
  font:
    500 13px/1.9 Jakarta,
    system-ui,
    sans-serif;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 0 0 30px;
  max-height: 600px;
  overflow: auto;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.draft-notice {
  background: #f4ead7;
  color: #785318;
  font-size: 11px;
  padding: 11px 13px;
  line-height: 1.6;
}
.context-section {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.context-section > .quiet {
  font-size: 10px;
  margin: 10px 0 14px;
}
.context-list {
  border-top: 1px solid var(--line);
}
.context-list .result-button {
  padding: 12px;
}
.context-list .result-person {
  font-size: 11px;
}
.context-list .result-date {
  display: none;
}
.context-section .pagination {
  padding: 12px 0 0;
}
.empty-results {
  font-size: 12px;
  line-height: 1.7;
  padding: 25px;
  color: var(--muted);
}
.handoff {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  border-bottom: 1px solid var(--line);
  padding: 38px 0;
}
.handoff > div {
  max-width: 650px;
}
.handoff .eyebrow {
  font-size: 9px;
  margin-bottom: 9px;
}
.handoff h2 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}
.handoff p:last-child {
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 0;
}
.handoff a {
  flex-shrink: 0;
}
.new-tab {
  font-size: 10px;
  font-weight: 500;
}
footer {
  padding-top: 20px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 24px;
  font-size: 10px;
  line-height: 1.7;
}
footer > p {
  margin: 0;
}
footer details {
  max-width: 530px;
}
footer summary {
  cursor: pointer;
  text-align: right;
}
footer details[open] summary {
  margin-bottom: 14px;
}
@media (min-width: 1500px) {
  .intro {
    margin-top: 20px;
    margin-bottom: 48px;
  }
}
@media (max-width: 900px) {
  main {
    padding: 32px 24px;
  }
  .site-header {
    padding: 20px 24px;
  }
  .intro {
    gap: 25px;
  }
  .intro-note {
    font-size: 12px;
  }
  .file-panel {
    grid-template-columns: 1fr;
  }
  .file-actions {
    grid-column: 1/-1;
  }
  .mapping-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .workbench {
    grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1fr);
  }
  .record-pane {
    padding: 24px 20px;
  }
  .raw-fields {
    grid-template-columns: 1fr;
  }
  .raw-fields dt {
    padding-bottom: 2px;
    border-bottom: 0;
  }
  .raw-fields dd {
    padding-top: 3px;
  }
  .handoff {
    align-items: start;
    flex-direction: column;
    gap: 20px;
  }
}
@media (max-width: 650px) {
  .brand-divider,
  .brand-section {
    display: none;
  }
  .site-header {
    padding: 17px 18px;
  }
  .local-badge {
    font-size: 9px;
  }
  main {
    padding: 28px 16px 22px;
  }
  .intro {
    grid-template-columns: 1fr;
    gap: 22px;
    margin-bottom: 26px;
  }
  .intro-note {
    max-width: none;
    font-size: 13px;
  }
  .intro-note .quiet {
    font-size: 11px;
  }
  h1 {
    font-size: 40px;
  }
  .file-panel,
  .mapping-panel {
    padding: 20px 17px;
  }
  .file-actions {
    gap: 7px;
  }
  .file-actions .button {
    font-size: 11px;
  }
  .file-state {
    align-items: start;
    flex-direction: column;
    gap: 8px;
  }
  #file-name {
    max-width: 100%;
  }
  #status {
    min-width: 0;
  }
  .mapping-fields {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .mapping-footer {
    align-items: stretch;
    flex-direction: column;
  }
  .reader-toolbar {
    padding: 14px 17px;
  }
  .search-box {
    padding: 17px;
  }
  .search-input-wrap {
    flex-wrap: wrap;
    gap: 3px;
  }
  .search-input-wrap input {
    flex-basis: 100%;
  }
  .search-input-wrap button {
    padding-left: 0;
    min-height: 32px;
  }
  .workbench {
    grid-template-columns: 1fr;
  }
  .results-pane {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .results-list {
    max-height: 350px;
  }
  .record-pane {
    min-height: 300px;
    padding: 25px 19px;
  }
  .reader-empty {
    min-height: 240px;
  }
  .results-pane > .pane-heading {
    padding: 14px 17px;
  }
  .result-button {
    padding: 13px 17px;
  }
  .pagination {
    padding: 12px 16px;
  }
  .record-kicker {
    font-size: 8px;
  }
  .message-content {
    font-size: 12px;
  }
  .handoff {
    padding: 28px 2px;
  }
  .handoff a {
    width: 100%;
  }
  footer {
    flex-direction: column;
    gap: 14px;
  }
  footer summary {
    text-align: left;
  }
  .message-metadata {
    grid-template-columns: 55px minmax(0, 1fr);
    gap: 8px 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
