.qw-modal{background:#fff;border-radius:12px;max-width:760px;width:100%;max-height:90vh;box-sizing:border-box;color:#333;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 6px 18px rgba(0,0,0,0.1);font-family:"Inter",system-ui,sans-serif;margin:0 auto}
.qw-modal-inline{max-height:600px}
.qw-header{padding:20px 24px 0;flex-shrink:0}
.qw-progress{height:4px;background:#e8e8e8;border-radius:2px;margin-bottom:8px;overflow:hidden}
.qw-progress-fill{height:100%;background:#e04e3a;border-radius:2px;transition:width 0.3s ease}
.qw-progress-text{font-size:12px;color:#999;margin-bottom:0}
.qw-content{flex:1;overflow-y:auto;padding:16px 24px}
.qw-footer{flex-shrink:0;padding:12px 24px 20px;border-top:1px solid #e8e8e8}
.qw-title{font-weight:700;font-size:18px;margin:0 0 12px;line-height:1.4;color:#333}
.qw-text{font-size:15px;color:#555;line-height:1.6;margin:0 0 16px;white-space:pre-line}
.qw-divider{display:flex;align-items:center;margin:18px 0 14px;color:#999;font-size:12px;font-weight:600;letter-spacing:0.5px;text-transform:uppercase}
.qw-divider::before,.qw-divider::after{content:"";flex:1;height:1px;background:#e8e8e8}
.qw-divider span{padding:0 12px}
.qw-bullet{font-size:14px;color:#444;line-height:1.55;margin:0 0 12px;padding-left:4px}
.qw-bullet b{color:#222}
.qw-image{width:100%;border-radius:8px;margin-bottom:16px;display:block}
.qw-buttons{display:flex;flex-direction:column;gap:8px;margin-bottom:8px}
.qw-buttons:last-child{margin-bottom:0}
.qw-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:8px}
.qw-grid:last-child{margin-bottom:0}
.qw-buttons+.qw-grid,.qw-grid+.qw-buttons,.qw-buttons+.qw-buttons,.qw-grid+.qw-grid{margin-top:0}
.qw-btn{padding:14px 16px;border-radius:8px;font-size:14px;cursor:pointer;text-align:left;line-height:1.4;width:100%;box-sizing:border-box;background:#f4f4f4;border:2px solid transparent;color:#333;font-family:inherit;transition:all 0.15s ease;display:flex;align-items:center;gap:10px}
@media(hover:hover){.qw-btn:hover{background:#eee;border-color:#e04e3a}}
.qw-btn-selected{background:#fef2f0;border-color:#e04e3a}
.qw-btn-primary{background:#e04e3a;color:#fff;border:none;padding:16px;font-size:15px;font-weight:600;border-radius:8px;cursor:pointer;width:100%;box-sizing:border-box;text-align:center;font-family:inherit;transition:background 0.15s}
.qw-btn-primary:hover{background:#c9443a}
.qw-btn-primary:disabled{background:#ccc;cursor:not-allowed}
.qw-btn-check{flex-shrink:0;width:18px;height:18px;border-radius:4px;border:2px solid #ccc;display:inline-block;position:relative;transition:all 0.15s}
.qw-btn-check-selected{border-color:#e04e3a;background:#e04e3a}
.qw-btn-check-selected::after{content:"✓";position:absolute;top:-1px;left:2px;color:#fff;font-size:12px;font-weight:bold}
.qw-multi-label{font-size:14px;color:#888;margin:16px 0 8px;font-weight:500}
.qw-radio{flex-shrink:0;width:18px;height:18px;border-radius:50%;border:2px solid #e04e3a;display:inline-block;position:relative;transition:border-color 0.15s}
.qw-radio-selected{border-color:#e04e3a}
.qw-radio-selected::after{content:"";position:absolute;top:3px;left:3px;width:8px;height:8px;border-radius:50%;background:#e04e3a}
.qw-input{width:100%;padding:14px 16px;font-size:16px;border:2px solid #e0e0e0;border-radius:8px;box-sizing:border-box;font-family:inherit;outline:none;transition:border-color 0.15s}
.qw-input:focus{border-color:#e04e3a}
.qw-input-error{border-color:#e04e3a}
.qw-error-text{color:#e04e3a;font-size:13px;margin-top:6px}

.reference-flow{margin:0 0 20px}.reference-flow .qw-modal{display:flex;max-height:none;box-shadow:none}.reference-flow .qw-content{overflow:visible}.reference-flow .qw-progress-fill{width:14.2857%}.reference-flow .qw-footer[hidden]{display:none}.reference-flow button:focus-visible{outline:2px solid #e04e3a;outline-offset:2px}.reference-flow .qw-title:focus{outline:none}.reference-flow .qw-consent{display:flex;align-items:flex-start;gap:8px;margin-top:14px;font-size:13px;color:#666;line-height:1.4;cursor:pointer}.reference-flow .qw-consent input{margin-top:2px;flex-shrink:0}.reference-flow .qw-consent a{color:#e04e3a;text-decoration:underline}.reference-flow .qw-multi-label{text-transform:none;letter-spacing:normal}.reference-flow .qw-input{background:#fff;color:#333}.reference-flow .qw-area-choice{margin-top:12px}.reference-flow .qw-error-text[hidden]{display:none}@media(max-width:700px){.reference-flow{margin:0 -8px 20px}}

/* Isolate the new form controls from the legacy landing-page input reset. */
.reference-flow #reference-quiz-form,
.reference-flow .qw-content,
.reference-flow .qw-footer { min-width: 0; }
.reference-flow .qw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.reference-flow .qw-btn { min-width: 0; overflow-wrap: anywhere; }
.reference-flow .qw-input {
 display: block;
 min-width: 0;
 height: 54px;
 padding: 13px 16px;
 border: 2px solid #e0e0e0;
 border-radius: 8px;
 font: 400 16px/1.5 Inter, system-ui, sans-serif;
}
.reference-flow .qw-input:focus { border: 2px solid #e04e3a; }
.reference-flow .qw-input:focus::placeholder { color: #888 !important; }
.reference-flow .qw-consent { width: 100%; gap: 8px; }
.reference-flow .qw-consent > input[type="checkbox"] {
 display: block;
 flex: 0 0 18px;
 width: 18px;
 height: 18px;
 min-width: 18px;
 margin: 1px 0 0;
 padding: 0;
 border: initial;
 border-radius: 0;
 background: initial;
 -webkit-appearance: checkbox;
 -moz-appearance: checkbox;
 appearance: auto;
 accent-color: #e04e3a;
 cursor: pointer;
}
.reference-flow .qw-consent > span {
 flex: 1 1 0;
 min-width: 0;
 overflow-wrap: anywhere;
}
.reference-flow .qw-consent > input:focus-visible,
.reference-flow .qw-input:focus-visible,
.reference-flow button:focus-visible {
 outline: 2px solid #e04e3a !important;
 outline-offset: 3px !important;
}
.reference-flow .qw-error-text { overflow-wrap: anywhere; }
