/* Shared enhancement inside the existing desktop/mobile screenshot window. */
ella-form-demo { display: block; height: 100%; }
ella-form-demo.cfd-ready > img,
ella-form-demo.cfd-ready > picture { display: none; }
.cfd { position: absolute; inset: 0 0 24px; container-type: inline-size; background: #fffdf8; color: #16241f; font-family: "Geist", Arial, sans-serif; font-size: 12px; text-align: left; }
.gm-feat-window .cfd { bottom: 16px; }
.cfd *, .cfd *::before, .cfd *::after { box-sizing: border-box; }
.cfd-display { height: calc(100% - 29px); overflow: hidden; }
.cfd-toolbar { height: 42px; display: flex; justify-content: space-between; align-items: center; padding: 7px 12px; border-bottom: 1px solid #e3dfd2; }
.cfd-toolbar small { display: block; color: #77796e; font: 8px/1.2 "Geist", Arial, sans-serif; letter-spacing: .6px; }
.cfd-toolbar strong { display: block; font: 15px/1.3 "Newsreader", Georgia, serif; }
.cfd-save { background: #ece8db; color: #8a877a; padding: 5px 16px; border-radius: 5px; font-size: 10px; transition: background .3s, color .3s; }
.cfd-save.is-ready { background: #4a641f; color: #fffdf8; }
.cfd-work { display: grid; grid-template-columns: minmax(0,1fr) 32%; height: calc(100% - 42px); background: #ece8db; }
.cfd-paper { background: #fff; margin: 10px 12px; padding: 12px 15px; min-width: 0; overflow: hidden; box-shadow: 0 2px 7px #16241f18; }
.cfd-paper h4 { margin: 0; font: 600 12px/1.2 "Newsreader", Georgia, serif; color: #16241f; }
.cfd-paper p { margin: 2px 0 4px; font: 7px/1.2 "Geist", Arial, sans-serif; color: #77796e; }
.cfd-rule { height: 1px; background: #e3dfd2; margin-bottom: 6px; }
.cfd-section { display: none; }
.cfd-section span { margin-left: 6px; font-weight: 400; }
.cfd-field { margin-bottom: 5px; min-width: 0; }
.cfd-field > span { display: block; color: #77796e; font: 7px/1.2 "Geist", Arial, sans-serif; margin-bottom: 2px; }
.cfd-box { position: relative; min-height: 19px; border: 1px solid #d9dcd8; padding: 2px 15px 2px 4px; background: #fff; font: 10px/13px "Geist", Arial, sans-serif; transition: background .25s, box-shadow .25s; }
.cfd-box b { font-weight: 400; overflow-wrap: anywhere; }
.cfd-box i { position: absolute; right: 4px; top: 2px; font-style: normal; color: #4a641f; opacity: 0; transition: opacity .25s; }
.cfd-field.is-active .cfd-box { background: #e8f0d8; box-shadow: 0 0 0 2px #4a641f25; border-color: #91a96a; }
.cfd-field.is-done .cfd-box { background: #eef5f9; }
.cfd-field.is-done .cfd-box i { opacity: 1; }
.cfd-missing { color: #9b9688; font-size: 8px; padding-right: 4px; }
.cfd-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cfd-side { border-left: 1px solid #e3dfd2; background: #f8f6ed; min-width: 0; overflow: hidden; }
.cfd-side-title { padding: 10px 9px 7px; display: flex; justify-content: space-between; gap: 4px; color: #77796e; font: 7px/1.3 "Geist", Arial, sans-serif; }
.cfd-entry { display: grid; gap: 2px; padding: 6px 9px; border-top: 1px solid #e3dfd2; opacity: 0; transform: translateY(4px); transition: opacity .3s, transform .3s; }
.cfd-entry.is-shown { opacity: 1; transform: translateY(0); }
.cfd-entry small { display: none; }
.cfd-entry strong { font: 400 9px/1.2 "Geist", Arial, sans-serif; overflow-wrap: anywhere; }
.cfd-entry > span { font: 7px/1.2 "Geist", Arial, sans-serif; color: #77796e; }
.cfd-controls { height: 29px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid #e3dfd2; padding: 0 6px 0 12px; background: #fffdf8; }
.cfd-status { font: 9px/1.2 "Geist", Arial, sans-serif; color: #657357; }
.cfd-controls button { appearance: none; border: 0; border-radius: 3px; background: transparent; color: #16241f; font: 10px/1.2 "Geist", Arial, sans-serif; padding: 6px; min-width: 44px; cursor: pointer; }
.cfd-controls button:focus-visible { outline: 2px solid #4a641f; outline-offset: -2px; }
@container (max-width: 480px) {
  .cfd-work { grid-template-columns: 1fr; }
  .cfd-side { display: none; }
  .cfd-paper { margin: 3px 8px; padding: 4px 8px; }
  .cfd-paper h4, .cfd-section { display: none; }
  .cfd-field { margin-bottom: 3px; }
  .cfd-field > span { margin-bottom: 1px; }
  .cfd-box { min-height: 17px; font-size: 9px; line-height: 11px; }
  .cfd-toolbar { height: 32px; padding-inline: 10px; }
  .cfd-work { height: calc(100% - 32px); }
}
@media (pointer: coarse) {
  .cfd-display { height: calc(100% - 44px); }
  .cfd-controls { height: 44px; }
  .cfd-controls button { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .cfd * { transition: none !important; }
}

/* Fit the two-line heading and let the paper continue below the preview. */
.cfd-toolbar { height: 42px; padding: 5px 12px; }
.cfd-toolbar > div { display: grid; gap: 2px; min-width: 0; }
.cfd-toolbar small { font-size: 7px; line-height: 1.2; }
.cfd-toolbar strong { font-size: 13px; line-height: 1.2; }
.cfd-work { align-items: start; overflow: hidden; }
.cfd-paper { min-height: 440px; overflow: visible; }
.cfd-section { display: block; background: #f0eee7; font: 600 7px/1.3 "Geist", Arial, sans-serif; padding: 4px; margin: 10px 0 8px; }
.cfd-field { margin-bottom: 9px; }
.cfd-box { min-height: 24px; padding-top: 4px; padding-bottom: 4px; }
.cfd-side { height: 100%; }
@container (max-width: 480px) {
  .cfd-toolbar { height: 38px; padding: 5px 10px; }
  .cfd-work { height: calc(100% - 38px); }
  .cfd-paper { padding: 12px; margin: 8px; }
  .cfd-paper h4 { display: block; }
  .cfd-section { display: block; }
  .cfd-field { margin-bottom: 9px; }
  .cfd-box { min-height: 24px; font-size: 10px; line-height: 13px; }
}

.cfd-toolbar strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cfd-save { flex-shrink: 0; }
@container (max-width: 250px) {
  .cfd-toolbar { padding-inline: 8px; gap: 6px; }
  .cfd-toolbar strong { font-size: 11px; }
  .cfd-toolbar small { font-size: 6px; letter-spacing: .3px; }
  .cfd-save { padding-inline: 8px; font-size: 8px; }
}

.cfd-field { margin-bottom: 4px; }
.cfd-box { min-height: 20px; padding-block: 2px; }
.cfd-section { margin: 6px 0 5px; padding: 3px 4px; }
@container (max-width: 480px) {
  .cfd-paper { padding: 8px 12px; }
  .cfd-field { margin-bottom: 4px; }
  .cfd-box { min-height: 20px; padding-block: 2px; }
}
