/* The compact profile card and its editor are scoped to the copy survey. */
.copy-survey-card,
.main[data-page="copy"] .copy-survey-card {
  display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:28px;
  min-height:140px;padding:32px 34px;background:#fff;border-radius:26px;
  box-shadow:0 7px 30px #20203605;
}
.copy-survey-card-copy { min-width:0;flex:1; }
.copy-survey-card h2 { font-size:24px!important;font-weight:650;line-height:1.5;margin:0; }
.copy-survey-card-summary {
  font-size:15px!important;line-height:1.8;color:#787880;margin:9px 0 0!important;
  overflow-wrap:anywhere;display:-webkit-box;-webkit-box-orient:vertical;
  -webkit-line-clamp:2;line-clamp:2;overflow:hidden;
}
.copy-survey-edit { flex-shrink:0;white-space:nowrap;font-size:16px;min-height:52px;padding:13px 28px; }
.copy-survey-edit:hover { background:#f5f5f7;border-color:#bcbcc5; }

/* A native dialog keeps the page behind the editor out of the tab order. */
body.copy-survey-dialog-open { overflow:hidden; }
.copy-survey-dialog:not([open]) { display:none; }
.copy-survey-dialog {
  padding:0;border:0;margin:auto;
  width:min(790px,calc(100vw - 64px));max-width:790px;
  height:min(850px,calc(100vh - 64px));height:min(850px,calc(100dvh - 64px));
  max-height:calc(100dvh - 64px);min-height:0;
  border-radius:24px;overflow:hidden;color:#1d1d1f;background:#fff;
  box-shadow:0 24px 100px #10102530;
}
.copy-survey-dialog::backdrop { background:#19192366;backdrop-filter:blur(3px); }
.copy-survey-dialog-shell { height:100%;display:flex;flex-direction:column;min-height:0; }
.copy-survey-dialog-header {
  display:flex;align-items:center;justify-content:space-between;gap:20px;
  padding:25px 30px 22px;border-bottom:1px solid #ededf1;flex-shrink:0;
}
.copy-survey-dialog-header>div:first-child { min-width:0; }
.copy-survey-dialog-header h2 { font-size:22px;font-weight:650;line-height:1.5;margin:0;padding:0; }
.copy-survey-dialog-header p { margin:5px 0 0;font-size:12px;line-height:1.7;color:#85858e; }
.copy-survey-dialog-tools { display:flex;align-items:center;gap:17px;flex-shrink:0; }
.copy-survey-dialog-tools button:not(.copy-survey-dialog-close) {
  background:none;border:0;color:var(--color-primary);font-size:13px;
  min-height:40px;padding:10px 0;white-space:nowrap;
}
.copy-survey-dialog-tools button:not(.copy-survey-dialog-close):hover:not(:disabled) { text-decoration:underline; }
.copy-survey-dialog-close {
  display:grid;place-items:center;flex-shrink:0;padding:0;border:0;
  background:#f5f5f7;border-radius:50%;width:35px;height:35px;min-height:35px;
  color:#777780;font-size:22px;line-height:1;
}
.copy-survey-dialog-close:hover:not(:disabled) { background:#ebebef;color:#1d1d1f; }
.copy-survey-dialog-form { display:flex;flex-direction:column;flex:1;min-height:0;margin:0;padding:0; }
.copy-survey-dialog-body.copy-survey {
  flex:1;min-height:0;padding:0;overflow-y:auto;overflow-x:hidden;
  overscroll-behavior:contain;scrollbar-gutter:stable;
}
.copy-survey-dialog fieldset { border:0;padding:0;margin:0;min-width:0; }
.copy-survey-dialog-questions { padding:0 30px; }
.copy-survey-notice {
  display:flex;align-items:center;justify-content:space-between;gap:8px;
  padding:12px 30px;background:#fff8ed;color:#855c18;font-size:12px;
}
.copy-survey-notice button { white-space:nowrap;font-size:12px; }
.copy-survey-card-notice { flex:0 0 100%;min-width:0;padding:12px 16px;border-radius:12px;overflow-wrap:anywhere; }
.copy-survey-save-error { margin:12px 30px!important;color:#b42318;font-size:12px!important;line-height:1.8; }
.copy-survey-steps { display:flex;list-style:none;gap:8px;justify-content:space-between;margin:0;padding:24px 30px 20px; }
.copy-survey-steps li { flex:1;min-width:0; }
.copy-survey-steps button {
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;
  width:100%;background:none;border:0;padding:0;min-height:52px;color:#777781;
  text-align:center;border-radius:6px;
}
.copy-survey-steps button:hover:not(:disabled) { background:#f7f8fb; }
.copy-survey-steps button:disabled { background:none;opacity:.6;border:0; }
.copy-survey-steps button>span {
  display:grid;place-items:center;width:29px;height:29px;flex-shrink:0;
  border-radius:50%;background:#f0f0f4;color:#72727c;font-size:12px;font-variant-numeric:tabular-nums;
}
.copy-survey-steps button>b { font-size:12px;font-weight:500;line-height:1.5;white-space:nowrap; }
.copy-survey-steps .current button { color:var(--color-primary); }
.copy-survey-steps .current button>span { background:var(--color-primary);color:#fff; }
.copy-survey-steps .current button>b { font-weight:600; }
.copy-survey-steps .done:not(.current) button { color:#52759a; }
.copy-survey-steps .done:not(.current) button>span { background:#eaf3ff;color:var(--color-primary); }
.copy-survey-progress { height:3px;background:#f0f0f4;margin:0 30px; }
.copy-survey-progress>span { display:block;height:100%;background:var(--color-primary);transition:width .2s; }
.copy-survey-section-heading { display:flex;align-items:center;justify-content:space-between;gap:16px;padding:26px 0 25px; }
.copy-survey-section-heading h3 { font-size:22px!important;font-weight:600;line-height:1.5;margin:0;outline:0;scroll-margin-top:24px; }
.copy-survey-section-heading h3+p { font-size:12px!important;line-height:1.8;color:#7c7c84;margin:5px 0 0!important; }
.copy-survey-page-count { font-size:11px;color:#85858e;white-space:nowrap;background:#f5f5f7;border-radius:8px;padding:7px 10px; }
.copy-survey-page-count b { font-weight:500;color:var(--color-primary); }
.copy-survey-questions { display:grid;gap:27px; }
.copy-survey-question { min-width:0;scroll-margin-block:24px; }
.copy-survey-question label { display:flex;align-items:baseline;gap:10px;color:#1d1d1f;line-height:1.75;font-size:15px; }
.copy-survey-question label>span { width:23px;flex-shrink:0;color:#8e8e98;font-size:12px;font-variant-numeric:tabular-nums; }
.copy-survey-question label>strong { font-weight:600;overflow-wrap:anywhere; }
.copy-survey-reference { font-size:12px!important;color:#797982;line-height:1.9!important;margin:6px 0 11px 33px!important; }
.copy-survey-question input,.copy-survey-question textarea {
  display:block;margin:0 0 0 33px;width:calc(100% - 33px);min-width:0;
  background:#f7f8fc;border:1px solid #e0e2eb;border-radius:12px;padding:13px 15px;
  color:#1d1d1f;font-size:14px;line-height:1.8;box-shadow:none;
}
.copy-survey-question input { height:49px; }
.copy-survey-question textarea { min-height:112px;resize:vertical; }
.copy-survey-question input::placeholder,.copy-survey-question textarea::placeholder { color:#9799a5;font-size:13px; }
.copy-survey-question input:hover,.copy-survey-question textarea:hover { border-color:#c0c7d4; }
.copy-survey-question input:focus,.copy-survey-question textarea:focus { background:#fff;border-color:var(--color-primary);outline:3px solid #0071e312;outline-offset:0; }
.copy-survey-question [aria-invalid=true] { border-color:#ce5555;background:#fffafa; }
.copy-survey-field-error { font-size:11px!important;color:#b42318;line-height:1.7;margin:8px 0 0 33px!important; }
.copy-survey-tip { font-size:11px!important;color:#8a8a93;line-height:1.8;margin:27px 0 24px 33px!important; }
/* The footer is outside the scrolling body, so its actions remain visible. */
.copy-survey-footer {
  flex-shrink:0;position:static;display:flex;justify-content:space-between;align-items:center;gap:16px;
  padding:19px 30px 21px;background:#fff;border-top:1px solid #e9e9ee;
}
.copy-survey-footer>div:first-child { display:flex;flex-direction:column;gap:5px;min-width:0; }
.copy-survey-footer strong { font-size:12px;font-weight:500;color:#6e6e73; }
.copy-survey-footer>div>span { font-size:11px;color:#8b8b95; }
.copy-survey-actions { display:flex;gap:12px;flex-shrink:0; }
.copy-survey-dialog .copy-survey-actions button { min-height:46px;padding:11px 23px;font-size:14px;font-weight:550;white-space:nowrap; }
.copy-survey-dialog .copy-survey-actions .primary { min-width:120px;width:auto;margin:0; }
.copy-survey-dialog button:focus-visible,.copy-survey-edit:focus-visible { outline:3px solid #acd2ff;outline-offset:3px; }
.copy-survey-dialog button:disabled { cursor:not-allowed; }

@media(max-width:767px) {
  .copy-survey-card,.main[data-page="copy"] .copy-survey-card { padding:24px 22px;min-height:130px;gap:15px;border-radius:20px; }
  .copy-survey-card h2 { font-size:21px!important; }
  .copy-survey-card-summary { font-size:12px!important;margin-top:7px!important; }
  .copy-survey-edit { font-size:12px;padding:10px 15px;min-height:43px; }
  .copy-survey-dialog {
    width:100vw;max-width:100vw;height:100vh;height:100dvh;
    max-height:100dvh;border-radius:0;margin:0;
  }
  .copy-survey-dialog-header { padding:20px 20px 17px;padding-top:max(20px,env(safe-area-inset-top));gap:12px; }
  .copy-survey-dialog-header h2 { font-size:20px; }
  .copy-survey-dialog-header p { font-size:11px; }
  .copy-survey-dialog-tools { gap:12px; }
  .copy-survey-dialog-tools button:not(.copy-survey-dialog-close) { font-size:12px; }
  .copy-survey-dialog-close { width:33px;height:33px;min-height:33px; }
  .copy-survey-dialog-questions { padding:0 20px; }
  .copy-survey-notice { padding:12px 20px;flex-wrap:wrap;font-size:11px; }
  .copy-survey-save-error { margin-inline:20px!important;font-size:11px!important; }
  .copy-survey-steps { padding:21px 20px 18px;gap:5px; }
  .copy-survey-steps button { gap:8px; }
  .copy-survey-steps button>b { font-size:10px;max-width:50px;white-space:normal;line-height:1.65; }
  .copy-survey-steps button>span { width:26px;height:26px; }
  .copy-survey-progress { margin-inline:20px; }
  .copy-survey-section-heading { padding:23px 0;gap:8px; }
  .copy-survey-section-heading h3 { font-size:20px!important; }
  .copy-survey-section-heading h3+p { font-size:11px!important; }
  .copy-survey-page-count { font-size:10px;padding:5px 7px; }
  .copy-survey-questions { gap:24px; }
  .copy-survey-question label { font-size:14px;gap:8px;line-height:1.8; }
  .copy-survey-question label>span { width:19px;font-size:11px; }
  .copy-survey-reference { font-size:11px!important;margin:6px 0 10px 27px!important; }
  .copy-survey-question input,.copy-survey-question textarea {
    margin-left:27px;width:calc(100% - 27px);font-size:16px;line-height:1.7;padding:12px;border-radius:11px;
  }
  .copy-survey-question input { height:47px; }
  .copy-survey-question input::placeholder,.copy-survey-question textarea::placeholder { font-size:12px; }
  .copy-survey-question textarea { min-height:110px; }
  .copy-survey-field-error { font-size:10px!important;margin-left:27px!important; }
  .copy-survey-tip { font-size:10px!important;margin-left:27px!important;margin-bottom:21px!important; }
  .copy-survey-footer { padding:16px 20px max(18px,env(safe-area-inset-bottom));gap:9px; }
  .copy-survey-footer strong { font-size:11px; }
  .copy-survey-footer>div>span { font-size:10px; }
  .copy-survey-actions { gap:8px; }
  .copy-survey-dialog .copy-survey-actions button { font-size:12px;min-height:42px;padding:10px 14px; }
  .copy-survey-dialog .copy-survey-actions .primary { min-width:104px; }
}
@media(max-width:359px) {
  .copy-survey-card,.main[data-page="copy"] .copy-survey-card { padding:22px 16px;gap:12px; }
  .copy-survey-edit { font-size:11px;padding-inline:12px; }
  .copy-survey-dialog-header,.copy-survey-footer,.copy-survey-dialog-questions { padding-inline:16px; }
  .copy-survey-dialog-header { gap:8px; }
  .copy-survey-dialog-tools { gap:8px; }
  .copy-survey-steps { padding-inline:16px; }
  .copy-survey-progress { margin-inline:16px; }
  .copy-survey-page-count { display:none; }
  .copy-survey-footer strong { font-size:10px; }
  .copy-survey-footer>div>span { font-size:9px; }
  .copy-survey-actions { gap:6px; }
  .copy-survey-dialog .copy-survey-actions button { font-size:11px;padding-inline:10px;min-width:0; }
  .copy-survey-dialog .copy-survey-actions .primary { min-width:90px; }
}
@media(prefers-reduced-motion:reduce) {
  .copy-survey-dialog,.copy-survey-dialog * { animation:none!important;transition:none!important;scroll-behavior:auto!important; }
}

.copy-survey-sync{font-size:12px;line-height:1.6;color:#7c8490;display:inline-flex;align-items:center;gap:8px}.copy-survey-sync[data-state="saved"]{color:#21805a}.copy-survey-sync[data-state="error"]{color:#b53b46}.copy-survey-sync button{border:0;background:none;color:#0071e3;padding:5px 8px;min-height:32px;font-size:12px}.copy-survey-card>.copy-survey-sync{grid-column:1/-1}.copy-survey-dialog-tools{flex-wrap:wrap}.copy-survey-dialog-tools>.copy-survey-sync{max-width:220px}@media(max-width:600px){.copy-survey-dialog-tools>.copy-survey-sync{font-size:11px;max-width:150px}.copy-survey-sync button{min-height:40px}}
