:root {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  color: #253c37;
  background: #f6f5ef;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
header,
footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 5vw;
  border-bottom: 1px solid #d8ded6;
}
.brand {
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -1px;
  text-decoration: none;
  color: inherit;
}
.brand span {
  display: block;
  font-size: 9px;
  letter-spacing: 3px;
  margin-top: 6px;
}
.badge,
.number,
.eyebrow {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 2px;
}
.badge {
  border: 1px solid #bdc7b9;
  padding: 9px 12px;
  border-radius: 40px;
}
main {
  max-width: 1340px;
  margin: auto;
  padding: 64px 5vw 100px;
  min-height: 78vh;
}
h1 {
  font-size: clamp(44px, 6vw, 80px);
  line-height: 1.03;
  letter-spacing: -4px;
  margin: 20px 0 32px;
  font-weight: 550;
}
h2 {
  font-size: 27px;
  letter-spacing: -1px;
  font-weight: 550;
}
.intro {
  max-width: 510px;
  line-height: 1.7;
  font-size: 18px;
}
button {
  background: #284b40;
  color: white;
  border: 0;
  padding: 15px 22px;
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
button:hover {
  background: #19392f;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid #bb7b3c;
  outline-offset: 4px;
}
.muted {
  font-size: 13px;
  color: #60726a;
  line-height: 1.7;
  max-width: 460px;
}
.heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.account {
  text-align: right;
}
.quiet {
  background: transparent;
  color: #284b40;
  border: 1px solid #bdc7b9;
  padding: 9px 14px;
}
.quiet:hover {
  background: #e4e9df;
}
.grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 24px;
  margin-top: 24px;
}
.upload,
.library {
  border: 1px solid #d2dacd;
  border-radius: 16px;
  padding: 32px;
  background: #fffdf7;
}
.upload {
  background: #e6eddd;
}
.upload p {
  line-height: 1.65;
}
label {
  display: block;
  margin: 26px 0 12px;
  font-weight: 600;
}
label span {
  float: right;
  font-size: 12px;
  font-weight: 400;
}
input {
  display: block;
  width: 100%;
  margin-bottom: 24px;
  font: inherit;
}
input::file-selector-button {
  padding: 12px;
  border: 1px solid #b2bda9;
  border-radius: 6px;
  background: #fffdf7;
  margin-right: 10px;
}
.library-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.file {
  padding: 22px 0;
  border-top: 1px solid #dde2d8;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
}
.file strong {
  display: block;
  overflow-wrap: anywhere;
}
.file small {
  display: block;
  line-height: 1.7;
  color: #66776f;
}
.file a {
  color: #284b40;
  white-space: nowrap;
}
.empty {
  padding: 45px 0;
  color: #6b7a71;
}
#status {
  line-height: 1.6;
  padding-top: 18px;
}
footer {
  border-top: 1px solid #d8ded6;
  border-bottom: 0;
  font-size: 12px;
  color: #69766e;
}
[hidden] {
  display: none !important;
}
@media (max-width: 700px) {
  header,
  footer {
    gap: 20px;
  }
  .badge {
    font-size: 8px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .account {
    text-align: left;
  }
  main {
    padding-top: 36px;
  }
  h1 {
    letter-spacing: -2px;
  }
  .upload,
  .library {
    padding: 24px;
  }
  .file {
    align-items: flex-start;
    flex-direction: column;
  }
  footer span {
    max-width: 140px;
    text-align: right;
  }
}
#editor,
#job-history,
#review {
  margin-top: 28px;
}
.replacement {
  display: flex;
  gap: 12px;
  margin: 16px 0;
  align-items: center;
}
.replacement input,
.replacement select {
  margin: 0;
  min-width: 0;
  flex: 1;
  padding: 12px;
  border: 1px solid #b8c4b1;
  border-radius: 6px;
  background: #fff;
  font: inherit;
}
.preview-page {
  margin: 24px 0;
}
.preview-page img {
  display: block;
  max-width: 100%;
  border: 1px solid #d2dacd;
  background: #fff;
}
.preview-page input {
  display: inline;
  width: auto;
  margin: 0;
}
#generated-download {
  display: inline-block;
  padding: 16px;
  background: #284b40;
  color: white;
  border-radius: 8px;
}
@media (max-width: 700px) {
  .replacement {
    flex-direction: column;
    align-items: stretch;
  }
  .file {
    flex-wrap: wrap;
  }
  .file button {
    width: 100%;
  }
}

#business,
#template-mapper,
#document-library {
  margin-top: 28px;
}
.mapping-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.mapping-grid label {
  margin: 10px 0;
}
select,
textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #b8c4b1;
  border-radius: 6px;
  font: inherit;
  background: #fff;
  color: inherit;
}
form input:not([type="checkbox"]) {
  padding: 12px;
  border: 1px solid #b8c4b1;
  border-radius: 6px;
}
input[type="checkbox"] {
  display: inline;
  width: auto;
  margin: 0;
}
.item-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 8px;
  margin: 20px 0;
}
.item-row input {
  min-width: 0;
  margin: 0;
}
.item-row button {
  grid-column: 1/-1;
}
#calculated {
  line-height: 1.8;
  font-weight: 600;
}
@media (max-width: 700px) {
  .mapping-grid {
    grid-template-columns: 1fr;
  }
  .item-row {
    grid-template-columns: 1fr;
  }
  .mapping-grid label {
    min-width: 0;
  }
}
#document-fields { border: 0; padding: 0; margin: 0; min-width: 0; }
#documents .file { flex-wrap: wrap; }
#documents .file > div { flex: 1 1 100%; overflow-wrap: anywhere; }
#documents details { flex: 1 1 100%; }
#documents summary { cursor: pointer; padding: 12px 0; }
#documents details p { line-height: 1.8; overflow-wrap: anywhere; }
