/* Feature-scoped candidate. Console shell/fonts/actions are inherited. */
.cwf-main{background:#fff}.cwf-scroll{height:calc(100vh - 64px);overflow:auto;padding:26px 28px 40px}.cwf-main h2{font-size:20px;margin:0 0 10px}.cwf-main p{color:#63707b;line-height:1.65}.cwf-text-button{border:0;background:transparent;padding:5px 8px;color:#168cf2;cursor:pointer}.cwf-text-button:disabled{color:#9da7af;cursor:default}.cwf-editor-layout{display:grid;grid-template-columns:minmax(380px,1fr) minmax(340px,440px);gap:34px;padding-bottom:120px;height:calc(100vh - 126px)}.cwf-editor{min-width:0}.cwf-editor-intro h2{margin-bottom:6px}.cwf-editor-intro p{margin:0 0 16px}.cwf-tabs{display:flex;border-bottom:1px solid #dce3e8;margin-bottom:10px;gap:8px}.cwf-tabs button{background:transparent;border:0;border-bottom:3px solid transparent;padding:12px 12px;color:#65717b;cursor:pointer;white-space:nowrap}.cwf-tabs button[aria-selected=true]{border-color:#168cf2;color:#168cf2;font-weight:600}.cwf-upload{display:flex;align-items:center;gap:20px}.cwf-upload-preview{height:98px;width:170px;display:flex;align-items:center;justify-content:center;border:1px dashed #bdc7cf;background:#fafcfd;color:#168cf2;padding:10px;gap:6px}.cwf-upload-preview>img{max-width:100%;max-height:100%;object-fit:contain}.cwf-upload-preview>svg{width:145px;height:90px}.cwf-upload-preview .cwf-bank-mark{width:28px;height:28px;font-size:17px}.cwf-upload-preview strong{font-size:17px;white-space:nowrap}.cwf-upload input[type=file]{position:absolute;width:1px;height:1px;clip-path:inset(50%);overflow:hidden}.cwf-upload-button{display:inline-block;border:1px solid #b8c7d2;border-radius:3px;padding:7px 13px;color:#168cf2;background:#fff;cursor:pointer}.cwf-upload-button.disabled{opacity:.5;cursor:default}.cwf-upload small{display:block;font-size:12px;line-height:1.6;color:#75818b;margin-top:8px}.cwf-color-controls{display:flex;align-items:center;gap:14px}.cwf-color-controls input{width:60px;height:36px;border:1px solid #d0d8de;background:white;padding:3px;border-radius:3px}.cwf-color-controls span{color:#586673}.cwf-preview{position:sticky;top:0;height:max-content;padding:0;background:#f5f7fa;border:1px solid #dfe5eb;border-radius:5px;min-width:0}.cwf-preview-head{display:flex;align-items:center;justify-content:space-between;padding:16px 0 12px;gap:10px}.cwf-preview-head h2{font-size:16px;margin:0}.cwf-device-switch{display:flex;border:1px solid #c9d3da;border-radius:3px;overflow:hidden}.cwf-device-switch button{border:0;background:#fff;padding:6px 12px;cursor:pointer;color:#6a7781}.cwf-device-switch button[aria-pressed=true]{color:#168cf2;background:#eaf5ff}.cwf-preview-toolbar{display:flex;align-items:center;gap:12px;margin-bottom:15px;color:#687680}.cwf-preview-toolbar select{flex:1;min-width:0;height:34px;border:1px solid #cbd4dc;padding:0 8px;background:#fff;border-radius:3px}.cwf-preview-note{display:block;margin:13px 0 0;color:#6d7a84;text-align:center;font-size:12px;line-height:1.55}.cwf-phone{--flow-color:#168cf2;background:#fff;border:1px solid #dce3e9;border-radius:8px;overflow:hidden;width:100%;max-width:375px;margin:auto;color:#243440;box-shadow:0 3px 12px #22303f0a;font-family:'Segoe UI','Microsoft JhengHei',sans-serif}.cwf-phone-brand{height:72px;display:flex;align-items:center;justify-content:center;gap:9px;border-bottom:1px solid #edf0f2;color:var(--flow-color)}.cwf-phone-brand img{max-width:180px;max-height:43px;object-fit:contain}.cwf-phone-brand strong{font-size:22px;letter-spacing:2px}.cwf-bank-mark{display:inline-grid;place-items:center;background:var(--flow-color,#007d80);color:white;border-radius:2px;width:31px;height:31px;font-family:Georgia,serif;font-size:23px}.cwf-phone-body{padding:24px 24px 18px;min-height:435px}.cwf-phone h2{font-size:21px;line-height:1.45;margin:18px 0 12px;color:#243440;overflow-wrap:anywhere}.cwf-phone p{font-size:14px;line-height:1.8;color:#62727c;margin:0 0 20px;overflow-wrap:anywhere;white-space:pre-line}.cwf-progress{display:flex;justify-content:space-between;font-size:11px;color:#7c8b96;border-bottom:2px solid #eef2f5;padding:0 0 13px;gap:8px}.cwf-progress span:first-child{color:var(--flow-color)}.cwf-id-guide{color:var(--flow-color);margin:20px auto}.cwf-id-guide svg,.cwf-id-guide>img{display:block;max-height:200px;width:100%;object-fit:contain}.cwf-guidance{list-style:none;padding:0;color:#6c7c86;font-size:12px;line-height:1.9;margin:0 0 22px}.cwf-guidance li:before{content:'•';padding-right:8px;color:var(--flow-color)}.cwf-phone-primary{background:var(--flow-color);color:#fff;border:0;border-radius:4px;width:100%;min-height:44px;padding:10px 12px;cursor:pointer;font-size:15px}.cwf-phone-primary:focus-visible{outline:2px solid #182d3e;outline-offset:3px}.cwf-outcome-icon{width:64px;height:64px;display:grid;place-items:center;border:1px solid #d5a366;border-radius:50%;font-size:31px;background:#fff8ec;color:#b17b28;margin:30px auto 20px}.cwf-outcome-icon.success{background:#eef7f3;border-color:#7eb8a3;color:#328b6d}.cwf-outcome-icon.review{background:#edf5ff;border-color:#a3bfde;color:#47799f}.cwf-outcome-icon.exhaust{background:#f8f1f0;border-color:#d4ada7;color:#a6584e}.cwf-result-label{text-align:center;color:#677983;font-size:13px}.cwf-outcome-icon~h2{text-align:center}.cwf-outcome-icon~p{text-align:center}.cwf-remaining{margin:20px 0;text-align:center;color:#6b7780;font-size:14px}.cwf-remaining b{color:var(--flow-color);font-size:19px}.cwf-step-label{font-size:12px;color:var(--flow-color)}.cwf-ocr-fields{display:grid;gap:15px;margin:24px 0}.cwf-ocr-fields label{font-size:13px;color:#657882}.cwf-ocr-fields input{display:block;width:100%;height:41px;padding:0 12px;border:1px solid #cdd9df;border-radius:3px;margin-top:7px;color:#2c4250;background:white}.cwf-ocr-fields input[readonly]{background:#f5f7f8;color:#6c7b85}.cwf-face-guide{border:2px dashed var(--flow-color);border-radius:50%;width:160px;height:190px;display:grid;place-items:center;margin:20px auto}.cwf-face-guide img{width:140px;opacity:.5}.cwf-desktop-preview{max-width:none}.cwf-desktop-preview .cwf-phone-body{padding:20px;min-height:350px}.cwf-desktop-preview .cwf-id-guide{max-width:250px}.cwf-actions{justify-content:flex-start;gap:10px;padding-left:28px}.cwf-actions>button{width:120px}.cwf-actions .cwf-cancel{border:1px solid #c9d3dc;background:#fff;color:#66737e}.cwf-error{color:#b7463c!important;font-size:14px;line-height:1.6}.cwf-error:empty{display:none}.cwf-message{background:#eff8f4;border:1px solid #d4e8dc;padding:12px 14px;color:#3e7b5d;margin:15px 0}.cwf-template-extension{border-top:2px solid #dce2e8;margin-top:18px;padding-top:25px}.cwf-template-extension h2{font-size:20px}.cwf-template-extension .template-row{align-items:start}.cwf-template-extension .template-row>b{padding-top:10px}.cwf-template-extension select{height:42px;width:100%;min-width:0;background:#f4f4f4;border:0;padding:0 12px;color:#26333e}.cwf-inline-links{display:flex;gap:8px;margin-top:7px}.cwf-inline-links .cwf-text-button{padding-left:0}.cwf-check{display:flex;align-items:center;gap:9px;line-height:1.6;padding:10px 0}.cwf-check input,.cwf-ocr-options input{accent-color:#168cf2;width:17px;height:17px}.cwf-policy-settings{min-width:0}.cwf-policy-settings>small{color:#74818b;display:block;line-height:1.6}.cwf-policy-row{padding:18px 0;border-bottom:1px solid #e0e5e9}.cwf-policy-row:last-of-type{border:0}.cwf-policy-row h3{font-size:15px;margin:0 0 12px}.cwf-policy-fields{display:grid;grid-template-columns:1fr;gap:16px}.cwf-policy-fields:has(input){grid-template-columns:1.1fr .8fr 1.1fr}.cwf-policy-fields label{display:grid;align-content:start;gap:8px;font-size:13px;color:#6b7882}.cwf-policy-fields input{height:42px;width:100%;border:0;background:#f4f4f4;padding:0 12px}.cwf-policy-fields small{font-size:12px;color:#75818b;line-height:1.5}.cwf-ocr-options{padding:14px 0;color:#66747e}.cwf-ocr-options>div{display:flex;flex-wrap:wrap;gap:22px;margin:12px 0}.cwf-ocr-options label{display:flex;align-items:center;gap:6px}.cwf-ocr-options small{color:#77838d;display:block;font-size:12px}.cwf-template .template-actions{gap:12px}.cwf-front-stage{background:#f2f5f8;min-height:100vh;height:100vh;overflow:auto}.cwf-review-tools{background:#fff;border-bottom:1px solid #dce3e9;padding:12px 20px;display:flex;align-items:center;gap:18px;flex-wrap:wrap}.cwf-review-tools>span{color:#657781}.cwf-review-tools .scenario-navigator{margin-left:auto}.cwf-demo-result{display:flex;align-items:center;gap:8px;color:#73818d;font-size:12px}.cwf-demo-result select{height:32px;border:1px solid #cbd5dd;background:white;border-radius:3px;padding:0 8px}.cwf-front-wrap{padding:32px 12px 16px}.cwf-front-wrap .cwf-phone{max-width:390px}.cwf-front-wrap .cwf-phone-body{min-height:455px}.cwf-review-foot{text-align:center;color:#7c8a95;font-size:12px;line-height:1.8;padding:0 20px 26px}.cwf-dialog{max-width:520px}.cwf-modal-backdrop{z-index:100}.cwf-dialog p{margin:20px 0}.cwf-main button:focus-visible,.cwf-main input:focus-visible,.cwf-main select:focus-visible,.cwf-main textarea:focus-visible{outline:2px solid #168cf2;outline-offset:2px}.cwf-main .dialog:focus-visible{outline:0}
.cwf-preview-fixed{padding:0 18px;flex:0 0 auto}.cwf-preview-scroll{min-height:0;flex:0 1 auto;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable both-edges;padding:0 18px 20px}.cwf-preview-scroll:focus-visible{outline:2px solid #0080ff;outline-offset:-2px}
.cwf-preview{max-height:calc(100vh - 180px);overflow:hidden;display:flex;flex-direction:column}.cwf-desktop-canvas{position:relative;aspect-ratio:16/9;overflow:hidden}.cwf-desktop-canvas .cwf-desktop-preview{position:absolute;left:0;top:0;width:1280px;height:720px;max-width:none;transform:scale(var(--cwf-desktop-scale,.3));transform-origin:top left}.cwf-desktop-preview .cwf-phone-body{max-width:600px;margin:auto;text-align:center}.cwf-desktop-preview .cwf-phone-primary{max-width:340px;margin:auto;display:block}.cwf-desktop-preview .cwf-ocr-fields{text-align:left;max-width:360px;margin:24px auto}.cwf-desktop-preview 
@media(max-width:1200px){.cwf-editor-layout{grid-template-columns:minmax(300px,1fr) minmax(300px,360px);gap:22px;padding:22px 20px 100px}.cwf-preview-fixed{padding:0 12px}.cwf-preview-scroll{padding:0 12px 15px}.cwf-upload{gap:12px}.cwf-upload-preview{width:130px}.cwf-policy-fields:has(input){grid-template-columns:1fr}.cwf-tabs{gap:0}.cwf-tabs button{padding:11px 8px;font-size:13px}}
@media(max-width:900px){.cwf-editor-layout{display:block}.cwf-preview{position:relative;margin-top:30px}.cwf-review-tools{gap:8px}.cwf-review-tools>.scenario-navigator{width:100%;margin:0}.cwf-review-tools .scenario-trigger{width:100%}.cwf-front-wrap{padding-top:18px}}
@media(max-width:480px){.cwf-front-stage .cwf-review-tools{padding:10px 12px}.cwf-front-wrap{padding:12px 0}.cwf-front-wrap .cwf-phone{border-left:0;border-right:0;border-radius:0}.cwf-review-foot{padding-top:12px}.cwf-phone-body{padding:22px}}


.cwf-source-phone{width:360px;max-width:100%;margin:auto;border:1px solid #cad3de;border-radius:8px;overflow:hidden;background:#eaf1ff}.cwf-source-frame{border:0;width:100%;height:640px;display:block}.cwf-source-desktop{width:100%;position:relative;aspect-ratio:16/9;border-radius:4px}.cwf-source-desktop .cwf-source-frame{position:absolute;left:0;top:0;width:1280px;height:720px;max-width:none;transform:scale(var(--cwf-desktop-scale,.3));transform-origin:top left}.cwf-sdk-placeholder{margin:20px 0;min-height:260px;display:flex;flex-direction:column;justify-content:center;border:1px dashed #b6c0ca;padding:24px;color:#657482}.cwf-proposal-note{font-size:12px;line-height:1.6;color:#677785}.cwf-front-wrap .cwf-phone-brand{background:linear-gradient(white,#eaf1ff)}

.cwf-dialog .cwf-danger{background:#c83232;color:#fff;border:1px solid #c83232;padding:9px 18px;border-radius:3px;cursor:pointer}.cwf-dialog .cwf-danger:hover{background:#af2626;border-color:#af2626}.cwf-dialog .cwf-danger:focus-visible{outline:2px solid #792020;outline-offset:3px}.cwf-upload small{font-size:13px}.cwf-preview-toolbar>span{white-space:nowrap}

/* Candidate v6: reuse Console template table; aligned fields without per-field rules. */
.cwf-list-scroll{padding:0 0 40px}.cwf-page-description{margin:22px 28px 6px;max-width:none;font-size:14px}.cwf-profile-table{margin-top:14px}.cwf-profile-table th:nth-child(1){width:29%}.cwf-profile-table th:nth-child(2){width:12%}.cwf-profile-table th:nth-child(3){width:34%}.cwf-profile-table th:last-child{width:25%;text-align:right;padding-right:22px}.cwf-profile-table .outline:disabled{color:#9da7af;border-color:#e0e5e9;cursor:default}.cwf-list-scroll>.cwf-message{margin:14px 28px}
.cwf-editor-intro>p{margin:0 0 14px;font-size:15px}.cwf-usage{margin:0 0 22px;color:#586673;font-size:14px}.cwf-usage p{margin:7px 0 0;font-size:13px}
.cwf-tabs{margin-bottom:24px}.cwf-field-group{margin:0 0 34px}.cwf-field-group h3{font-size:16px;margin:0 0 14px;color:#34414d}.cwf-group-description{font-size:14px;margin:0 0 14px}.cwf-edit-field{display:grid;grid-template-columns:132px minmax(0,1fr);gap:16px;align-items:start;padding:10px 0;border:0}.cwf-edit-field>label{font-size:15px;font-weight:400;line-height:1.6;padding-top:9px;margin:0}.cwf-field-control{min-width:0}.cwf-field-control>input:not([type=file]),.cwf-field-control>textarea{width:100%;background:#f4f4f4;border:1px solid transparent;border-radius:3px;min-height:42px;padding:10px 12px;resize:vertical;line-height:1.5;font:inherit}.cwf-field-meta{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:12px;align-items:start;margin-top:6px}.cwf-field-control .cwf-field-meta .cwf-field-help{min-width:0;margin:0;overflow-wrap:anywhere}.cwf-field-meta>.cwf-text-button{justify-self:end;margin:0;padding:0;font-size:13px;line-height:1.6;white-space:nowrap}.cwf-field-control .cwf-field-help{display:block;font-size:13px;line-height:1.6;margin:8px 0 0;color:#6a7782}.cwf-color-controls{gap:12px;min-height:42px}.cwf-upload-preview{width:140px;flex:0 0 140px;border-style:solid;border-color:#dce2e7;background:#fafbfc}.cwf-upload{gap:16px}.cwf-example-pair{margin-bottom:22px}.cwf-example-pair:last-child{margin-bottom:0}
@media(max-width:1200px){.cwf-edit-field{grid-template-columns:112px minmax(0,1fr);gap:12px}.cwf-upload-preview{width:120px;flex-basis:120px}.cwf-color-controls{gap:8px}}
@media(max-width:900px){.cwf-profile-table{min-width:690px}.cwf-list-scroll .template-toolbar{gap:18px}.cwf-list-scroll .template-search{width:min(450px,60%)}.cwf-page-description{margin:20px 22px 6px}.cwf-edit-field{grid-template-columns:140px minmax(0,1fr)}}
@media(max-width:480px){.cwf-edit-field{grid-template-columns:1fr;gap:8px}.cwf-edit-field>label{padding-top:0}.cwf-upload-preview{width:140px;flex-basis:140px}}

/* Candidate v7: restrained topic panels; rare destructive action in editor footer. */
.cwf-list-scroll .template-search{gap:8px}
.cwf-list-scroll .template-search input{min-width:0;width:100%;height:100%;padding:0;font-size:14px;font-weight:400;line-height:1.4;color:#34414d}
.cwf-list-scroll .template-search input::placeholder{font:inherit;color:#84909b;opacity:1}
.cwf-field-group{background:#f6f8fa;border:1px solid #e5e9ed;border-radius:4px;padding:20px;margin-bottom:20px}
.cwf-field-group .cwf-field-control>input:not([type=file]),.cwf-field-group .cwf-field-control>textarea{background:#fff;border-color:#d7dee5}
.cwf-field-group .cwf-upload-preview{background:#fff}
.cwf-field-group h3{margin-bottom:12px}
.cwf-actions .cwf-delete-action{border:1px solid #c83232;background:#fff;color:#c83232;white-space:nowrap}
.cwf-actions .cwf-delete-action:hover:not(:disabled){background:#fff1f1}
.cwf-actions .cwf-delete-action:disabled{border-color:#d8dfe5;background:#fff;color:#9da7af;cursor:default}
.cwf-actions .cwf-delete-action:focus-visible{outline-color:#a32c2c}
@media(max-width:1200px){.cwf-field-group{padding:16px}.cwf-field-group .cwf-edit-field{grid-template-columns:102px minmax(0,1fr)}.cwf-field-group .cwf-upload{gap:12px}.cwf-field-group .cwf-upload-preview{width:100px;flex-basis:100px}}
@media(max-width:900px){.cwf-actions .cwf-delete-action{margin-left:auto}.cwf-field-group .cwf-edit-field{grid-template-columns:130px minmax(0,1fr)}}
@media(max-width:480px){.cwf-field-group .cwf-edit-field{grid-template-columns:1fr}.cwf-field-group .cwf-upload-preview{width:130px;flex-basis:130px}.cwf-actions{padding-left:14px;gap:8px}.cwf-actions>button{width:100px}}

/* Candidate v8: usage is visible metadata, with no disclosure interaction. */
.cwf-usage-row{display:grid;grid-template-columns:132px minmax(0,1fr);gap:12px;align-items:start;line-height:1.7}
.cwf-usage-label{font-weight:600;color:#34414d}
.cwf-usage ul{list-style:none;padding:0;margin:0;display:flex;flex-wrap:wrap;gap:8px;color:#40505f}
.cwf-usage li{flex:0 0 auto;max-width:100%;overflow-wrap:anywhere;background:#f0f3f6;border:1px solid #d9e1e8;border-radius:4px;padding:3px 10px;font-size:14px;line-height:1.6}

.cwf-usage p{margin:8px 0 0}
@media(max-width:480px){.cwf-usage-row{grid-template-columns:1fr;gap:4px}}

/* Candidate v9: static reference chips, quiet footer and shared motion profiles. */
.cwf-usage-label{padding-top:4px;font-weight:700}
.cwf-actions .cwf-delete-action{margin-left:auto}
:root{
 --modal-open-dur:250ms;--modal-close-dur:150ms;--modal-scale:.96;--modal-scale-close:.96;
 --modal-ease:cubic-bezier(0.22,1,0.36,1);
 --dropdown-open-dur:180ms;--dropdown-close-dur:120ms;--dropdown-pre-scale:.97;--dropdown-closing-scale:.99;
 --dropdown-ease:cubic-bezier(0.22,1,0.36,1);
 --cwf-motion-hover:100ms;--cwf-motion-control:180ms;
}

/* transitions-dev recipe; scoped through CWF-only t-* hooks. */

.t-dropdown {
  transform-origin: top left;
  transform: scale(var(--dropdown-pre-scale));
  opacity: 0;
  pointer-events: none;
  transition:
    transform var(--dropdown-open-dur) var(--dropdown-ease),
    opacity   var(--dropdown-open-dur) var(--dropdown-ease);
  will-change: transform, opacity;
}
.t-dropdown[data-origin="top-right"]     { transform-origin: top right; }
.t-dropdown[data-origin="top-center"]    { transform-origin: top center; }
.t-dropdown[data-origin="bottom-left"]   { transform-origin: bottom left; }
.t-dropdown[data-origin="bottom-center"] { transform-origin: bottom center; }
.t-dropdown[data-origin="bottom-right"]  { transform-origin: bottom right; }

.t-dropdown.is-open {
  transform: scale(1);
  opacity: 1;
  pointer-events: auto;
}
.t-dropdown.is-closing {
  transform: scale(var(--dropdown-closing-scale));
  opacity: 0;
  pointer-events: none;
  transition:
    transform var(--dropdown-close-dur) var(--dropdown-ease),
    opacity   var(--dropdown-close-dur) var(--dropdown-ease);
}

@media (prefers-reduced-motion: reduce) {
  .t-dropdown { transition: none !important; }
}

/* transitions-dev recipe; scoped through CWF-only t-* hooks. */

.t-modal {
  transform-origin: center;
  transform: scale(var(--modal-scale));
  opacity: 0;
  pointer-events: none;
  transition:
    transform var(--modal-open-dur) var(--modal-ease),
    opacity   var(--modal-open-dur) var(--modal-ease);
  will-change: transform, opacity;
}
.t-modal.is-open {
  transform: scale(1);
  opacity: 1;
  pointer-events: auto;
}
.t-modal.is-closing {
  transform: scale(var(--modal-scale-close));
  opacity: 0;
  pointer-events: none;
  transition:
    transform var(--modal-close-dur) var(--modal-ease),
    opacity   var(--modal-close-dur) var(--modal-ease);
}

@media (prefers-reduced-motion: reduce) {
  .t-modal { transition: none !important; }
}

.cwf-modal-backdrop{opacity:1;transition:opacity var(--modal-open-dur) var(--modal-ease)}
@starting-style{.cwf-main .cwf-modal-backdrop{opacity:0}}
.cwf-modal-exit{pointer-events:none}
.cwf-modal-exit.is-closing{opacity:0;transition-duration:var(--modal-close-dur)}
.cwf-tabs button,.cwf-device-switch button,.cwf-actions button,.cwf-dialog button{transition:background-color var(--cwf-motion-hover) ease-out,color var(--cwf-motion-hover) ease-out,border-color var(--cwf-motion-hover) ease-out}
@media(prefers-reduced-motion:reduce){
 :root{--modal-open-dur:0ms;--modal-close-dur:0ms;--dropdown-open-dur:0ms;--dropdown-close-dur:0ms}
 .cwf-modal-backdrop,.cwf-tabs button,.cwf-device-switch button,.cwf-actions button,.cwf-dialog button{transition:none!important}
}

/* Native single-choice pickers share the dropdown recipe's scale/easing.
   CSS owns the top-layer entry/exit; the browser keeps selection, keyboard,
   validation and disabled semantics. Unsupported browsers retain their picker. */
@supports (appearance: base-select) and selector(::picker(select)) and (transition-behavior: allow-discrete) {
  @media not (forced-colors: active) {
    .cwf-main select:not([multiple]):not([size]) {
      --select-open:var(--dropdown-open-dur);
      --select-close:var(--dropdown-close-dur);
      appearance:base-select !important;
      -webkit-appearance:base-select !important;
      position:relative;
      display:inline-flex !important;
      align-items:center;
      background-image:none !important;
      padding-right:32px;
      cursor:pointer;
    }
    .cwf-main select:not([multiple]):not([size]):disabled { cursor:default; }
    .cwf-main select:not([multiple]):not([size])::picker-icon {
      content:"";
      position:absolute;
      right:14px;
      top:50%;
      width:7px;
      height:7px;
      border-right:1.5px solid currentColor;
      border-bottom:1.5px solid currentColor;
      translate:0 -70%;
      rotate:45deg;
      transition:rotate var(--select-open) var(--dropdown-ease);
    }
    .cwf-main select:not([multiple]):not([size]):open::picker-icon { rotate:225deg; }
    .cwf-main select:not([multiple]):not([size])::picker(select) {
      appearance:base-select;
      min-inline-size:anchor-size(width);
      max-inline-size:min(420px,calc(100vw - 24px));
      max-block-size:min(320px,calc(100vh - 32px));
      margin-block-start:4px;
      padding:4px;
      border:1px solid var(--theme-border,#ccd6df);
      border-radius:6px;
      background:var(--theme-surface,#fff);
      color:var(--theme-text,#40505f);
      box-shadow:0 8px 24px rgb(0 0 0 / 18%);
      overflow:auto;
      overscroll-behavior:contain;
      scrollbar-width:thin;
      transform-origin:center;
      transform:scale(var(--dropdown-closing-scale));
      opacity:0;
      pointer-events:none;
      transition:
        transform var(--select-close) var(--dropdown-ease),
        opacity var(--select-close) var(--dropdown-ease),
        display var(--select-close) allow-discrete,
        overlay var(--select-close) allow-discrete;
    }
    .cwf-main select:not([multiple]):not([size]):open::picker(select) {
      transform:scale(1);
      opacity:1;
      pointer-events:auto;
      transition-duration:var(--select-open);
    }
    @starting-style {
      .cwf-main select:not([multiple]):not([size]):open::picker(select) {
        transform:scale(var(--dropdown-pre-scale));
        opacity:0;
      }
    }
    .cwf-main select:not([multiple]):not([size]) option {
      min-block-size:34px;
      padding:8px 10px;
      border-radius:3px;
      font:inherit;
      font-weight:400;
      line-height:1.4;
      color:var(--theme-text,#40505f);
      background:transparent;
      transition:background-color 100ms ease-out;
    }
    .cwf-main select:not([multiple]):not([size]) option:checked {
      font-weight:600;
      background:var(--theme-accent-soft,#eef8fe);
    }
    .cwf-main select:not([multiple]):not([size]) option:is(:hover,:focus-visible) {
      background:var(--theme-surface-soft,#f0f4f7);
    }
    .cwf-main select:not([multiple]):not([size]) option:focus-visible {
      outline:2px solid var(--theme-control,#168cf2);
      outline-offset:-2px;
    }
    .cwf-main select:not([multiple]):not([size]) option::checkmark { color:var(--theme-accent,#168cf2); }
    .cwf-main select:not([multiple]):not([size]) option:disabled { color:var(--theme-muted,#748397); opacity:0.6; cursor:default; }
    @media (prefers-reduced-motion: reduce) {
      .cwf-main select:not([multiple]):not([size])::picker(select),
      .cwf-main select:not([multiple]):not([size])::picker-icon,
      .cwf-main select:not([multiple]):not([size]) option { transition:none !important; }
    }
  }
}


/* Candidate v11: use the existing white numbered template form. */
.cwf-template-extension{border-top:0;margin-top:0;padding-top:0;scroll-margin-top:16px}
.cwf-template-group{background:#fff;border-radius:0;padding:18px 0;align-items:start}
.cwf-template-title h2{font-size:16px;margin:8px 0 0;font-weight:700;color:#34414d;line-height:1.5}
.cwf-template-title p{font-size:13px;color:#63707b;margin:8px 0 0;line-height:1.65}
.cwf-template-group>div:last-child{min-width:0}
.cwf-template-group select{height:42px;min-width:0;width:100%;border:0;background:#f4f4f4;border-radius:0;padding:0 12px;font:inherit;color:#34414d}
.cwf-profile-actions{display:flex;align-items:center;gap:14px;margin-top:10px;flex-wrap:wrap}
.cwf-profile-actions .outline{border:1px solid #b8c7d2;border-radius:3px;color:#168cf2;background:white;padding:7px 18px;cursor:pointer}
.cwf-template-group .cwf-check{padding:7px 0;color:#34414d;font-size:15px}
.cwf-template-group .cwf-ocr-options{border:0;margin:8px 0 0 26px;padding:0;font-size:14px}
.cwf-ocr-options legend{padding:0;color:#63707b}
.cwf-template-group .cwf-ocr-options>div{gap:16px;margin:10px 0 0}
.cwf-rules-scroll{overflow:auto}
.cwf-rule-table{width:100%;margin:0;background:#fff;table-layout:fixed;font-size:14px;min-width:900px}
.cwf-rule-table th:nth-child(1){width:22%}.cwf-rule-table th:nth-child(2){width:28%}.cwf-rule-table th:nth-child(3){width:22%}.cwf-rule-table th:nth-child(4){width:28%}
.cwf-rule-table thead th{height:42px;background:#f4f4f4;color:#586673;font-size:14px;white-space:nowrap}
.cwf-rule-table tbody th{font-weight:500;color:#34414d;font-size:15px;line-height:1.5}
.cwf-rule-table th,.cwf-rule-table td{padding:12px 10px;vertical-align:middle;min-height:82px}
.cwf-rule-table td:last-child{text-align:left}
.cwf-rule-table select{font-size:14px;height:40px}
.cwf-fixed-policy{display:flex;align-items:center;min-height:40px;padding:0 12px;font-size:14px;color:#34414d}
.cwf-rule-table .cwf-count-error{font-size:12px;line-height:1.5;margin:0;color:#bc3030;white-space:nowrap;visibility:visible}.cwf-rule-table .cwf-count-error[aria-hidden=true]{visibility:hidden}.cwf-retry-count input[aria-invalid=true]{outline:1px solid #bc3030}
.cwf-retry-count{display:flex;align-items:center;gap:8px;min-height:40px}.cwf-count-error{width:72px;flex:0 0 72px}
.cwf-retry-count input{width:66px;min-width:0;height:40px;border:0;background:#f4f4f4;border-radius:0;padding:0 9px;color:#34414d;font:inherit}
.cwf-not-applicable{color:#8b96a0}.cwf-empty-rules{font-size:14px;margin:8px 0}
.cwf-info{display:inline-flex;vertical-align:middle;align-items:center;justify-content:center;width:17px;height:17px;border:1px solid #7a8791;border-radius:50%;background:#fff;color:#63707b;font:600 12px/1 Arial;cursor:help;padding:0;margin-left:3px}
/* transitions-dev 17-tooltip, scoped to the template. One shared bubble. */
.cwf-tooltip{--tt-in-dur:150ms;--tt-out-dur:50ms;--tt-scale:.98;--tt-delay:80ms;--tt-in-ease:ease-out;--tt-out-ease:ease-out;--tt-move-dur:160ms;--tt-move-ease:cubic-bezier(.22,1,.36,1);--tt-bg:#fff;--tt-fg:#34414d;position:fixed;z-index:110;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;width:0;overflow:hidden;scale:var(--tt-scale);transform-origin:50% 0;padding:10px 12px;border-radius:4px;background:var(--tt-bg);color:var(--tt-fg);box-shadow:0 0 0 1px rgba(0,0,0,.1),0 2px 6px rgba(0,0,0,.05),0 4px 42px rgba(0,0,0,.06);opacity:0;pointer-events:none;font-size:13px;line-height:1.65;font-weight:400;text-align:left;transition:opacity var(--tt-out-dur) var(--tt-out-ease),scale var(--tt-out-dur) var(--tt-out-ease),left var(--tt-move-dur) var(--tt-move-ease)}
.cwf-tooltip[data-show=true]{opacity:1;scale:1;pointer-events:auto;transition:opacity var(--tt-in-dur) var(--tt-in-ease) var(--tt-delay),scale var(--tt-in-dur) var(--tt-in-ease) var(--tt-delay),left var(--tt-move-dur) var(--tt-move-ease)}
.cwf-tooltip .t-tt-text{white-space:normal}
@media(prefers-reduced-motion:reduce){.cwf-tooltip{transition:none!important}}
.cwf-preview-dialog{max-width:450px;padding:22px;display:flex;flex-direction:column;max-height:calc(100vh - 32px);overflow:hidden}
.cwf-preview-dialog h2{font-size:18px;margin-bottom:16px;line-height:1.5}
.cwf-preview-dialog-body{max-height:calc(100vh - 230px);min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable both-edges;padding:0 2px 6px}.cwf-modal-preview-controls{flex:0 0 auto}.cwf-preview-dialog h2,.cwf-preview-dialog .dialog-actions{flex-shrink:0}
.cwf-preview-dialog .cwf-preview-toolbar{position:sticky;top:0;background:#fff;z-index:1;padding:2px 0 12px;margin:0}
.cwf-preview-dialog .cwf-preview-toolbar label{white-space:nowrap}
.cwf-preview-dialog .cwf-source-frame{height:640px}
.cwf-preview-dialog .dialog-actions{margin-top:14px}
.cwf-profile-actions button{transition:background-color var(--cwf-motion-hover) ease-out,color var(--cwf-motion-hover) ease-out}

@media(max-width:600px){.cwf-template .template-form-scroll{padding-left:14px;padding-right:14px}.cwf-template-group{grid-template-columns:1fr;gap:12px;padding:16px 0}.cwf-template-title p{margin-top:5px}.cwf-profile-actions{flex-wrap:wrap}.cwf-preview-dialog{width:calc(100vw - 24px);padding:18px}}
@media(prefers-reduced-motion:reduce){.cwf-profile-actions button{transition:none!important}}

/* Candidate v12 A: maintain the numbered form and give descriptions enough width. */
.cwf-template:not(.cwf-grouped-template){--template-label:340px;--template-label-neg:-340px}
.cwf-template:not(.cwf-grouped-template) .cwf-template-title p{white-space:nowrap}
.cwf-ocr-group .cwf-template-title{grid-column:1 / -1}
.cwf-ocr-settings{grid-column:1 / -1}
.cwf-ocr-radio-row{display:grid;grid-template-columns:calc(var(--template-label) + 18px) 105px 105px;align-items:center;min-height:42px}
.cwf-ocr-radio-row>strong{padding-left:22px;font-size:16px;font-weight:600}
.cwf-ocr-radio-row .radio-choice{display:flex;align-items:center;gap:10px;height:42px;font-size:16px}
.cwf-ocr-radio-row input{appearance:none;width:20px;height:20px;min-width:20px;margin:0;border:2px solid #7d858b;border-radius:50%;background:#fff}
.cwf-ocr-radio-row input:checked{border-color:#168ff2;box-shadow:inset 0 0 0 4px #fff;background:#168ff2}
/* Confirmed B layout, feature-scoped; original Console templateForm unchanged. */
.cwf-grouped-template{--template-label:210px;--template-label-neg:-210px}
.cwf-grouped-template .template-form-scroll{padding-top:0}
.cwf-section-nav{position:sticky;top:0;display:flex;gap:6px;flex-wrap:wrap;padding:12px 0;background:#fff;border-bottom:1px solid #d9dee3;z-index:2}
.cwf-section-nav a{display:block;color:#586673;text-decoration:none;padding:8px 12px;border-radius:3px;font-size:14px;white-space:nowrap}
.cwf-section-nav a:hover,.cwf-section-nav a:focus-visible{color:#168cf2;background:#eff7fe}
.cwf-design-section{padding:26px 0 22px;border-bottom:1px solid #d9dee3;scroll-margin-top:72px}
.cwf-design-section:last-of-type{border-bottom:0}
.cwf-rule-table td small[hidden]{display:none}
.cwf-design-section>header{margin:0 0 18px}
.cwf-design-section>header h2{font-size:19px;line-height:1.5;margin:0;color:#34414d;font-weight:600}
.cwf-design-section>header p{margin:6px 0 0;font-size:14px;color:#63707b;line-height:1.65}
.cwf-design-section .template-row{border-bottom:0;padding:6px 0}
.cwf-design-section .cwf-template-title h2{font-weight:600;font-size:16px}
.cwf-design-section .template-row>b{font-weight:600}
.cwf-grouped-template .cwf-ocr-group{margin-top:16px}
.cwf-grouped-template .cwf-ocr-radio-row>strong{font-size:15px;font-weight:400}
.cwf-grouped-template .nested-option strong{font-size:15px;font-weight:400}
.cwf-grouped-template .cwf-grouped-failure{display:block}
.cwf-grouped-template .cwf-grouped-failure>div{width:100%}
.cwf-grouped-template .cwf-rule-table{min-width:900px}
.cwf-grouped-template .cwf-template-extension{display:contents}
@media(max-width:1100px){.cwf-template:not(.cwf-grouped-template){--template-label:285px;--template-label-neg:-285px}.cwf-template:not(.cwf-grouped-template) .cwf-template-title p{white-space:normal}}
@media(max-width:600px){.cwf-ocr-radio-row{grid-template-columns:minmax(0,1fr) 58px 58px}.cwf-ocr-radio-row>strong{padding-left:0;font-size:14px}.cwf-ocr-radio-row .radio-choice{font-size:14px}.cwf-grouped-template .template-row{grid-template-columns:1fr;gap:8px}.cwf-grouped-template .document-suboptions{grid-column:1}.cwf-grouped-template .nested-option{width:100%;margin-left:0;flex-basis:100%;grid-template-columns:minmax(0,1fr) 58px 58px}.cwf-grouped-template .document-suboptions .nested-option{margin-left:0}.cwf-grouped-template .nested-option strong{padding-left:0;white-space:normal}.cwf-section-nav{flex-wrap:nowrap;overflow:auto;gap:0}.cwf-design-section{scroll-margin-top:65px}}

.cwf-section-nav a[aria-current=location]{color:#168cf2;background:#eff7fe;font-weight:600}

@media(max-width:600px){.cwf-grouped-template .nested-option label.radio-choice{width:auto;min-width:0;column-gap:8px}.cwf-grouped-template .nested-option label.radio-choice>span{width:auto}.cwf-grouped-template .cwf-rule-table{min-width:900px}}

/* transitions-dev 21-accordion: authored grid/opacity recipe, scoped to the policy disclosure. */
.cwf-failure-disclosure{--acc-expand:250ms;--acc-collapse:250ms;--acc-ease:cubic-bezier(0.22,1,0.36,1)}
.cwf-failure-disclosure .t-acc-panel{display:grid;grid-template-rows:0fr;transition:grid-template-rows var(--acc-collapse) var(--acc-ease)}
.cwf-failure-disclosure[data-open="true"] .t-acc-panel{grid-template-rows:1fr;transition:grid-template-rows var(--acc-expand) var(--acc-ease)}
.cwf-failure-disclosure .t-acc-panel-inner{overflow:hidden;opacity:0;filter:blur(2px);transition:opacity var(--acc-collapse) var(--acc-ease),filter var(--acc-collapse) var(--acc-ease)}
.cwf-failure-disclosure[data-open="true"] .t-acc-panel-inner{opacity:1;filter:blur(0);transition:opacity var(--acc-expand) var(--acc-ease),filter var(--acc-expand) var(--acc-ease)}
@media(prefers-reduced-motion:reduce){.cwf-failure-disclosure .t-acc-panel,.cwf-failure-disclosure .t-acc-panel-inner{transition:none!important}}
/* Product profile: 250/150ms height/fade, no blur or decorative chevron for the existing Radio control. */
.cwf-failure-disclosure{--acc-collapse:150ms}
.cwf-failure-disclosure .t-acc-panel-inner{min-height:0;filter:none!important}
.cwf-failure-disclosure .cwf-rules-scroll{padding-top:18px}
.cwf-grouped-template .cwf-failure-mode>strong{padding-left:0}

.cwf-preview-toolbar>label{white-space:nowrap;color:#657781;font-size:14px}.cwf-field-control>select{width:100%;min-height:42px;border:1px solid #d7dee5;border-radius:3px;background:#fff;padding:0 32px 0 12px;font:inherit}.cwf-demo-result{max-width:100%;flex-wrap:wrap}.cwf-demo-result select{max-width:100%}

.cwf-outcome-icon.submitted{color:#168cf2;border-color:#c9def9;background:#f4f9ff}

@media(max-width:700px){
 .cwf-main:has(.cwf-editor-layout)>.topbar{height:auto;min-height:64px;flex-wrap:wrap;gap:10px;padding:12px 16px;flex-shrink:0}
 .cwf-main:has(.cwf-editor-layout)>.topbar h1{flex:1 1 100%;min-width:0;font-size:20px;line-height:1.45;white-space:normal;margin:0}
 .cwf-main:has(.cwf-editor-layout)>.topbar .top-actions{width:100%;max-width:100%;gap:8px;min-width:0}
 .cwf-main:has(.cwf-editor-layout)>.topbar .scenario-caption{display:none}
 .cwf-main:has(.cwf-editor-layout)>.topbar .scenario-navigator{flex:1;min-width:0}
 .cwf-main:has(.cwf-editor-layout)>.topbar .scenario-trigger{width:100%;max-width:100%;min-width:0}
 .cwf-editor .cwf-tabs{overflow-x:auto;max-width:100%;min-width:0}
 .cwf-editor .cwf-tabs>button{flex-shrink:0}
}

/* D46 text limits: retain existing field layout and motion. */
.cwf-field-error:not([hidden]){display:block;color:#bc3030;font-size:13px;line-height:1.6;margin-top:4px}.cwf-field-control>[aria-invalid="true"]{border-color:#bc3030}

/* v37: enlarged review uses the existing modal lifecycle and motion. */
.cwf-preview-head{flex-wrap:nowrap}.cwf-preview-head h2{white-space:nowrap}.cwf-preview-controls{display:flex;align-items:center;gap:8px;margin-left:auto;flex-shrink:0}.cwf-preview-enlarge{width:32px;height:32px;display:grid;place-items:center;flex:0 0 32px;border:1px solid #c9d3da;border-radius:3px;background:#fff;color:#65717b;padding:0;cursor:pointer}.cwf-preview-enlarge:hover{background:#eaf5ff;color:#168cf2}.cwf-preview-enlarge:focus-visible{outline:2px solid #0080ff;outline-offset:3px}
.cwf-preview-expanded{width:min(1328px,calc(100vw - 40px));max-width:none;max-height:calc(100vh - 32px);display:flex;flex-direction:column}.cwf-preview-expanded .cwf-preview-dialog-body{min-height:0;max-height:none;overflow:auto}.cwf-preview-expanded .dialog-actions{flex-shrink:0}.cwf-preview-expanded .cwf-source-desktop .cwf-source-frame{height:720px}

/* v38: fixed icon entry, enlarged mobile viewport, dismissible preview. */
.cwf-preview-expanded-mobile{width:min(520px,calc(100vw - 40px))}.cwf-mobile-expanded-canvas{position:relative;width:100%;aspect-ratio:360/640;overflow:hidden}.cwf-mobile-expanded-canvas>.cwf-source-phone,.cwf-mobile-expanded-canvas>.cwf-phone{position:absolute;top:0;left:0;width:360px;height:640px;max-width:none;margin:0;transform:scale(var(--cwf-mobile-scale,1));transform-origin:top left}

.cwf-editor-layout{scrollbar-gutter:stable}

/* v39: profile-owned footer text; preserve source styles in native frames. */
.cwf-phone{display:flex;flex-direction:column}.cwf-phone-body{flex:1}.cwf-phone-footer{text-align:center;color:#727f8c;font-size:14px;line-height:1.5;padding:10px 16px;overflow-wrap:anywhere}
