:root {
  --brand: #ac8433;
  --ink: #23211f;
  --muted: #6f6a63;
  --line: #e6e1d9;
  --bg: #f6f3ee;
  --card: #fff;
  --good: #2f7d4f;
  --warn: #b5522b;
  --radius: 12px;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 15px; line-height: 1.5; }
a { color: var(--brand); }
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; font-weight: 600; line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: 26px; } h2 { font-size: 20px; } h3 { font-size: 17px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.grow { flex: 1; }
.stack > * + * { margin-top: 12px; }
.hidden { display: none !important; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.card + .card { margin-top: 16px; }
.card h2 { display: flex; align-items: center; gap: 10px; }

button, .btn { white-space: nowrap;
  font: inherit; cursor: pointer; border-radius: 999px; padding: 8px 16px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
}
button:hover, .btn:hover { border-color: var(--brand); }
button.primary, .btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
button.primary:hover { filter: brightness(1.08); }
button.danger { color: var(--warn); }
button.link { border: none; background: none; padding: 0; color: var(--brand); }
button:disabled { opacity: .5; cursor: default; }

input, select, textarea {
  font: inherit; width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
}
textarea { min-height: 90px; resize: vertical; }
textarea.tall { min-height: 340px; font-family: Consolas, "Cascadia Mono", monospace; font-size: 13.5px; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--brand) 40%, transparent); border-color: var(--brand); }
label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); }
label > input, label > select, label > textarea { margin-top: 4px; font-weight: 400; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 700px) { .grid2, .grid3 { grid-template-columns: 1fr; } }

.pill { font-family: "Segoe UI", system-ui, sans-serif; display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: #eee; color: #555; white-space: nowrap; }
.pill.good { background: #e3f2e8; color: var(--good); }
.pill.warn { background: #fbe6dc; color: var(--warn); }
.pill.info { background: #e6eef9; color: #2f5d94; }
.pill.brand { background: color-mix(in srgb, var(--brand) 16%, #fff); color: color-mix(in srgb, var(--brand) 80%, #000); }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr.click { cursor: pointer; }
tr.click:hover td { background: #faf8f4; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: #23211f; color: #fff; padding: 10px 18px; border-radius: 999px; z-index: 50; font-size: 14px; }
.toast.err { background: var(--warn); }

/* Contract / proposal text */
.doc { font-family: Georgia, "Times New Roman", serif; font-size: 16px; line-height: 1.7; }
.doc h2 { font-size: 21px; margin-top: 1.2em; } .doc h3 { font-size: 17px; margin-top: 1.1em; }
.doc p { margin: 0 0 1em; }
.sig { font-family: "Brush Script MT", "Segoe Script", cursive; font-size: 30px; line-height: 1.1; }
.sigbox { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 18px; }
.audit { font-size: 12px; color: var(--muted); word-break: break-all; }

@media print {
  body { background: #fff; }
  .noprint { display: none !important; }
  .card { border: none; padding: 0; }
}
