@font-face { font-family: "Dancing Script"; src: url(/public/fonts/DancingScript-Regular.ttf) format("truetype"); font-display: swap; }
@font-face { font-family: "Great Vibes"; src: url(/public/fonts/GreatVibes-Regular.ttf) format("truetype"); font-display: swap; }
@font-face { font-family: "Homemade Apple"; src: url(/public/fonts/HomemadeApple-Regular.ttf) format("truetype"); font-display: swap; }

:root {
  --ink: #1f1f1f; --muted: #5f5f5f; --line: #d9d4cc; --bg: #faf8f4; --card: #ffffff;
  --accent: #b23a2a; --accent-ink: #ffffff; --error: #b00020; --ok: #2e7d32; --focus: #1a73e8;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color: var(--ink); background: var(--bg); }
.wrap { max-width: 760px; margin: 0 auto; padding: 16px; }
header.site { display: flex; align-items: center; gap: 12px; padding: 12px 0 8px; border-bottom: 1px solid var(--line); }
header.site img { height: 44px; }
header.site .name { font-weight: 700; font-size: 1.1rem; }
header.site .sub { color: var(--muted); font-size: .9rem; }
main { padding: 8px 0 24px; }
h1 { font-size: 1.6rem; margin: 16px 0 8px; }
h2 { font-size: 1.2rem; margin: 28px 0 8px; padding-top: 12px; border-top: 1px solid var(--line); }
p.lead { color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 16px; margin: 12px 0; }
label { display: block; font-weight: 600; margin: 12px 0 4px; }
label .opt { font-weight: 400; color: var(--muted); font-size: .9rem; }
.help { color: var(--muted); font-size: .9rem; margin: 2px 0 0; }
input[type=text], input[type=email], input[type=tel], input[type=date], select, textarea {
  width: 100%; font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid #b8b2a8; border-radius: 6px; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus, button:focus, a:focus { outline: 3px solid var(--focus); outline-offset: 1px; }
textarea { min-height: 80px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1 1 200px; }
.row.dob > * { flex: 1 1 100px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; font-weight: 400; }
.check input { width: 22px; height: 22px; margin-top: 2px; flex: none; }
.radio { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0; font-weight: 400; }
.radio input { width: 22px; height: 22px; margin-top: 2px; flex: none; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 600; margin: 12px 0 4px; }
.err { color: var(--error); font-size: .9rem; margin: 4px 0 0; }
.invalid { border-color: var(--error) !important; }
.banner { padding: 12px 14px; border-radius: 6px; margin: 12px 0; }
.banner.error { background: #fdecea; color: var(--error); border: 1px solid #f5c2c0; }
.banner.info { background: #e8f0fe; color: #174ea6; border: 1px solid #c6dafc; }
.banner.ok { background: #e6f4ea; color: var(--ok); border: 1px solid #b7dfc1; }
button, .btn { font: inherit; font-size: 16px; font-weight: 600; padding: 12px 20px; border-radius: 6px; border: 1px solid transparent; cursor: pointer; text-decoration: none; display: inline-block; }
button.primary, .btn.primary { background: var(--accent); color: var(--accent-ink); }
button.secondary, .btn.secondary { background: #fff; color: var(--ink); border-color: #b8b2a8; }
button.small { padding: 6px 12px; font-size: 14px; }
.actions { margin: 20px 0; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.terms { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px; font-size: .95rem; }
.terms h2 { border: 0; padding: 0; margin: 18px 0 6px; font-size: 1.05rem; }
.terms h3 { font-size: 1rem; margin: 14px 0 4px; }
.terms-header { text-align: center; margin-bottom: 12px; }
.terms-header .biz { font-weight: 700; }
.terms-header .addr { color: var(--muted); font-size: .9rem; }
.terms-header .date { margin-top: 6px; }
.sig-tabs { display: flex; gap: 8px; margin: 8px 0; }
.sig-tabs button[aria-pressed=true] { background: var(--ink); color: #fff; border-color: var(--ink); }
.sig-pad { border: 1px dashed #9a948b; border-radius: 6px; background: #fff; width: 100%; height: 180px; touch-action: none; display: block; }
.sig-preview { font-size: 2.2rem; line-height: 1.2; min-height: 64px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; background: #fff; overflow: hidden; }
.font-options { display: flex; gap: 8px; flex-wrap: wrap; }
.font-options label { flex: 1 1 140px; margin: 0; border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; font-weight: 400; cursor: pointer; background: #fff; }
.font-options label.selected { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.font-options .sample { font-size: 1.6rem; line-height: 1.2; display: block; }
.font-dancing { font-family: "Dancing Script", cursive; }
.font-greatvibes { font-family: "Great Vibes", cursive; }
.font-homemade { font-family: "Homemade Apple", cursive; }
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
footer.site { border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; padding: 16px 0; display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; }
.minor { border-left: 3px solid var(--line); padding-left: 12px; margin: 12px 0; }
[hidden] { display: none !important; }
.ref { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.1rem; letter-spacing: .05em; }
.js-only { display: none; }
.js .js-only { display: initial; }
.js .no-js-only { display: none; }
/* admin */
.admin-nav { display: flex; gap: 16px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.admin-nav a { color: var(--ink); font-weight: 600; text-decoration: none; }
.admin-nav .spacer { flex: 1; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: .85rem; }
.tag { display: inline-block; font-size: .75rem; padding: 2px 6px; border-radius: 4px; background: #eee; color: #444; }
.tag.warn { background: #fdecea; color: var(--error); }
.tag.ok { background: #e6f4ea; color: var(--ok); }
details summary { cursor: pointer; font-weight: 600; padding: 8px 0; }
dl.meta { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; font-size: .9rem; }
dl.meta dt { color: var(--muted); }
dl.meta dd { margin: 0; word-break: break-all; }
iframe.pdf { width: 100%; height: 80vh; border: 1px solid var(--line); border-radius: 6px; }
@media (max-width: 480px) { .wrap { padding: 12px; } h1 { font-size: 1.35rem; } }
