:root { --red: #ee0000; --ink: #1f2328; --muted: #59636e; --line: #e3e5e8; --bg: #f3f4f6; --card: #ffffff; --sig: #10305a; }
[hidden] { display: none !important; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 Inter, system-ui, sans-serif; }
.top { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; background: var(--card); border-bottom: 1px solid var(--line); }
.logo { font-size: 20px; font-weight: 800; color: var(--red); letter-spacing: -.3px; }
.logo span { color: var(--ink); font-weight: 600; }
.secure, .verified { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); }
.verified { color: #1a7f37; font-weight: 600; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 24px 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 24px; }
.narrow { max-width: 520px; margin: 24px auto; }
h1 { margin: 6px 0 12px; font-size: 26px; line-height: 1.2; }
h2 { margin: 0; font-size: 16px; }
.eyebrow { margin: 0; font-size: 13px; color: var(--muted); }
.lead { color: #3d444d; }
.muted { color: var(--muted); font-size: 12px; margin: 0; }
.alert { padding: 10px 12px; border: 1px solid #f5c2c7; border-radius: 8px; background: #fff5f5; color: #8a1c1c; font-size: 14px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
label { font-size: 13px; font-weight: 600; }
input, textarea { width: 100%; padding: 10px 12px; border: 1px solid #d0d5da; border-radius: 8px; font: inherit; color: var(--ink); background: #fff; }
input:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--red) 35%, transparent); border-color: var(--red); }
.code { height: 56px; font-size: 26px; font-weight: 700; letter-spacing: .3em; text-align: center; border: 2px solid var(--ink); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 18px; border: 1px solid #d0d5da; border-radius: 10px; background: #fff; color: var(--ink); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn.primary { border: 0; background: var(--red); color: #fff; font-size: 16px; }
.btn.link { border: 0; background: none; color: #067d8e; min-height: 44px; }
.btn.small { min-height: 32px; padding: 0 10px; font-size: 12px; }
.sign-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
.letter { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.letter-head { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.letter-head a { color: #067d8e; font-weight: 600; }
.pages { display: flex; flex-direction: column; gap: 12px; }
.pages canvas { width: 100%; height: auto; border: 1px solid #dfe2e6; border-radius: 4px; box-shadow: 0 1px 3px rgba(0,0,0,.06); background: #fff; }
.sign-panel { position: sticky; top: 16px; }
.tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid #d0d5da; border-radius: 8px; overflow: hidden; }
.tab { min-height: 40px; border: 0; background: #fff; color: #3d444d; font: inherit; font-weight: 600; cursor: pointer; }
.tab.is-on { background: var(--ink); color: #fff; }
.typed { min-height: 64px; border-bottom: 2px solid var(--ink); padding: 0 6px 4px; display: flex; align-items: flex-end; font-family: "Dancing Script", cursive; font-size: 36px; color: var(--sig); }
.pad { position: relative; }
.pad canvas { width: 100%; height: 132px; border: 1px dashed #b4bbc3; border-radius: 8px; background: #fbfbfc; touch-action: none; }
.pad .btn { position: absolute; top: 6px; right: 6px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 13px; color: #3d444d; }
.consent input { width: 18px; height: 18px; margin-top: 2px; flex: 0 0 auto; accent-color: var(--red); }
.decline { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.decline summary { cursor: pointer; color: var(--muted); font-size: 14px; font-weight: 600; min-height: 32px; }
.tick { width: 56px; height: 56px; border-radius: 50%; background: #dafbe1; color: #1a7f37; display: flex; align-items: center; justify-content: center; }
.note { margin-top: 18px; padding: 14px; border-radius: 10px; background: #f6f8fa; font-size: 13px; }
.foot { max-width: 1120px; margin: 0 auto; padding: 16px; font-size: 11px; color: #6b7480; }
@media (max-width: 860px) {
  .sign-grid { grid-template-columns: 1fr; }
  .sign-panel { position: static; }
  .card { padding: 18px; }
}
