:root{
  --magenta:#e5005b;--red:#d7194f;--dark:#151515;--muted:#707070;
  --line:#dedede;--pale:#faf7f8;--white:#fff;
}
*{box-sizing:border-box}
body{margin:0;font-family:Arial,Helvetica,sans-serif;background:#f4f4f4;color:var(--dark)}
.topbar{height:64px;background:#111;color:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 32px;position:sticky;top:0;z-index:10}
.logo{font-weight:900;letter-spacing:1.6px}.logo span{color:var(--magenta)}
.user-pill{font-size:12px;color:#ddd}
.shell{max-width:1120px;margin:0 auto;padding:42px 24px}
.auth-wrap{min-height:75vh;display:grid;place-items:center}
.card{background:#fff;border:1px solid var(--line);border-radius:10px;padding:28px;box-shadow:0 8px 30px rgba(0,0,0,.05);margin-bottom:20px}
.auth-card{width:min(460px,100%)}.narrow{max-width:720px;margin:30px auto}
.eyebrow{font-size:11px;font-weight:800;letter-spacing:1.6px;color:var(--magenta);margin-bottom:8px}
h1{font-size:28px;margin:0 0 10px}h2{font-size:18px}
.muted{color:var(--muted);line-height:1.55}
label{display:block;font-size:13px;font-weight:700;margin:16px 0}
input{display:block;width:100%;margin-top:7px;padding:12px 13px;border:1px solid #cfcfcf;border-radius:7px;font:inherit;background:#fff}
button,.button{display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:7px;padding:11px 17px;font-weight:800;text-decoration:none;cursor:pointer;font-size:13px}
.primary{background:var(--magenta);color:#fff}.ghost{background:#fff;color:#222;border:1px solid #ccc}
.notice{background:var(--pale);border-left:4px solid var(--magenta);padding:12px 14px;margin:18px 0;color:#444;font-size:13px}
.page-head{display:flex;justify-content:space-between;gap:20px;align-items:flex-start;margin-bottom:20px}
.contract-row{display:flex;justify-content:space-between;gap:20px;align-items:center;padding:18px 0;border-bottom:1px solid #eee}
.contract-row:last-child{border-bottom:0}.contract-title{font-weight:900;margin-bottom:4px}
.empty{text-align:center;padding:50px 20px;color:var(--muted)}
.choice-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}
.choice-card{background:#fff;border:1px solid #ddd;border-radius:10px;padding:30px;text-decoration:none;color:#151515;display:flex;flex-direction:column;gap:8px;min-height:180px}
.choice-card strong{font-size:12px;color:var(--magenta)}.choice-card span{font-size:23px;font-weight:900}.choice-card small{color:#777;line-height:1.5}
.choice-card.accent{border-color:var(--magenta);box-shadow:0 8px 25px rgba(229,0,91,.08)}
.progress{display:flex;gap:5px;max-width:720px;margin:0 auto 18px}.progress span{height:4px;flex:1;background:#ddd;border-radius:4px}.progress span.active{background:var(--magenta)}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 20px}.form-grid .wide{grid-column:1/-1}
.viewer-head{position:sticky;top:64px;z-index:5;background:#f4f4f4;border-bottom:1px solid #ddd;padding:12px 0;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:12px;margin-bottom:18px}.viewer-head>*:last-child{justify-self:end}
.document-frame{background:#fff;border:1px solid #ccc;box-shadow:0 8px 30px rgba(0,0,0,.08);padding:30px;overflow:auto}
canvas{width:100%;height:auto;border:2px dashed #bbb;border-radius:8px;background:#fff;touch-action:none}
.signature-actions{display:flex;justify-content:space-between;margin-top:14px}.error{color:#c0002b;font-weight:700}
@media(max-width:700px){.choice-grid,.form-grid{grid-template-columns:1fr}.form-grid .wide{grid-column:auto}.topbar{padding:0 15px}.shell{padding:25px 14px}.viewer-head{grid-template-columns:1fr}.viewer-head>*:last-child{justify-self:start}.document-frame{padding:12px}.page-head{flex-direction:column}.contract-row{align-items:flex-start;flex-direction:column}}
