.contract-body { background: var(--bg); }

.contract-main {
  max-width: 880px;
  margin: 0 auto;
  padding: clamp(1rem, 4vw, 2rem);
}

.contract-intro { margin: 1rem 0 2rem; }
.contract-intro h1 {
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -.015em;
  margin: .3rem 0 1rem;
  line-height: 1.05;
}
.contract-intro .lede { color: var(--ink-soft); max-width: 60ch; margin: 0 0 1rem; }
.req { color: var(--terracotta-deep); font-weight: 700; margin-left: .15rem; }
.lbl { display: inline; }
.hint-inline { font-style: normal; color: var(--muted); font-weight: 400; margin-left: .25rem; font-size: .85em; }

.legal-note {
  background: var(--bg-soft);
  border-left: 3px solid var(--terracotta);
  border-radius: 6px;
  padding: .75rem 1rem;
  font-size: .92rem;
  color: var(--ink-soft);
}
.legal-note summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.legal-note p { margin: .6rem 0 0; }

.legal-cb {
  background: color-mix(in oklab, var(--terracotta) 15%, transparent);
  border-radius: 8px;
  padding: .8rem 1rem;
  font-size: .92rem;
  color: var(--ink);
  margin: 0;
}

.contract-form { display: grid; gap: 1.25rem; }

.card-fs {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem clamp(1rem, 2.5vw, 1.5rem) 1.5rem;
  box-shadow: var(--shadow-sm);
}
.card-fs legend {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.05rem;
  padding: 0 .5rem;
  margin-left: -.5rem;
  color: var(--ink);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .9rem 1rem;
  margin-top: .5rem;
}
.grid-2 .span-2 { grid-column: 1 / -1; }
.grid-2 .big input { font-size: 1.15rem; padding: .85rem 1rem; }

@media (max-width: 640px) {
  .grid-2 { grid-template-columns: 1fr; }
}

label {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  font-size: .88rem;
  font-weight: 500;
  color: var(--ink-soft);
}
label.chkrow {
  flex-direction: row;
  align-items: center;
  gap: .55rem;
  font-size: .95rem;
  color: var(--ink);
  font-weight: 400;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
input:not([type]),
select,
textarea {
  font: inherit;
  font-size: 1rem;
  padding: .65rem .8rem;
  border: 1.5px solid var(--line);
  border-radius: 9px;
  background: var(--bg);
  color: var(--ink);
  min-height: 44px;
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--terracotta);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--terracotta) 22%, transparent);
}
input[type="checkbox"], input[type="radio"] {
  width: 18px; height: 18px; accent-color: var(--terracotta-deep);
  min-height: 0;
}

.license-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: .65rem;
  margin-top: .5rem;
}
.lic {
  display: flex;
  gap: .6rem;
  align-items: flex-start;
  padding: .8rem .9rem;
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  font-weight: 400;
}
.lic:hover { border-color: color-mix(in oklab, var(--terracotta) 40%, var(--line)); }
.lic input { margin-top: 2px; }
.lic span { display: grid; gap: .15rem; }
.lic strong { color: var(--ink); font-weight: 600; }
.lic em { color: var(--muted); font-style: normal; font-size: .85rem; }
.lic:has(input:checked) {
  border-color: var(--terracotta);
  background: color-mix(in oklab, var(--terracotta) 8%, var(--bg));
}

.cond {
  display: none;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--line);
}
.cond.is-active { display: block; }
.cond-head {
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 .5rem;
  font-size: .92rem;
}
.mt { margin-top: .75rem; }

.chk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: .4rem .8rem;
}
.chk-grid label {
  flex-direction: row;
  align-items: center;
  gap: .55rem;
  font-size: .92rem;
  color: var(--ink);
  font-weight: 400;
  padding: .35rem 0;
}

.hint { color: var(--muted); font-size: .88rem; margin: .75rem 0 0; }

/* signature */
.sig-wrap {
  position: relative;
  border: 1.5px dashed var(--line);
  border-radius: 12px;
  padding: .5rem;
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0 38px,
      color-mix(in oklab, var(--ink) 6%, transparent) 38px 39px
    ),
    var(--bg);
  margin-top: .5rem;
}
#sigpad {
  display: block;
  width: 100%;
  height: clamp(180px, 30vw, 240px);
  touch-action: none;
  cursor: crosshair;
  border-radius: 8px;
}
.btn-sm { padding: .5rem 1rem; font-size: .88rem; min-height: 36px; margin-top: .5rem; }

.submit-row { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1rem; }

.status {
  margin-top: 1rem;
  padding: 1rem 1.2rem;
  border-radius: 10px;
  font-size: .95rem;
}
.status.is-loading {
  background: var(--bg-soft);
  color: var(--ink-soft);
}
.status.is-success {
  background: color-mix(in oklab, var(--sage) 25%, var(--bg));
  border: 1px solid var(--sage);
  color: var(--ink);
}
.status.is-error {
  background: color-mix(in oklab, var(--terracotta) 18%, var(--bg));
  border: 1px solid var(--terracotta);
  color: var(--ink);
}
.status a { color: var(--terracotta-deep); font-weight: 600; }

