/* Contracts additions. The estate token source above is retained in full. */
@font-face {
  font-family: Geist;
  src: url("/static/font/geist-400-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Inter;
  src: url("/static/font/inter-regular.otf") format("opentype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Inter;
  src: url("/static/font/inter-semibold.otf") format("opentype");
  font-weight: 500 600;
  font-display: swap;
}
:root {
  --contract-paper: #faf9f6;
  --contract-ink: #1a1a1a;
  --contract-muted: #6a6966;
  --contract-hairline: #deddd8;
  --contract-mark: #ff0033;
  --contract-white: #fff;
  --contract-black: #050505;
  --contract-soft: #b4b4b8;
  --contract-signed: #b5c4b8;
  --contract-shadow: 0 18px 65px rgba(0, 0, 0, 0.15);
  --contract-radius: 12px;
}
* {
  box-sizing: border-box;
}
button,
input,
textarea,
summary {
  font: inherit;
}
button,
a,
input,
textarea,
summary {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.48;
}
a {
  color: inherit;
}
svg {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
}
button svg,
a svg {
  vertical-align: middle;
}
button {
  color: inherit;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}
button {
  border: 0;
}
::selection {
  background: var(--ink);
  color: var(--bg);
}
.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 17px;
  border: 1px solid var(--line2);
  border-radius: 8px;
  background: var(--elev);
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition:
    background 0.18s,
    transform 0.18s;
}
.button:hover {
  background: var(--elev2);
}
.button.primary {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.button.primary:hover {
  opacity: 0.88;
}
.button.quiet {
  background: transparent;
}
.button.small {
  padding: 8px 12px;
  min-height: 44px;
}
.icon-button {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.icon-button:hover {
  background: var(--elev);
}
.text-button {
  min-height: 44px;
  padding: 8px 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--mut);
}
.field {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
}
.field label {
  font-size: 12px;
  color: var(--mut);
  font-weight: 500;
}
.field input,
.field textarea {
  width: 100%;
  min-height: 46px;
  background: var(--bg);
  border: 1px solid var(--line2);
  border-radius: 8px;
  color: var(--ink);
  padding: 13px 14px;
  resize: vertical;
  outline-offset: 1px;
  font-size: 14px;
}
.field input::placeholder,
.field textarea::placeholder {
  color: var(--mut);
}
.field textarea {
  line-height: 1.7;
}
.picker {
  position: relative;
}
.picker summary {
  cursor: pointer;
  list-style: none;
  min-height: 46px;
  border: 1px solid var(--line2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg);
  font-size: 14px;
}
.picker summary::-webkit-details-marker {
  display: none;
}
.pick-options {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  max-height: 300px;
  overflow: auto;
  border: 1px solid var(--line2);
  background: var(--elev);
  box-shadow: var(--contract-shadow);
  border-radius: 8px;
  z-index: 20;
  padding: 6px;
}
.pick-options button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 44px;
  border-radius: 4px;
  background: transparent;
  padding: 10px 12px;
  text-align: left;
  font-size: 13px;
}
.pick-options button:hover {
  background: var(--elev2);
}
.modal {
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line2);
  border-radius: var(--contract-radius);
  padding: 0;
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  box-shadow: var(--contract-shadow);
}
.modal.wide {
  width: min(1050px, calc(100vw - 32px));
}
.modal::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
}
.modal-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  position: sticky;
  top: 0;
  background: var(--card);
  z-index: 3;
}
.modal-head h2 {
  font-size: 20px;
  letter-spacing: -0.6px;
  font-weight: 400;
  margin: 0;
}
.modal-content {
  padding: 24px;
}
.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 26px;
}
.muted {
  color: var(--mut);
}
.tiny {
  font-size: 12px;
}
.error {
  color: var(--ink);
  padding: 16px;
  border-left: 2px solid var(--red);
  background: var(--elev);
  font-size: 13px;
  line-height: 1.6;
}
.empty {
  padding: 50px 26px;
  text-align: center;
}
.empty > svg {
  width: 34px;
  height: 34px;
  color: var(--mut);
}
.empty h3 {
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.6px;
}
.empty p {
  font-size: 14px;
  color: var(--mut);
  line-height: 1.65;
  max-width: 430px;
  margin: 0 auto 24px;
}
.pdf-page {
  width: 100%;
  aspect-ratio: 595/842;
  background: var(--contract-paper);
  margin-bottom: 20px;
  box-shadow: var(--contract-shadow);
}
.pdf-page canvas {
  display: block;
}
.pdf-loading {
  padding: 45px;
  text-align: center;
  color: var(--mut);
  line-height: 1.8;
}
.pdf-loading a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.checkline {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13px;
  line-height: 1.65;
  cursor: pointer;
}
.checkline input {
  appearance: none;
  width: 21px;
  height: 21px;
  flex: 0 0 21px;
  border: 1px solid var(--line2);
  border-radius: 4px;
  margin: 1px 0 0;
  background: var(--bg);
}
.checkline input:checked {
  background: var(--ink);
  box-shadow: inset 0 0 0 4px var(--bg);
}
#toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  background: var(--ink);
  color: var(--bg);
  padding: 15px 22px;
  border-radius: 8px;
  max-width: calc(100vw - 30px);
  font-size: 13px;
  line-height: 1.5;
  box-shadow: var(--contract-shadow);
  z-index: 100;
  transition: 0.2s;
}
#toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
#toast.bad {
  border-left: 3px solid var(--red);
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
