.agreement-page { background: #f5f1f7; }
.agreement-shell { max-width: 1050px; padding-top: 140px; padding-bottom: 80px; }
.agreement-intro { max-width: 760px; margin-bottom: 35px; }
.agreement-intro h1 { font-size: clamp(2rem,4vw,3rem); line-height: 1.2; margin-bottom: 24px; }
.agreement-intro p { margin-bottom: 20px; }
.privacy-note { padding: 24px; background: #eee3f3; border-left: 3px solid #8e44ad; border-radius: 8px; font-size: .9rem; }
.privacy-note strong { display: block; margin-bottom: 8px; }
.agreement-tools { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 14px; }
.secondary-button { font: 500 .9rem Poppins,sans-serif; padding: 10px 18px; color: #793894; background: white; border: 1px solid #d6c0df; border-radius: 30px; cursor: pointer; }
.secondary-button:hover { background: #eee3f3; color: #793894; }
.agreement-jump { display: flex; flex-wrap: wrap; gap: 8px 24px; padding: 16px 0; margin-bottom: 18px; }
.agreement-jump a { font-size: .9rem; color: #793894; }
.required-note { font-size: .85rem; margin-bottom: 24px; }
.agreement-section { padding: 32px; margin-bottom: 24px; background: white; border: 1px solid #e5d8eb; border-radius: 12px; scroll-margin-top: 100px; }
.agreement-section h2 { font-size: 1.8rem; margin-bottom: 24px; }
.agreement-section h3 { font-size: 1.3rem; margin: 30px 0 20px; }
.agreement-section p { margin-bottom: 18px; }
.agreement-note { font-size: .86rem; padding: 14px; background: #f5f1f7; border-radius: 6px; }
.agreement-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; margin: 20px 0 30px; }
.agreement-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.agreement-field > label { font-size: .86rem; font-weight: 500; color: #2c3e50; }
.agreement-field input,.agreement-field textarea { width: 100%; padding: 11px 12px; border: 1px solid #cdbdd4; border-radius: 6px; font: .92rem Poppins,sans-serif; color: #2c3e50; background: white; }
.agreement-field textarea { min-height: 92px; resize: vertical; }
.agreement-field input:focus,.agreement-field textarea:focus { outline: 2px solid #8e44ad; outline-offset: 2px; }
.field-help { font-size: .75rem; color: #625569; }
.agreement-table { margin: 22px 0; }
.agreement-record { border: 1px solid #e0d3e6; border-radius: 8px; padding: 20px; margin-bottom: 16px; }
.agreement-record h4 { font: 600 1rem Poppins,sans-serif; margin-bottom: 14px; }
.agreement-record .agreement-fields { margin-bottom: 0; }
.choice-list { display: flex; flex-wrap: wrap; gap: 14px; margin: 10px 0; }
.choice-list label,.acknowledgement { display: flex; align-items: flex-start; gap: 10px; font-size: .9rem; }
.choice-list input,.acknowledgement input,.signature-consent input { accent-color: #8e44ad; min-width: 18px; width: 18px; height: 18px; margin-top: 4px; flex-shrink: 0; }
.acknowledgement { margin: 18px 0; }
.agreement-section fieldset { border: 0; padding: 0; min-width: 0; }
.agreement-section legend { font-weight: 500; font-size: .9rem; }
.signature-card { padding: 24px; background: #faf8fb; border: 1px solid #dfd0e5; border-radius: 8px; margin: 20px 0; }
.signature-card h4 { font: 600 1rem Poppins,sans-serif; margin-bottom: 20px; }
.signature-card canvas { display: block; width: 100%; height: 150px; border: 1px solid #b9a5c4; border-radius: 6px; background: white; touch-action: none; margin: 12px 0; }
.signature-card .draw-panel[hidden] { display: none; }
.signature-consent { display: flex; gap: 12px; font-size: .86rem; margin-top: 18px; }
.signature-tabs { display: flex; gap: 20px; margin: 16px 0; }
.signature-tabs input { accent-color: #8e44ad; }
.signature-date { max-width: 260px; margin-top: 18px; }
.download-panel { background: white; border: 1px solid #e0d3e6; border-radius: 12px; padding: 32px; }
.download-panel h2 { font-size: 1.8rem; margin-bottom: 20px; }
.download-panel p { margin-bottom: 24px; }
#agreementStatus,#downloadResult { padding: 12px 0; font-size: .9rem; }
.error-status { color: #9b2536; font-weight: 500; }
.source-notes { margin-top: 30px; padding: 22px; border: 1px solid #d9c8e1; border-radius: 8px; }
.source-notes summary { cursor: pointer; font-weight: 500; }
.source-notes p { font-size: .85rem; margin-top: 18px; }
.source-notes h3 { font-size: 1.2rem; margin-top: 24px; }
@media(max-width:650px) {
    .agreement-shell { padding-top: 115px; }
    .agreement-section,.download-panel { padding: 22px 18px; }
    .agreement-fields { grid-template-columns: 1fr; }
    .agreement-record,.signature-card { padding: 18px 14px; }
    .agreement-tools { gap: 10px; }
    .agreement-section h2 { font-size: 1.5rem; }
    #downloadSigned { width: 100%; padding: 14px 18px; }
}
