/* ==========================================================================
   Forms — CRM › Forms (/forms) and Admin › Content › Forms (/admin-forms).
   assets/js/app/forms.js. The page wears the settings kit (.lp2-st: st-head,
   st-sec, st-switch, st-radio-card, st-chip); everything here is scoped to
   .fm-page, or to the pop-ups the page opens (.fm-m, .fm-pv-modal, .fm-a-wrap).
   The public page people answer (/f/<token>) has its own inline styles in
   src/forms_core.php.
   ========================================================================== */

.fm-page { --fm-line: #e2e8f0; --fm-soft: #f6f8fb; --fm-ink2: #334155; --fm-ink3: #475569; }

/* ---- List: stats, cards ------------------------------------------------- */
.fm-page .fm-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
@media (max-width: 640px) { .fm-page .fm-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fm-page .fm-stat { background: #fff; border: 1px solid var(--fm-line); border-radius: 18px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.fm-page .fm-stat i { color: var(--lp2-h3, #4f46e5); font-size: 1.05rem; margin-bottom: 4px; }
.fm-page .fm-stat b { font-size: 1.45rem; font-weight: 800; color: #000; line-height: 1.1; font-variant-numeric: tabular-nums; }
.fm-page .fm-stat span { font-size: .78rem; font-weight: 700; color: var(--fm-ink3); }

.fm-page .fm-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
@media (min-width: 1100px) { .fm-page .fm-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fm-page .fm-card { position: relative; background: #fff; border: 1px solid var(--fm-line); border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; }
.fm-page .fm-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--fm-c); }
.fm-page .fm-card-main { display: flex; align-items: center; gap: 14px; padding: 16px 16px 12px 20px; background: none; border: 0; text-align: left; cursor: pointer; width: 100%; font: inherit; color: inherit; }
.fm-page .fm-card-main:hover .fm-card-t b { text-decoration: underline; text-underline-offset: 3px; }
.fm-page .fm-card-ic { width: 44px; height: 44px; flex: none; border-radius: 14px; display: grid; place-items: center; font-size: 1.2rem; color: var(--fm-c); background: color-mix(in srgb, var(--fm-c) 12%, #fff); }
.fm-page .fm-card-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.fm-page .fm-card-t b { font-size: 1rem; font-weight: 800; color: #000; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-page .fm-card-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .76rem; font-weight: 650; color: var(--fm-ink3); }
.fm-page .fm-card-meta i { margin-right: 2px; }
.fm-page .fm-card-n { flex: none; text-align: right; display: flex; flex-direction: column; }
.fm-page .fm-card-n b { font-size: 1.35rem; font-weight: 800; color: #000; font-variant-numeric: tabular-nums; line-height: 1.1; }
.fm-page .fm-card-n span { font-size: .72rem; font-weight: 700; color: var(--fm-ink3); }
.fm-page .fm-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 10px 14px 12px 20px; border-top: 1px solid #eef1f5; }
.fm-page .fm-card-acts { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.fm-page .fm-onoff { display: inline-flex; align-items: center; margin-right: 6px; }
.fm-page .fm-act { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 11px; border: 1px solid var(--fm-line); background: #fff; color: #000; font: 700 .8rem/1 var(--font-body); cursor: pointer; }
.fm-page .fm-act:hover { background: var(--fm-soft); }
.fm-page .fm-act-i { width: 36px; padding: 0; justify-content: center; }
.fm-page .fm-act.is-bad { color: #b91c1c; }
@media (max-width: 420px) { .fm-page .fm-act span { display: none; } .fm-page .fm-act { width: 36px; padding: 0; justify-content: center; } }

/* ---- Empty + templates (page and the New form pop-up) ------------------- */
.fm-page .fm-empty { text-align: center; background: #fff; border: 1px solid var(--fm-line); border-radius: 22px; padding: 28px 20px; margin-bottom: 18px; }
.fm-page .fm-empty-ic { width: 64px; height: 64px; border-radius: 20px; display: inline-grid; place-items: center; font-size: 1.7rem; color: var(--lp2-h3, #4f46e5); background: var(--lp2-h1, #eef2ff); margin-bottom: 10px; }
.fm-page .fm-empty h3 { margin: 0 0 6px; font-size: 1.2rem; font-weight: 800; color: #000; }
.fm-page .fm-empty p { margin: 0 auto; max-width: 520px; color: var(--fm-ink2, #334155); font-weight: 600; }
:is(.fm-page, .fm-m) .fm-tpl-h { font-size: .8rem; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; color: #475569; margin: 0 0 10px; }
:is(.fm-page, .fm-m) .fm-tpls { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.fm-m .fm-tpls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .fm-m .fm-tpls { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
:is(.fm-page, .fm-m) .fm-tpl { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; padding: 14px; border-radius: 18px; border: 1.5px solid #e2e8f0; background: #fff; cursor: pointer; font: inherit; color: #000; transition: border-color .15s, transform .15s, box-shadow .15s; }
:is(.fm-page, .fm-m) .fm-tpl:hover { border-color: var(--fm-c); box-shadow: 0 6px 18px color-mix(in srgb, var(--fm-c) 18%, transparent); transform: translateY(-1px); }
:is(.fm-page, .fm-m) .fm-tpl-ic { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; font-size: 1.15rem; color: var(--fm-c); background: color-mix(in srgb, var(--fm-c) 12%, #fff); margin-bottom: 4px; }
:is(.fm-page, .fm-m) .fm-tpl b { font-size: .9rem; font-weight: 800; }
:is(.fm-page, .fm-m) .fm-tpl span:last-child { font-size: .76rem; font-weight: 650; color: #475569; }

/* ---- Editor head + tabs ------------------------------------------------- */
.fm-page .fm-ed-head .page-sub { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fm-page .fm-dirty { font-size: .74rem; font-weight: 800; color: #b45309; display: inline-flex; align-items: center; gap: 4px; }
.fm-page .fm-dirty i { font-size: .45rem; }
.fm-page .fm-head-acts { display: flex; gap: 8px; align-items: center; }
.fm-page .fm-tabs { margin-bottom: 14px; }
.fm-page .fm-tabs .doc-tab[disabled] { opacity: .45; cursor: not-allowed; }
.fm-page .fm-body { max-width: 860px; }

/* ---- Questions ---------------------------------------------------------- */
/* The heading card: a light solid tint of the form's colour, not frosted
   (beats the glass layer's #main-app #page-content rule in glass.css). */
#main-app #page-content .fm-page .fm-meta-card {
    background: #f5f7fb;
    background: color-mix(in srgb, var(--fm-c) 9%, #fff);
    border-color: #e2e8f0;
    border-color: color-mix(in srgb, var(--fm-c) 20%, #fff);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: none;
}
.fm-page .fm-meta-card { background: #fff; border: 1px solid var(--fm-line); border-radius: 20px; padding: 16px 18px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 6px; }
body #page-content .fm-page .fm-title-in { border: 0; border-bottom: 1.5px solid transparent; font: 800 1.35rem/1.25 var(--font-body); color: #000; padding: 4px 0; background: transparent; outline: none; width: 100%; }
body #page-content .fm-page :is(.fm-title-in, .fm-desc-in):focus { border-bottom-color: var(--fm-c); }
body #page-content .fm-page .fm-desc-in { border: 0; border-bottom: 1.5px solid transparent; font: 600 .92rem/1.5 var(--font-body); color: var(--fm-ink2); padding: 4px 0; background: transparent; outline: none; resize: vertical; width: 100%; min-height: 0; }
.fm-page .fm-qs { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.fm-page .fm-noq { padding: 18px; text-align: center; color: var(--fm-ink3); font-weight: 700; border: 1.5px dashed #cbd5e1; border-radius: 18px; }
.fm-page .fm-q { background: #fff; border: 1px solid var(--fm-line); border-radius: 18px; transition: box-shadow .15s, border-color .15s; }
.fm-page .fm-q.is-open { border-color: color-mix(in srgb, var(--fm-c) 55%, #fff); box-shadow: 0 8px 24px rgba(15, 23, 42, .08); }
.fm-page .fm-q.is-sec { background: var(--fm-soft); }
.fm-page .fm-q-head { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: none; border: 0; text-align: left; cursor: pointer; font: inherit; color: inherit; border-radius: 18px; }
.fm-page .fm-q-num, .fm-a-wrap .fm-q-num { width: 30px; height: 30px; flex: none; border-radius: 10px; display: grid; place-items: center; font-size: .82rem; font-weight: 800; color: var(--fm-c, #4f46e5); background: color-mix(in srgb, var(--fm-c, #4f46e5) 12%, #fff); }
.fm-page .fm-q-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fm-page .fm-q-t b { font-weight: 800; color: #000; font-size: .94rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-page .fm-q-t b em { font-style: normal; color: #94a3b8; }
.fm-page .fm-q-t > span { font-size: .75rem; font-weight: 700; color: var(--fm-ink3); }
.fm-page .fm-req { color: #b91c1c; }
.fm-page .fm-q-chev { color: #64748b; }
.fm-page .fm-q-body { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 12px; }
.fm-page .fm-q-top { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 8px; }
@media (max-width: 640px) { .fm-page .fm-q-top { grid-template-columns: minmax(0, 1fr); } }
.fm-page .fm-in { width: 100%; min-height: 44px; border: 1.5px solid #cbd5e1; border-radius: 12px; padding: 9px 12px; font: 600 .9rem/1.35 var(--font-body); color: #000; background: #fff; outline: none; }
.fm-page textarea.fm-in { resize: vertical; }
.fm-page .fm-in:focus { border-color: var(--fm-c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--fm-c) 18%, transparent); }
.fm-page .fm-q-label { font-weight: 750; font-size: .98rem; }
.fm-page .fm-f { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.fm-page .fm-row2 > .fm-f { flex: 1 1 180px; }
.fm-page .fm-lbl { font-size: .76rem; font-weight: 800; color: #334155; }
.fm-page .fm-row2 { display: flex; gap: 10px; flex-wrap: wrap; }
.fm-page .fm-mt { margin-top: 12px; }
.fm-page .fm-hint { margin: 0; font-size: .78rem; font-weight: 650; color: var(--fm-ink3); }
.fm-page .fm-opts { display: flex; flex-direction: column; gap: 6px; }
.fm-page .fm-opt { display: flex; align-items: center; gap: 8px; }
.fm-page .fm-opt .fm-in { min-height: 40px; padding: 7px 10px; }
.fm-page .fm-opt-mark { width: 18px; height: 18px; flex: none; border: 2px solid #94a3b8; border-radius: 50%; display: grid; place-items: center; font-size: .66rem; font-weight: 800; color: #64748b; }
.fm-page .fm-opt-mark.is-box { border-radius: 5px; }
.fm-page .fm-opt-mark.is-num { border: 0; }
.fm-page .fm-other-t { flex: 1; font-size: .86rem; font-weight: 650; color: var(--fm-ink3); padding: 9px 0; }
.fm-page .fm-opt-add { display: flex; gap: 14px; flex-wrap: wrap; padding-left: 26px; }
.fm-page .fm-link, .fm-pv .fm-link { background: none; border: 0; padding: 4px 0; font: 800 .82rem/1.2 var(--font-body); color: var(--fm-c, #4f46e5); cursor: pointer; display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }
.fm-page .fm-link:hover { text-decoration: underline; }
/* "Add help text and an example answer" until a question needs them (App._fmMoreHtml) */
.fm-page .fm-more-btn { align-self: flex-start; margin: 2px 0; }
.fm-page .fm-ib { width: 36px; height: 36px; flex: none; border-radius: 10px; border: 1px solid var(--fm-line); background: #fff; color: #334155; display: inline-grid; place-items: center; cursor: pointer; }
.fm-page .fm-ib:hover:not([disabled]) { background: var(--fm-soft); color: #000; }
.fm-page .fm-ib[disabled] { opacity: .35; cursor: default; }
.fm-page .fm-ib.is-bad { color: #b91c1c; }
.fm-page .fm-q-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid #eef1f5; }
.fm-page .fm-reqsw { display: inline-flex; align-items: center; gap: 10px; font-size: .86rem; font-weight: 800; color: #000; cursor: pointer; }
.fm-page .fm-q-tools { display: inline-flex; gap: 6px; }
.fm-page .fm-prev-stars { color: #f59e0b; font-size: 1.6rem; letter-spacing: 2px; line-height: 1; }
.fm-page .fm-prev-scale { display: flex; gap: 4px; flex-wrap: wrap; }
.fm-page .fm-prev-scale span { min-width: 34px; height: 34px; border-radius: 10px; border: 1.5px solid #cbd5e1; display: grid; place-items: center; font-weight: 800; font-size: .82rem; color: #334155; }

.fm-page .fm-palette { background: #fff; border: 1.5px dashed color-mix(in srgb, var(--fm-c) 45%, #cbd5e1); border-radius: 20px; padding: 14px 16px 16px; }
.fm-page .fm-palette-h { font-weight: 800; color: #000; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.fm-page .fm-palette-h i { color: var(--fm-c); }
.fm-page .fm-pal-g { margin-top: 10px; }
.fm-page .fm-pal-gt { display: block; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; color: #475569; margin-bottom: 6px; }
.fm-page .fm-pal-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.fm-page .fm-pal-btn { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--fm-line); background: var(--fm-soft); font: 700 .82rem/1.2 var(--font-body); color: #000; cursor: pointer; text-align: left; }
.fm-page .fm-pal-btn > i:first-child { color: var(--fm-c); font-size: 1rem; }
.fm-page .fm-pal-btn:hover:not([disabled]) { background: #fff; border-color: var(--fm-c); }
.fm-page .fm-pal-btn[disabled] { opacity: .55; cursor: not-allowed; }
.fm-page .fm-lock { margin-left: auto; color: #64748b; }

/* ---- Settings ----------------------------------------------------------- */
.fm-page .fm-body-settings .st-sec { margin-bottom: 12px; }
.fm-page .fm-body-settings .st-sec-body { display: flex; flex-direction: column; gap: 12px; }
.fm-page .fm-sws { display: flex; gap: 10px; flex-wrap: wrap; }
.fm-page .fm-sw { width: 40px; height: 40px; border-radius: 50%; border: 3px solid #fff; background: var(--sw); box-shadow: 0 0 0 1.5px #cbd5e1; cursor: pointer; position: relative; display: grid; place-items: center; }
.fm-page .fm-sw.is-on { box-shadow: 0 0 0 3px #000; }
.fm-page .fm-sw-custom { background: conic-gradient(#ef4444, #f59e0b, #22c55e, #06b6d4, #6366f1, #d946ef, #ef4444); color: #fff; }
.fm-page .fm-sw-custom.is-on { background: var(--sw); }
.fm-page .fm-sw-custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.fm-page .fm-sw-custom i { pointer-events: none; text-shadow: 0 1px 2px rgba(0,0,0,.4); }

/* ---- Share -------------------------------------------------------------- */
.fm-page .fm-share { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 16px; background: #fff; border: 1px solid var(--fm-line); border-radius: 22px; padding: 18px; align-items: start; }
@media (max-width: 760px) { .fm-page .fm-share { grid-template-columns: minmax(0, 1fr); } }
.fm-page .fm-share-l { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.fm-page .fm-linkbox { display: flex; gap: 8px; }
.fm-page .fm-linkbox .fm-in { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: .82rem; }
.fm-page .fm-share-btns { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 8px; }
.fm-page .fm-sbtn { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 8px; border-radius: 16px; border: 1px solid var(--fm-line); background: var(--fm-soft); color: #000; text-decoration: none; font: 800 .78rem/1.2 var(--font-body); cursor: pointer; }
.fm-page .fm-sbtn i { font-size: 1.35rem; color: #334155; }
.fm-page .fm-sbtn.is-wa i { color: #128c4b; }
.fm-page .fm-sbtn.is-sms i { color: #2563eb; }
.fm-page .fm-sbtn.is-mail i { color: #b45309; }
.fm-page .fm-sbtn:hover { background: #fff; border-color: #94a3b8; }
.fm-page .fm-share-r { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.fm-page .fm-qr { width: 100%; max-width: 240px; aspect-ratio: 1; border-radius: 18px; border: 1px solid var(--fm-line); background: #fff; display: grid; place-items: center; overflow: hidden; padding: 6px; }
.fm-page .fm-qr-img { width: 100%; height: auto; image-rendering: pixelated; display: block; }

/* ---- Answers ------------------------------------------------------------ */
.fm-page .fm-ans-top { display: grid; grid-template-columns: auto auto minmax(160px, 1fr) auto; gap: 12px 18px; align-items: center; background: #fff; border: 1px solid var(--fm-line); border-radius: 20px; padding: 16px 18px; margin-bottom: 12px; }
@media (max-width: 640px) { .fm-page .fm-ans-top { grid-template-columns: 1fr 1fr; } .fm-page .fm-ans-spark, .fm-page .fm-ans-x { grid-column: 1 / -1; } }
.fm-page .fm-ans-x { display: flex; flex-wrap: wrap; gap: 8px; }
.fm-page .fm-ans-k { display: flex; flex-direction: column; }
.fm-page .fm-ans-k b { font-size: 1.6rem; font-weight: 800; color: #000; line-height: 1.1; font-variant-numeric: tabular-nums; }
.fm-page .fm-ans-k span { font-size: .76rem; font-weight: 700; color: var(--fm-ink3); }
.fm-page .fm-ans-spark { display: flex; flex-direction: column; gap: 4px; }
.fm-page .fm-ans-spark > span { font-size: .7rem; font-weight: 700; color: var(--fm-ink3); }
.fm-page .fm-spark { height: 44px; display: flex; align-items: flex-end; gap: 3px; }
.fm-page .fm-spark span { flex: 1; max-width: 18px; background: var(--fm-c); border-radius: 4px 4px 0 0; opacity: .85; }
.fm-page .fm-seg { margin-bottom: 12px; }
.fm-page .fm-sum { display: flex; flex-direction: column; gap: 10px; }
.fm-page .fm-sum-card { background: #fff; border: 1px solid var(--fm-line); border-radius: 18px; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.fm-page .fm-sum-h { display: flex; gap: 12px; align-items: flex-start; }
.fm-page .fm-sum-h > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fm-page .fm-sum-h b { font-weight: 800; color: #000; }
.fm-page .fm-sum-h span { font-size: .76rem; font-weight: 700; color: var(--fm-ink3); }
.fm-page .fm-bars { display: flex; flex-direction: column; gap: 7px; }
.fm-page .fm-bar { display: grid; grid-template-columns: minmax(80px, 180px) minmax(0, 1fr) 76px; gap: 10px; align-items: center; font-size: .84rem; }
@media (max-width: 520px) { .fm-page .fm-bar { grid-template-columns: minmax(0, 1fr) 70px; } .fm-page .fm-bar-t { grid-column: 1 / -1; grid-row: 2; } }
.fm-page .fm-bar-l { font-weight: 700; color: #000; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-page .fm-bar-t { height: 12px; background: #eef1f5; border-radius: 6px; overflow: hidden; }
.fm-page .fm-bar-t span { display: block; height: 100%; background: var(--fm-c); border-radius: 6px; min-width: 2px; }
.fm-page .fm-bar-n { text-align: right; font-weight: 700; color: var(--fm-ink3); font-variant-numeric: tabular-nums; }
.fm-page .fm-bar-n b { color: #000; }
.fm-page .fm-avg { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.fm-page .fm-avg b { font-size: 1.8rem; font-weight: 800; color: #000; line-height: 1; }
.fm-page .fm-avg span { font-size: .84rem; font-weight: 700; color: var(--fm-ink3); }
.fm-page .fm-avg em { font-style: normal; font-size: .8rem; font-weight: 700; color: var(--fm-ink3); flex-basis: 100%; }
.fm-page .fm-avg-stars { color: #f59e0b; letter-spacing: 1px; }
.fm-page .fm-nps { display: flex; flex-direction: column; gap: 8px; }
.fm-page .fm-nps-score { display: flex; align-items: baseline; gap: 8px; }
.fm-page .fm-nps-score b { font-size: 1.8rem; font-weight: 800; color: #000; line-height: 1; }
.fm-page .fm-nps-score span { font-size: .84rem; font-weight: 700; color: var(--fm-ink3); }
.fm-page .fm-nps-bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: #eef1f5; gap: 2px; }
.fm-page .fm-nps-bar .p, .fm-page .fm-nps-k i.p { background: #059669; }
.fm-page .fm-nps-bar .m, .fm-page .fm-nps-k i.m { background: #94a3b8; }
.fm-page .fm-nps-bar .d, .fm-page .fm-nps-k i.d { background: #dc2626; }
.fm-page .fm-nps-k { display: flex; gap: 6px 16px; flex-wrap: wrap; font-size: .78rem; font-weight: 700; color: #334155; }
.fm-page .fm-nps-k i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.fm-page .fm-latest { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.fm-page .fm-latest li { background: var(--fm-soft); border-radius: 12px; padding: 9px 12px; font-size: .88rem; font-weight: 600; color: #000; white-space: pre-line; overflow-wrap: anywhere; }

.fm-page .fm-search { display: flex; align-items: center; gap: 8px; background: #fff; border: 1.5px solid #cbd5e1; border-radius: 14px; padding: 0 6px 0 12px; margin-bottom: 10px; }
.fm-page .fm-search > i { color: #64748b; }
.fm-page .fm-search .fm-in { border: 0; box-shadow: none; padding-left: 0; }
.fm-page .fm-search .fm-ib { border: 0; }
.fm-page .fm-rs { background: #fff; border: 1px solid var(--fm-line); border-radius: 18px; overflow: hidden; }
.fm-page .fm-r { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: #fff; border: 0; border-top: 1px solid #eef1f5; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.fm-page .fm-r:first-child { border-top: 0; }
.fm-page .fm-r:hover { background: var(--fm-soft); }
.fm-page .fm-r-ava { width: 38px; height: 38px; flex: none; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: .8rem; color: #fff; background: var(--h); }
.fm-page .fm-r-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fm-page .fm-r-t b { font-weight: 800; color: #000; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-page .fm-r-t span { font-size: .8rem; font-weight: 600; color: var(--fm-ink3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-page .fm-r-ok { color: #0284c7; font-size: .8rem; }
.fm-page .fm-r-d { font-size: .76rem; font-weight: 700; color: var(--fm-ink3); flex: none; }
.fm-page .fm-r > .bi-chevron-right { color: #94a3b8; }
.fm-page .fm-pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 12px; font-size: .84rem; font-weight: 700; color: #334155; }

/* ---- Pop-ups: one answer, preview -------------------------------------- */
.fm-a-wrap { display: flex; flex-direction: column; gap: 4px; }
.fm-a-wrap .fm-a-who { background: #f0f9ff; border: 1px solid #bae6fd; color: #075985; border-radius: 12px; padding: 9px 12px; font-size: .84rem; font-weight: 700; margin-bottom: 6px; }
.fm-a-wrap .fm-a-sec { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; color: #475569; padding: 12px 0 2px; border-top: 1px solid #eef1f5; margin-top: 4px; }
.fm-a-wrap .fm-a { padding: 10px 0; border-bottom: 1px solid #f1f5f9; }
.fm-a-wrap .fm-a-q { font-size: .78rem; font-weight: 800; color: #475569; margin-bottom: 3px; }
.fm-a-wrap .fm-a-v { font-size: .95rem; font-weight: 650; color: #000; overflow-wrap: anywhere; }
.fm-a-wrap .fm-a-v a { color: #1d4ed8; font-weight: 750; }
.fm-a-wrap .fm-a-none { color: #94a3b8; font-weight: 600; font-style: italic; }
.fm-a-wrap .fm-a-stars { color: #f59e0b; letter-spacing: 1px; }
.fm-a-wrap .fm-a-stars span { color: #e2e8f0; }
.fm-a-wrap .fm-file { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 6px; padding: 8px 10px; border: 1px solid #e2e8f0; border-radius: 12px; background: #f8fafc; cursor: pointer; font: inherit; text-align: left; color: #000; }
.fm-a-wrap .fm-file img { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; flex: none; }
.fm-a-wrap .fm-file > i:first-child { font-size: 1.5rem; color: #475569; width: 48px; text-align: center; }
.fm-a-wrap .fm-file span { flex: 1; min-width: 0; font-weight: 700; font-size: .86rem; overflow-wrap: anywhere; }
.fm-a-wrap .fm-file small { display: block; color: #64748b; font-weight: 600; }
/* A photo answer: shown large, tap for the full screen, Save beside its name. */
.fm-a-wrap .fm-img { margin-top: 8px; border: 1px solid #e2e8f0; border-radius: 14px; overflow: hidden; background: #fff; }
.fm-a-wrap .fm-img-view { position: relative; display: block; width: 100%; padding: 0; border: 0; background: #f1f5f9; cursor: zoom-in; }
.fm-a-wrap .fm-img-view img { display: block; width: 100%; height: auto; max-height: 360px; min-height: 120px; object-fit: contain; }
.fm-a-wrap .fm-img-zoom { position: absolute; right: 8px; bottom: 8px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(15, 23, 42, .65); color: #fff; font-size: .9rem; }
.fm-a-wrap .fm-img-bad .fm-img-view { cursor: default; }
.fm-a-wrap .fm-img-bad .fm-img-view img { visibility: hidden; min-height: 60px; }
.fm-a-wrap .fm-img-bad .fm-img-view::after { content: "Photo could not load. Use Save to get it."; position: absolute; inset: 0; display: grid; place-items: center; color: #64748b; font-size: .85rem; font-weight: 700; }
.fm-a-wrap .fm-img-bad .fm-img-zoom { display: none; }
.fm-a-wrap .fm-img-bar { display: flex; align-items: center; gap: 10px; padding: 8px 10px; }
.fm-a-wrap .fm-img-bar span { flex: 1; min-width: 0; font-weight: 700; font-size: .86rem; overflow-wrap: anywhere; }
.fm-a-wrap .fm-img-bar small { display: block; color: #64748b; font-weight: 600; }
.fm-a-wrap .fm-img-bar .btn { flex: none; }
.fm-viewer { position: fixed; inset: 0; z-index: 10050; display: flex; flex-direction: column; background: rgba(0, 0, 0, .96); }
.fm-viewer-top { display: flex; align-items: center; gap: 8px; padding: calc(10px + env(safe-area-inset-top)) 12px 10px 16px; color: #fff; }
.fm-viewer-top span { flex: 1; min-width: 0; font-weight: 700; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-viewer-btn { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; font-size: 1.1rem; cursor: pointer; flex: none; }
.fm-viewer-btn:hover { background: rgba(255, 255, 255, .24); }
.fm-viewer-stage { flex: 1; min-height: 0; display: grid; place-items: center; padding: 8px 8px calc(16px + env(safe-area-inset-bottom)); overflow: auto; }
.fm-viewer-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.modal.fm-pv-modal { width: min(560px, 100%); }
.fm-pv { display: flex; flex-direction: column; gap: 8px; }
.fm-pv-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .8rem; font-weight: 800; color: #475569; }
.fm-pv .fm-link { color: #4f46e5; }
.fm-pv-frame { width: 100%; height: min(70vh, 720px); border: 1px solid #e2e8f0; border-radius: 18px; background: #f4f6f8; }

/* ---- Send to customers / users ----------------------------------------- */
.fm-page .fm-sendcard { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: linear-gradient(135deg, color-mix(in srgb, var(--fm-c) 10%, #fff), #fff); border: 1px solid color-mix(in srgb, var(--fm-c) 30%, #e2e8f0); border-radius: 20px; padding: 14px 16px; margin-bottom: 12px; }
.fm-page .fm-sendcard-ic { width: 44px; height: 44px; flex: none; border-radius: 14px; display: grid; place-items: center; font-size: 1.2rem; color: #fff; background: var(--fm-c); }
.fm-page .fm-sendcard > div { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fm-page .fm-sendcard b { font-weight: 800; color: #000; }
.fm-page .fm-sendcard span { font-size: .82rem; font-weight: 600; color: #334155; }

.modal.fm-snd-modal { width: min(620px, 100%); }
.fm-snd { display: flex; flex-direction: column; gap: 12px; }
.fm-snd .fm-lbl { font-size: .76rem; font-weight: 800; color: #334155; }
.fm-snd .fm-f { display: flex; flex-direction: column; gap: 5px; }
.fm-snd .fm-in { width: 100%; min-height: 44px; border: 1.5px solid #cbd5e1; border-radius: 12px; padding: 9px 12px; font: 600 .9rem/1.4 var(--font-body); color: #000; background: #fff; outline: none; }
.fm-snd textarea.fm-in { resize: vertical; }
.fm-snd .fm-in:focus { border-color: #4f46e5; box-shadow: 0 0 0 3px rgba(79, 70, 229, .15); }
.fm-snd .fm-hint { font-size: .76rem; font-weight: 600; color: #475569; }
.fm-snd .fm-grps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: -4px; }
@media (max-width: 520px) { .fm-snd .fm-grps { grid-template-columns: minmax(0, 1fr); } }
.fm-snd .fm-grp { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1.5px solid #e2e8f0; border-radius: 14px; background: #fff; cursor: pointer; min-width: 0; }
.fm-snd .fm-grp input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.fm-snd .fm-grp:has(input:focus-visible) { outline: 3px solid rgba(79, 70, 229, .35); outline-offset: 2px; }
.fm-snd .fm-grp.is-on { border-color: #4f46e5; background: #eef2ff; }
.fm-snd .fm-grp.is-off { opacity: .55; cursor: not-allowed; }
.fm-snd .fm-grp-ic { width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center; background: #f1f5f9; color: #334155; }
.fm-snd .fm-grp.is-on .fm-grp-ic { background: #4f46e5; color: #fff; }
.fm-snd .fm-grp-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.fm-snd .fm-grp-t b { font-size: .86rem; font-weight: 800; color: #000; }
.fm-snd .fm-grp-t span { font-size: .72rem; font-weight: 600; color: #475569; }
.fm-snd .fm-grp em { font-style: normal; font-weight: 800; font-size: .86rem; color: #000; background: #f1f5f9; border-radius: 99px; padding: 2px 9px; font-variant-numeric: tabular-nums; }
.fm-snd .fm-grp.is-on em { background: #fff; }
.fm-snd .fm-chs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: -4px; }
@media (max-width: 520px) { .fm-snd .fm-chs { grid-template-columns: minmax(0, 1fr); } }
.fm-snd .fm-ch { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border: 1.5px solid #e2e8f0; border-radius: 14px; cursor: pointer; }
.fm-snd .fm-ch.is-on { border-color: #4f46e5; background: #eef2ff; }
.fm-snd .fm-ch input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: #4f46e5; flex: none; }
.fm-snd .fm-ch > i { color: #4f46e5; margin-top: 1px; }
.fm-snd .fm-ch span { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.fm-snd .fm-ch b { font-size: .84rem; font-weight: 800; color: #000; }
.fm-snd .fm-ch small { font-size: .7rem; font-weight: 600; color: #475569; }
.fm-snd .fm-cost { display: flex; gap: 10px; align-items: flex-start; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 10px 12px; font-size: .84rem; font-weight: 600; color: #334155; }
.fm-snd .fm-cost i { color: #2563eb; margin-top: 2px; }
.fm-snd .fm-cost b { color: #000; }
.fm-snd .fm-cost.is-short { background: #fff7ed; border-color: #fed7aa; color: #000; }
.fm-snd .fm-cost.is-short i { color: #b45309; }
.fm-short { display: flex; flex-direction: column; gap: 10px; }
.fm-short p { margin: 0; color: #000; font-size: .95rem; line-height: 1.5; }
.fm-short .fm-short-figs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fm-short .fm-short-fig { padding: 10px 12px; border-radius: 12px; background: #f8fafc; border: 1px solid #e2e8f0; min-width: 0; }
.fm-short .fm-short-fig span { display: block; font-size: .75rem; font-weight: 600; color: #475569; }
.fm-short .fm-short-fig b { display: block; font-size: 1rem; color: #000; overflow-wrap: anywhere; }
.fm-short .fm-short-ask { color: #334155; font-size: .88rem; }
.fm-snd .fm-pick { align-self: flex-start; background: none; border: 0; padding: 2px 0; font: 800 .82rem/1.2 var(--font-body); color: #4f46e5; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.fm-snd .fm-link { background: none; border: 0; padding: 0; font: 800 .82rem/1.2 var(--font-body); color: #4f46e5; cursor: pointer; }
.fm-snd .fm-snd-prog { font-size: .86rem; font-weight: 700; color: #334155; text-align: center; }
.fm-snd .fm-snd-lock { display: flex; align-items: center; gap: 10px; background: #fffbeb; border: 1px solid #fde68a; color: #92400e; border-radius: 12px; padding: 10px 12px; font-size: .86rem; font-weight: 700; }
.fm-snd .fm-snd-lock i { font-size: 1.05rem; }

/* Grid, repeating group and "show only if" in the builder. */
.fm-page .fm-cur { text-transform: uppercase; max-width: 120px; }
.fm-page .fm-mx-ed > .fm-opts { flex: 1 1 220px; }
.fm-page .fm-q-if { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: #eef2ff; color: #3730a3; font-size: .72rem; font-weight: 800; }
.fm-page .fm-subs { display: flex; flex-direction: column; gap: 8px; }
.fm-page .fm-sub { border: 1px solid var(--fm-line); border-radius: 14px; padding: 10px; background: var(--fm-soft); display: flex; flex-direction: column; gap: 8px; }
.fm-page .fm-sub-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fm-page .fm-sub-top > .fm-in { flex: 1 1 180px; width: auto; }
.fm-page .fm-sub-top > .fm-sub-type { flex: 0 1 190px; }
.fm-page .fm-sub-n { width: 26px; height: 26px; flex: none; border-radius: 8px; background: #fff; border: 1px solid var(--fm-line); display: grid; place-items: center; font-size: .78rem; font-weight: 800; color: #334155; }
.fm-page .fm-sub-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fm-page .fm-sub-foot .fm-ib { width: 32px; height: 32px; }
.fm-page .fm-logic-add { align-self: flex-start; }
.fm-page .fm-logic { border: 1px solid #c7d2fe; background: #f5f7ff; border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.fm-page .fm-logic-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .86rem; color: #000; }
.fm-page .fm-logic-h > i { color: #4338ca; }
.fm-page .fm-logic-h .fm-lg-m { width: auto; min-height: 36px; padding: 5px 10px; }
.fm-page .fm-lg-r { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fm-page .fm-lg-r .fm-in { width: auto; min-height: 40px; padding: 7px 10px; }
.fm-page .fm-lg-r .fm-lg-q { flex: 2 1 200px; min-width: 0; }
.fm-page .fm-lg-r .fm-lg-op { flex: 0 1 150px; }
.fm-page .fm-lg-r .fm-lg-v { flex: 1 1 140px; min-width: 0; }
.fm-page .fm-lg-r.is-bad .fm-lg-q { border-color: #f59e0b; }
.fm-page .fm-lg-and { font-size: .74rem; font-weight: 800; color: #4338ca; text-transform: uppercase; letter-spacing: .04em; width: 100%; }
.fm-page .fm-lg-warn { color: #92400e; }

/* New answer kinds in an answer and in the summary. */
.fm-a-wrap .fm-a-grid, .fm-a-wrap .fm-a-items { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.fm-a-wrap .fm-a-grid > div, .fm-a-wrap .fm-a-item-r { display: flex; justify-content: space-between; gap: 12px; padding: 6px 10px; border-radius: 10px; background: #f8fafc; }
.fm-a-wrap .fm-a-grid span, .fm-a-wrap .fm-a-item-r span { color: #475569; font-weight: 650; }
.fm-a-wrap .fm-a-grid b, .fm-a-wrap .fm-a-item-r b { color: #000; text-align: right; overflow-wrap: anywhere; }
.fm-a-wrap .fm-a-item { border: 1px solid #e2e8f0; border-radius: 12px; padding: 8px; display: flex; flex-direction: column; gap: 4px; }
.fm-a-wrap .fm-a-item-h { font-size: .8rem; font-weight: 800; color: #334155; padding: 0 2px; }
.fm-a-wrap .fm-a-map { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.fm-a-wrap .fm-a-map small, .fm-a-wrap .fm-a-sub { color: #64748b; font-weight: 600; font-size: .8rem; }
.fm-a-wrap .fm-a-sub { display: block; }
.fm-page .fm-gsum { overflow-x: auto; }
.fm-page .fm-gsum table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.fm-page .fm-gsum th, .fm-page .fm-gsum td { padding: 6px 8px; border-bottom: 1px solid var(--fm-line); text-align: center; }
.fm-page .fm-gsum thead th { color: #475569; font-weight: 800; font-size: .76rem; }
.fm-page .fm-gsum tbody th { text-align: left; color: #000; font-weight: 750; }
.fm-page .fm-gsum-n { display: inline-grid; place-items: center; min-width: 30px; height: 26px; padding: 0 6px; border-radius: 8px; background: var(--fm-soft); font-weight: 800; color: #334155; }
.fm-page .fm-gsum-n.is-top { background: var(--fm-c, #0c7a4c); color: #fff; }
