:root {
  color-scheme: light;
  --text: #1c1c1c;
  --muted: #5c6570;
  --line: #d5d8dd;
  --req: #d23b2e;
  --btn: #3d6e96;
  --btn-hover: #325a7b;
  --bg: #fff;
  --alert: #fdecea;
  --alert-text: #8a1f14;
  --focus: #1d4e89;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -40px;
  background: #fff;
  padding: 8px 12px;
  z-index: 2;
}
.skip-link:focus { top: 8px; }

.topbar {
  position: relative;
  padding: 28px 16px 4px;
  text-align: center;
}

.logo-link img {
  height: 52px;
  width: auto;
  display: inline-block;
}

.top-nav {
  position: absolute;
  right: 20px;
  top: 18px;
  display: flex;
  gap: 14px;
  font-size: 14px;
}

.top-nav a, .linkish, a {
  color: #24527a;
}

.linkish {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
}

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 8px 24px 64px;
}

h1 {
  font-size: 28px;
  font-weight: 500;
  margin: 12px 0 22px;
}

.lede, .muted, .signed-in { color: var(--muted); }

.hidden { display: none !important; }

.field {
  display: block;
  margin: 0 0 18px;
}

.field > span, .sig-label, .field > label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
}

.req { color: var(--req); }

input[type="text"], input[type="email"], textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px 10px;
  font: inherit;
  font-size: 16px;
  background: #fff;
  color: var(--text);
}

input:focus, textarea:focus, button:focus-visible, a:focus-visible, .file-drop:focus-within {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.file-drop {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  border: 1px dashed #c5c9d0;
  border-radius: 4px;
  padding: 12px 16px;
  cursor: pointer;
  color: #6b7280;
}

.file-drop input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  font-size: 16px;
}

.upload-icon {
  width: 22px;
  height: 22px;
  color: #8b939e;
}

.file-names {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  color: var(--muted);
  font-size: 14px;
}

.file-status {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.file-names button {
  background: none;
  border: 0;
  color: #24527a;
  font: inherit;
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.form-actions { text-align: center; margin-top: 8px; }
.form-actions-left { text-align: left; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

.btn {
  display: inline-block;
  border-radius: 6px;
  padding: 8px 22px;
  font: inherit;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary { background: var(--btn); color: #fff; }
.btn-primary:hover { background: var(--btn-hover); }
.btn-quiet { background: #fff; border-color: var(--line); color: var(--text); }
.btn:disabled { opacity: 0.6; cursor: wait; }

.alert {
  background: var(--alert);
  color: var(--alert-text);
  border-radius: 4px;
  padding: 10px 12px;
  margin: 0 0 16px;
}

.table-scroll { overflow-x: auto; }

.list {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.list th, .list td {
  text-align: left;
  padding: 8px 10px 8px 0;
  border-bottom: 1px solid #eee;
  white-space: nowrap;
}

.list button {
  background: none;
  border: 0;
  padding: 0;
  color: #24527a;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
}

.facts { margin: 0 0 12px; }
.facts div { margin: 0 0 8px; }
.facts dt { font-size: 13px; color: var(--muted); }
.facts dd { margin: 0; }

.coa { color: var(--req); font-size: 14px; letter-spacing: 0.02em; }

.recipients { font-size: 14px; }

.row-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }

#signature-pad {
  width: 100%;
  max-width: 600px;
  height: 160px;
  border: 1px solid var(--line);
  border-radius: 4px;
  touch-action: none;
  background: #fff;
  display: block;
}

@media (max-width: 700px) {
  .top-nav { position: static; justify-content: center; margin-top: 10px; }
  .wrap { padding: 4px 16px 48px; }
  h1 { font-size: 24px; }
  .list th, .list td { white-space: normal; }
}
