:root { --brand: #333333; --brand-ink: #ffffff; --ink: #1d1d1f; --muted: #5f6368; --line: #dadce0; --bg: #ffffff; --soft: #f6f7f8; }
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; background: var(--brand); color: var(--brand-ink); }
.bar .name { color: inherit; text-decoration: none; font-weight: 700; font-size: 18px; display: flex; align-items: center; gap: 10px; }
.bar img { max-height: 36px; max-width: 160px; }
.bar button { background: transparent; color: inherit; border: 1px solid currentColor; }
main { max-width: 860px; margin: 0 auto; padding: 16px; }
h1 { font-size: 24px; margin: 8px 0 12px; }
h2 { font-size: 18px; margin: 24px 0 8px; }
.muted { color: var(--muted); }
.card { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin: 8px 0; background: var(--bg); }
.card .row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; }
button, .btn { font: inherit; padding: 9px 16px; border-radius: 6px; border: 1px solid var(--line); background: var(--soft); color: var(--ink); cursor: pointer; text-decoration: none; display: inline-block; }
button.primary, .btn.primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
button:disabled { opacity: .55; cursor: default; }
input[type=email], input[type=text] { font: inherit; padding: 9px 10px; border: 1px solid var(--line); border-radius: 6px; width: 100%; max-width: 420px; }
label { display: block; margin: 10px 0 4px; font-weight: 600; }
.note { padding: 10px 12px; border-radius: 6px; background: var(--soft); margin: 10px 0; }
.note.bad { background: #fdecea; }
.note.ok { background: #e6f4ea; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
td.num, th.num { text-align: right; white-space: nowrap; }
tr.comp td { color: var(--muted); font-size: 14px; }
.scroll { overflow-x: auto; }
.doc { border: 1px solid var(--line); border-radius: 8px; padding: 16px; }
.doc dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0; }
.doc dt { color: var(--muted); }
.doc dd { margin: 0; }
.terms { white-space: pre-wrap; font-size: 14px; max-height: 320px; overflow: auto; border: 1px solid var(--line); padding: 10px; border-radius: 6px; background: var(--soft); }
.pad-wrap { border: 2px dashed var(--line); border-radius: 8px; background: #fff; touch-action: none; max-width: 600px; }
canvas.pad { display: block; width: 100%; height: 180px; touch-action: none; cursor: crosshair; }
.tabs { display: flex; gap: 6px; margin: 8px 0; }
.tabs button[aria-pressed=true] { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.consent input { margin-top: 5px; width: 20px; height: 20px; flex: none; }
.sig img { max-width: 320px; max-height: 120px; border-bottom: 1px solid var(--ink); }
.sig .typed { font: italic 32px/1.2 "Brush Script MT", "Segoe Script", cursive; border-bottom: 1px solid var(--ink); display: inline-block; padding: 0 6px; }
.evidence { font-size: 13px; color: var(--muted); word-break: break-all; }
.foot { max-width: 860px; margin: 24px auto; padding: 0 16px 24px; color: var(--muted); font-size: 14px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
@media print {
  .bar, .foot, .actions, .noprint { display: none !important; }
  main { max-width: none; padding: 0; }
  .doc { border: 0; padding: 0; }
  .terms { max-height: none; overflow: visible; border: 0; background: none; }
}