/* ---------- commission form additions ---------- */
.step-bar {
  display: flex;
  gap: .5rem;
  margin: 1rem 0 0;
  flex-wrap: wrap;
}
.step {
  padding: .35rem .75rem;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--muted);
  font-size: .82rem;
  font-weight: 600;
  border: 1px solid var(--line);
}
.step.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.page { display: none; }
.page.is-active { display: block; }

.opt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: .6rem;
  margin-top: .5rem;
}
.opt-grid-small { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
.opt {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  padding: .7rem .85rem;
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  font-weight: 400;
}
.opt input { margin-top: 3px; }
.opt span { display: grid; gap: .1rem; line-height: 1.25; }
.opt strong { color: var(--ink); font-weight: 600; font-size: .98rem; }
.opt em { color: var(--muted); font-style: normal; font-size: .82rem; }
.opt:hover { border-color: color-mix(in oklab, var(--terracotta) 40%, var(--line)); }
.opt:has(input:checked) {
  border-color: var(--terracotta);
  background: color-mix(in oklab, var(--terracotta) 8%, var(--bg));
}
.opt-tight { padding: .55rem .65rem; }
.opt-tight strong { font-size: 1.4rem; line-height: 1; }
.opt-tight em { font-size: .75rem; }

.chkrow em { color: var(--ink-soft); font-style: italic; }

/* ---------- thank-you view ---------- */
.thanks-view { display: block; padding: clamp(2rem, 6vw, 4rem) 0; }
.thanks-card {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 5vw, 3rem);
  text-align: center;
  max-width: 580px;
  margin: 0 auto;
}
.thanks-badge {
  display: inline-grid;
  place-items: center;
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--sage);
  color: var(--bg);
  margin-bottom: 1.25rem;
}
.thanks-card h1 {
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  letter-spacing: -.01em;
  margin: .25rem 0 .9rem;
}
.thanks-card .lede {
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 0 auto 1.5rem;
}
.thanks-meta { color: var(--muted); font-size: .9rem; margin: 0 0 1.5rem; }
.thanks-meta code {
  background: var(--bg);
  padding: .15rem .5rem;
  border-radius: 6px;
  border: 1px solid var(--line);
  font-size: .85rem;
}
.thanks-card .cta-row { justify-content: center; }

/* ---------- process & terms ---------- */
.process-fs legend { color: var(--terracotta-deep); }
.process-list, .terms-list {
  margin: .5rem 0 0;
  padding-left: 1.25rem;
  color: var(--ink-soft);
  font-size: .95rem;
  line-height: 1.55;
}
.process-list li, .terms-list li { margin-bottom: .55rem; }
.process-list strong, .terms-list strong { color: var(--ink); }

/* ---------- file upload ---------- */
.file-drop {
  display: block;
  padding: 0;
  border: 1.5px dashed color-mix(in oklab, var(--ink) 22%, transparent);
  border-radius: 12px;
  background: var(--bg-soft);
  cursor: pointer;
  transition: border-color .15s, background .15s;
  position: relative;
}
.file-drop:hover, .file-drop.is-drag {
  border-color: var(--terracotta);
  background: color-mix(in oklab, var(--terracotta) 8%, var(--bg));
}
.file-drop input {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  opacity: 0;
  cursor: pointer;
  min-height: 0;
}
.file-drop-label {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: 1.1rem 1.2rem;
  font-size: .92rem;
  color: var(--ink-soft);
  pointer-events: none;
}
.file-drop-label strong { color: var(--ink); font-weight: 600; }
.file-drop-label em { font-style: normal; color: var(--muted); font-size: .82rem; }
.file-drop-icon {
  display: inline-grid;
  place-items: center;
  width: 38px; height: 38px;
  background: var(--bg);
  color: var(--terracotta-deep);
  border-radius: 50%;
  border: 1px solid var(--line);
  flex-shrink: 0;
}
.file-list {
  list-style: none;
  margin: .75rem 0 0;
  padding: 0;
  display: grid;
  gap: .35rem;
}
.file-list li {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .55rem .7rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: .88rem;
}
.file-list .fname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.file-list .fsize { color: var(--muted); font-variant-numeric: tabular-nums; }
.file-list .fdel {
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--muted);
  padding: .15rem .4rem;
  border-radius: 6px;
  font-size: 1.05rem;
  line-height: 1;
}
.file-list .fdel:hover { color: var(--terracotta-deep); background: var(--bg-soft); }
.file-error {
  margin: .75rem 0 0;
  padding: .55rem .8rem;
  background: color-mix(in oklab, var(--terracotta) 15%, var(--bg));
  border-radius: 8px;
  font-size: .88rem;
  color: var(--ink);
}
