/* ==========================================================================
   Discovery — the fact find page (#FeosFactFind; views/fact-find.js)
   ========================================================================== */

.feos-ff { --ff-mgi: #0f7a55; --ff-mgi-bg: #e2f5ec; --ff-pgi: #7b3fb1; --ff-pgi-bg: #f1e8fa;
    --ff-ok: #1d7a43; --ff-ok-bg: #e3f5ea; --ff-pre: #8a5a00; --ff-pre-bg: #fff3d6; --ff-bad: #b42318; --ff-bad-bg: #fde8e6;
    max-width: 1500px; margin: 0 auto; }
.feos-ff-loading { padding: 40px; }

.feos-ff-card { background: #fff; border: 1px solid var(--feos-line); border-radius: 10px; padding: 16px 18px; margin-bottom: 14px; }
.feos-ff-kicker { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--feos-muted); margin-bottom: 4px; }
.feos-ff-kicker a { color: inherit; }

/* header */
.feos-ff-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
    background: #fff; border: 1px solid var(--feos-line); border-top: 4px solid var(--feos-accent); border-radius: 10px;
    padding: 14px 18px; margin-bottom: 14px; }
.feos-ff-title { margin: 2px 0 0; font-size: 24px; font-weight: 600; color: var(--feos-ink); }
.feos-ff-head-r { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.feos-ff-bar { display: inline-block; width: 140px; height: 6px; border-radius: 3px; background: #e6ebf0; overflow: hidden; }
.feos-ff-bar > span { display: block; height: 100%; background: var(--ff-ok); }
.feos-ff-prog { color: var(--feos-muted); font-size: 13px; }
.feos-ff-status { font-size: 12px; font-weight: 500; vertical-align: middle; padding: 2px 8px; border-radius: 10px;
    background: var(--ff-pre-bg); color: var(--ff-pre); }
.feos-ff-status.s-completed, .feos-ff-status.s-confirmed-by-clients { background: var(--ff-ok-bg); color: var(--ff-ok); }
.feos-ff-ro { background: #fff8e6; border: 1px solid #f2dfae; border-radius: 8px; padding: 8px 12px; margin-bottom: 12px; color: #6b4b00; }

.feos-ff-part { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .04em; padding: 1px 6px;
    border-radius: 4px; vertical-align: middle; margin-left: 4px; }
.feos-ff-part.mgi { background: var(--ff-mgi-bg); color: var(--ff-mgi); }
.feos-ff-part.pgi { background: var(--ff-pgi-bg); color: var(--ff-pgi); }
.feos-ff-part.both { background: var(--feos-accent-soft); color: var(--feos-accent-dark); }

/* three columns */
.feos-ff-body { display: grid; grid-template-columns: 240px minmax(0, 1fr) 300px; gap: 14px; align-items: start; }
.feos-ff-rail { background: #fff; border: 1px solid var(--feos-line); border-radius: 10px; padding: 10px 8px; position: sticky; top: 64px; }
.feos-ff-rail-ov { display: block; padding: 6px 10px; border-radius: 6px; color: var(--feos-ink); font-weight: 600; }
.feos-ff-rail-ov.on, .feos-ff-rail-m.on { background: var(--feos-accent-soft); color: var(--feos-accent-dark); text-decoration: none; }
.feos-ff-rail-g { margin-top: 10px; }
.feos-ff-rail-gh { display: flex; justify-content: space-between; padding: 2px 10px; font-weight: 600; font-size: 13px; }
.feos-ff-rail-gbar { height: 3px; margin: 4px 10px 4px; background: #e6ebf0; border-radius: 2px; overflow: hidden; }
.feos-ff-rail-gbar > span { display: block; height: 100%; background: var(--ff-ok); }
.feos-ff-rail-m { display: flex; align-items: center; gap: 8px; padding: 5px 10px; border-radius: 6px; color: var(--feos-ink); font-size: 14px; }
.feos-ff-rail-m:hover, .feos-ff-rail-ov:hover { background: #f4f7fa; text-decoration: none; }
.feos-ff-dot { flex: 0 0 20px; width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center;
    justify-content: center; font-size: 10px; border: 1px solid #c9d2dc; color: var(--feos-muted); }
.feos-ff-dot.done { background: var(--ff-ok); border-color: var(--ff-ok); color: #fff; }
.feos-ff-dot.pre { background: #fff; border-color: #e0a52a; color: #b07400; }
.feos-ff-dot.skip { border-style: dashed; }

.feos-ff-main .feos-ff-mcard { padding: 0; }
.feos-ff-mhead { padding: 16px 20px 6px; border-bottom: 1px solid var(--feos-line); }
.feos-ff-mhead h3 { margin: 0 0 4px; font-size: 22px; font-weight: 600; }
.feos-ff-intro { color: var(--feos-muted); margin: 4px 0 8px; }
.feos-ff-mbody { padding: 14px 20px; }
.feos-ff-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 20px;
    border-top: 1px solid var(--feos-line); background: #fafbfc; border-radius: 0 0 10px 10px; flex-wrap: wrap; }
.feos-ff-foot-r { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.feos-ff-chip { display: inline-block; font-size: 12px; font-weight: 500; padding: 2px 8px; border-radius: 10px;
    vertical-align: middle; background: #eef1f4; color: var(--feos-muted); }
.feos-ff-chip.done { background: var(--ff-ok-bg); color: var(--ff-ok); }
.feos-ff-chip.pre { background: var(--ff-pre-bg); color: var(--ff-pre); }
.feos-ff-chip.skip { background: #f3f4f6; color: #7a8590; }

/* questions */
.feos-ff-sec { margin: 18px 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--feos-muted); }
.feos-ff-people { display: grid; grid-template-columns: 1fr; gap: 14px; margin-bottom: 6px; }
.feos-ff-people.two { grid-template-columns: 1fr 1fr; }
.feos-ff-person { border: 1px solid var(--feos-line); border-radius: 10px; padding: 12px 14px; background: #fcfdfe; }
.feos-ff-ph { font-weight: 600; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.feos-ff-av { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    color: #fff; font-size: 11px; font-weight: 700; background: #b03a6f; }
.feos-ff-av.c2 { background: #1f6f9f; }
.feos-ff-q { margin-bottom: 12px; }
/* short fields side by side, long ones across the row (Peter, 3 Oct 2026) */
.feos-ff-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px 14px; align-items: start; }
.feos-ff-grid > .feos-ff-q.wide { grid-column: 1 / -1; }
.feos-ff-grid > .feos-ff-q.narrow .form-control { max-width: 220px; }
.feos-ff-grid > .feos-ff-q.q-choice.narrow .feos-ff-pills { flex-wrap: nowrap; }
.feos-ff-q.est .form-control { background: #fffdf3; border-color: #ead9a4; }
.feos-ff-src.est { border-color: #c9b26a; color: #7a5f00; background: #fffbea; }
/* spending lines: label and amount on one row, in columns */
.feos-ff-lines { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 4px 20px; margin-bottom: 10px; }
.feos-ff-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 2px 0; border-bottom: 1px dotted #e6ebf0; }
.feos-ff-line .feos-ff-l { margin: 0; font-weight: 400; flex: 1 1 auto; }
.feos-ff-line .feos-ff-affix { flex: 0 0 120px; }
.feos-ff-line .form-control { height: 30px; padding-top: 3px; padding-bottom: 3px; text-align: right; }
/* the postcode lookup */
.feos-ff-pc { display: flex; gap: 6px; }
.feos-ff-pc .form-control { max-width: 130px; text-transform: uppercase; }
.feos-ff-pc .btn { white-space: nowrap; }
.feos-ff-pc-results { margin-top: 6px; }
.feos-ff-pc-msg:empty { display: none; }
.feos-ff-l { display: block; font-weight: 500; color: #3b4855; margin-bottom: 4px; font-size: 13px; }
.feos-ff-req { color: var(--ff-bad); }
.feos-ff-hint { font-size: 12px; color: var(--feos-muted); margin-top: 4px; }
.feos-ff-hh { max-width: 640px; }
.feos-ff-src { display: inline-block; font-size: 10px; padding: 0 5px; border-radius: 4px; margin-left: 4px;
    border: 1px solid #e0a52a; color: #a06800; background: #fffaf0; vertical-align: middle; }
.feos-ff-src.ok { border-color: #9cc9ad; color: var(--ff-ok); background: #f3fbf6; }
.feos-ff-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.feos-ff-pills.nowrap { flex-wrap: nowrap; }
.feos-ff-pill { border: 1px solid #cbd5df; background: #fff; border-radius: 6px; padding: 5px 11px; font-size: 13px; color: var(--feos-ink); }
.feos-ff-pill:hover { border-color: var(--feos-accent); }
.feos-ff-pill.on { background: var(--feos-accent); border-color: var(--feos-accent); color: #fff; }
.feos-ff-pill:disabled { opacity: .7; }
.feos-ff-list { width: 100%; margin-bottom: 6px; }
.feos-ff-list th { font-size: 12px; font-weight: 500; color: var(--feos-muted); padding: 2px 4px; }
.feos-ff-list td { padding: 2px 4px; vertical-align: top; }

/* figures */
.feos-ff-facts { width: 100%; margin: 4px 0 14px; border-collapse: collapse; }
.feos-ff-facts th { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--feos-muted);
    font-weight: 500; padding: 6px 8px; border-bottom: 1px solid var(--feos-line); text-align: left; }
.feos-ff-facts td { padding: 7px 8px; border-bottom: 1px solid #eef1f4; }
.feos-ff-facts td:last-child { text-align: right; }
.feos-ff-facts.live { background: #f7fbfe; border-radius: 8px; }
.feos-ff-mini { width: 100%; }
.feos-ff-mini td { padding: 3px 0; }
.feos-ff-mini td:last-child { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; padding-left: 8px; }
.feos-ff-affix { position: relative; }
.feos-ff-affix > span { position: absolute; top: 50%; transform: translateY(-50%); color: var(--feos-muted); pointer-events: none; }
.feos-ff-affix.pre > span { left: 10px; }
.feos-ff-affix.pre > input { padding-left: 24px; }
.feos-ff-affix.post > span { right: 10px; }
.feos-ff-affix.post > input { padding-right: 26px; }
.feos-ff-q .form-control { max-width: 100%; }
.feos-ff-mini tr.tot td { border-top: 1px solid var(--feos-line); font-weight: 700; padding-top: 6px; font-size: 15px; }
.feos-ff-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.feos-ff-outcome { border-left: 4px solid; padding: 10px 14px; border-radius: 6px; margin: 10px 0 14px; }
.feos-ff-outcome.ok { border-color: var(--ff-ok); background: var(--ff-ok-bg); }
.feos-ff-outcome.warn { border-color: #e0a52a; background: var(--ff-pre-bg); }
.feos-ff-outcome.bad { border-color: var(--ff-bad); background: var(--ff-bad-bg); }
.feos-ff-warn { color: var(--ff-bad); font-size: 12px; }
.feos-ff-chart { border: 1px solid var(--feos-line); border-radius: 8px; padding: 8px; background: #fbfcfd; }
.feos-ff-chart svg { width: 100%; height: auto; display: block; }
.feos-ff-chart .g { stroke: #e6ebf0; }
.feos-ff-chart .t { font-size: 10px; fill: #6b7885; }
.feos-ff-chart .t.ess { fill: var(--ff-bad); }
.feos-ff-chart .b-in { fill: #5b81a8; }
.feos-ff-chart .b-sav { fill: #e1a73c; }
.feos-ff-chart .l-ess { stroke: var(--ff-bad); stroke-width: 1.5; }
.feos-ff-chart .l-life { stroke: #3b4855; stroke-dasharray: 5 4; }
.feos-ff-legend { font-size: 12px; color: var(--feos-muted); padding: 6px 4px 0; }
.feos-ff-legend .k { display: inline-block; width: 10px; height: 10px; margin: 0 4px 0 10px; vertical-align: -1px; }
.feos-ff-legend .k.in { background: #5b81a8; } .feos-ff-legend .k.sav { background: #e1a73c; }
.feos-ff-legend .k.ess { height: 2px; background: var(--ff-bad); vertical-align: 3px; }
.feos-ff-legend .k.life { height: 0; border-top: 2px dashed #3b4855; vertical-align: 3px; }

.feos-ff-cover .table { margin-bottom: 8px; }
.feos-ff-st { font-size: 12px; padding: 1px 7px; border-radius: 9px; background: #eef1f4; }
.feos-ff-st.s-keep { background: var(--ff-ok-bg); color: var(--ff-ok); }
.feos-ff-st.s-top-up { background: var(--ff-pre-bg); color: var(--ff-pre); }
.feos-ff-st.s-replace { background: var(--ff-bad-bg); color: var(--ff-bad); }

.feos-ff-needs { margin-bottom: 10px; }
.feos-ff-need { display: flex; justify-content: space-between; gap: 14px; align-items: center; border: 1px solid var(--feos-line);
    border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; }

.feos-ff-slide { background: linear-gradient(135deg, #0f1b26, #16324c); color: #fff; border-radius: 10px; padding: 28px 32px; }
.feos-ff-slide h2 { color: #fff; margin: 6px 0 14px; }
.feos-ff-slide .text-muted { color: #b9c7d4 !important; }
.feos-ff-slide-k { color: #8fc3e8; text-transform: uppercase; letter-spacing: .1em; font-size: 12px; }

/* overview */
.feos-ff-ov { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.feos-ff-ov .feos-ff-card { margin-bottom: 0; }
.feos-ff-main > .feos-ff-card { margin-top: 14px; }
.feos-ff-ovh { font-weight: 600; margin-bottom: 8px; }
.feos-ff-ovm { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; border-top: 1px solid #f0f2f5; color: var(--feos-ink); }
.feos-ff-ovm:hover { text-decoration: none; color: var(--feos-accent-dark); }
.feos-ff-snap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.feos-ff-snap span { display: block; font-size: 12px; color: var(--feos-muted); }
.feos-ff-snap b { display: block; font-size: 22px; font-weight: 600; }
.feos-ff-snap b.bad { color: var(--ff-bad); }
.feos-ff-snap i { font-style: normal; font-size: 12px; color: var(--feos-muted); }
.feos-ff-srcs { list-style: none; padding: 0; margin: 0; }
.feos-ff-srcs li { padding: 4px 0; }
.feos-ff-ask { padding-left: 18px; margin: 4px 0 0; }
.feos-ff-ask li { margin-bottom: 6px; }

/* summary */
.feos-ff-sum h4 { margin: 14px 0 4px; font-size: 15px; font-weight: 600; }
.feos-ff-done { border-top: 1px solid var(--feos-line); margin-top: 16px; padding-top: 14px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.feos-ff-confirm { display: flex; flex-direction: column; gap: 8px; }

@media (max-width: 1200px) {
    .feos-ff-body { grid-template-columns: 210px minmax(0, 1fr); }
    .feos-ff-help { grid-column: 2; }
}
@media (max-width: 800px) {
    .feos-ff-body { grid-template-columns: 1fr; }
    .feos-ff-rail { position: static; }
    .feos-ff-help { grid-column: 1; }
    .feos-ff-people.two, .feos-ff-ov { grid-template-columns: 1fr; }
    .feos-ff-snap { grid-template-columns: 1fr 1fr; }
    .feos-ff-need { flex-direction: column; align-items: flex-start; }
}
@media print {
    #navbar, .feos-ff-rail, .feos-ff-help, .feos-ff-head-r, .feos-ff-foot, .feos-ask-btn, .feos-ff-done button { display: none !important; }
    .feos-ff-body { display: block; }
}
.feos-ff-pdfs { border: 1px solid var(--feos-line); border-radius: 8px; padding: 10px 14px; width: 100%; background: #fafbfc; }
.feos-ff-pdfs ul { margin: 6px 0; padding-left: 18px; }

/* ==========================================================================
   People from BIOS, firm by firm (#FeosBiosReview; views/bios/review.js) — uses the fact find's header and cards
   ========================================================================== */
.feos-br { max-width: 1250px; }
.feos-br-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.feos-br-tab { padding: 7px 12px; border-radius: 8px; background: #fff; border: 1px solid var(--feos-line); color: var(--feos-ink); font-weight: 500; }
.feos-br-tab.on { background: var(--feos-accent); border-color: var(--feos-accent); color: #fff; text-decoration: none; }
.feos-br-count { margin-left: 8px; font-size: 11px; padding: 1px 7px; border-radius: 9px; background: #eef1f4; color: #4a5866; }
.feos-br-tab.on .feos-br-count { background: rgba(255,255,255,.25); color: #fff; }
.feos-br-count.ok { background: #e3f5ea; color: #1d7a43; }
.feos-br-gh { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.feos-br-gh h2 { font-size: 16px; font-weight: 600; margin: 0; }
.feos-br-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; padding: 10px 6px; border-top: 1px solid var(--feos-line); align-items: center; }
.feos-br-row.checked { background: #f6fbf8; }
.feos-br-row.declined { background: #f7f7f8; opacity: .75; }
.feos-br-name { font-weight: 600; font-size: 14.5px; color: var(--feos-ink); }
.feos-br-ok { font-size: 11px; font-weight: 500; color: #1d7a43; margin-left: 6px; }
.feos-br-warn { color: #8a5a00; background: #fff3d6; border-radius: 6px; padding: 0 6px; }
.feos-br-first { color: #0a5f9c; }
.feos-br-act { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.feos-br-segs { display: flex; gap: 0; align-items: center; }
.feos-br-seg { border: 1px solid var(--feos-line); background: #fff; padding: 4px 11px; font-size: 12.5px; margin-left: -1px; cursor: pointer; }
.feos-br-seg:first-child { border-radius: 6px 0 0 6px; }
.feos-br-seg:nth-child(4) { border-radius: 0 6px 6px 0; }
.feos-br-seg.prop { font-weight: 600; text-decoration: underline dotted; }
.feos-br-seg.on.d-take { background: #1d7a43; border-color: #1d7a43; color: #fff; }
.feos-br-seg.on.d-history { background: #0a5f9c; border-color: #0a5f9c; color: #fff; }
.feos-br-seg.on.d-staff { background: #6b3fa0; border-color: #6b3fa0; color: #fff; }
.feos-br-seg.on.d-leave { background: #6b7785; border-color: #6b7785; color: #fff; }
.feos-br-yes, .feos-br-undo { margin-left: 8px; border: 1px solid #1d7a43; color: #1d7a43; background: #fff; border-radius: 6px; padding: 3px 10px; font-weight: 700; cursor: pointer; }
.feos-br-yes:hover { background: #1d7a43; color: #fff; }
.feos-br-undo { border-color: var(--feos-line); color: #6b7785; font-weight: 400; }
.feos-br-extra { display: flex; gap: 6px; }
.feos-br-extra select { width: auto; max-width: 230px; height: 28px; padding: 2px 6px; font-size: 12px; }
@media (max-width: 800px) { .feos-br-row { grid-template-columns: 1fr; } .feos-br-act { align-items: flex-start; } }

/* dates typed as DD/MM/YYYY (feos:date-input) */
.feos-ff .feos-date { max-width: 150px; font-variant-numeric: tabular-nums; }
.feos-ff .feos-date.input-sm { max-width: 130px; }
.feos-date.feos-date-bad { border-color: #d9534f; box-shadow: 0 0 0 2px rgba(217, 83, 79, .15); }
/* height / weight in feet + inches, stone + pounds */
.feos-ff-imp { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 13px; color: var(--feos-muted); }
.feos-ff-imp i { font-style: normal; margin-right: 2px; }
.feos-ff-imp input { width: 58px; }
