/* Fact find — bridgingeye.co.uk design (tokens match public/index.html).
   Everything is scoped under .ff-root so it can sit inside the portal or
   admin without clashing with their own styles. */
.ff-root {
  --ff-navy: #0F2A44;
  --ff-navy-deep: #0A1F33;
  --ff-teal: #0B7A70;
  --ff-teal-dark: #08594F;
  --ff-mint: #5FD3C4;
  --ff-ground: #F7F5F0;
  --ff-surface: #FFFFFF;
  --ff-line: #E3DED3;
  --ff-border: #CFC9BC;
  --ff-muted: #3E4C5B;
  --ff-soft: #4A5868;
  --ff-tint: #F2F7F6;
  --ff-error: #B42318;
  --ff-radius: 16px;
  --ff-radius-control: 10px;
  --ff-display: "Fraunces", Georgia, serif;
  --ff-body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-family: var(--ff-body);
  color: var(--ff-navy);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.ff-root *, .ff-root *::before, .ff-root *::after { box-sizing: border-box; }
.ff-root [hidden] { display: none !important; }
/* :where() keeps these resets at zero specificity so component colours (e.g. .ff-btn-primary) win. */
.ff-root :where(button, input, select, textarea) { font: inherit; color: inherit; }
.ff-root :where(:focus-visible) { outline: 3px solid var(--ff-teal); outline-offset: 2px; border-radius: 4px; }

/* ---- layout */
.ff-root .ff-app { display: grid; grid-template-columns: 280px minmax(0, 1fr); grid-template-areas: "side main" "bar bar"; gap: 0 48px; align-items: start; }
.ff-root .ff-side { grid-area: side; position: sticky; top: 24px; background: var(--ff-surface); border: 1px solid var(--ff-line); border-radius: var(--ff-radius); padding: 12px; max-height: calc(100vh - 48px); overflow-y: auto; }
.ff-root .ff-main { grid-area: main; min-width: 0; padding: 0 0 32px; max-width: none; }
.ff-root .ff-bar { grid-area: bar; position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 16px 0; margin-top: 8px; background: var(--ff-ground); border-top: 1px solid var(--ff-line); }
.ff-root .ff-savenote { margin-right: auto; font-size: 14px; color: var(--ff-soft); }

/* ---- steps */
.ff-root .ff-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ff-root .ff-steps button { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 10px; border: 0; border-radius: 10px; background: none; text-align: left; font-size: 15px; color: var(--ff-muted); cursor: pointer; }
.ff-root .ff-steps button:hover { background: var(--ff-ground); color: var(--ff-navy); }
.ff-root .ff-step-dot { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--ff-border); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: var(--ff-soft); background: var(--ff-surface); }
.ff-root .ff-steps .is-current button { background: var(--ff-tint); color: var(--ff-navy); font-weight: 700; }
.ff-root .ff-steps .is-current .ff-step-dot { background: var(--ff-navy); border-color: var(--ff-navy); color: #fff; }
.ff-root .ff-steps .is-done .ff-step-dot { background: var(--ff-teal); border-color: var(--ff-teal); color: #fff; }
.ff-root .ff-steps .has-problems .ff-step-dot { border-color: var(--ff-error); color: var(--ff-error); }

/* ---- headings */
.ff-root .ff-kicker { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ff-teal); }
.ff-root .ff-title { margin: 8px 0 20px; font-family: var(--ff-display); font-weight: 600; font-size: clamp(30px, 3.2vw, 42px); line-height: 1.08; letter-spacing: -0.02em; }
.ff-root .ff-title:focus { outline: none; }
.ff-root .ff-for { margin: -8px 0 16px; color: var(--ff-soft); }

/* ---- applicant tabs */
.ff-root .ff-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.ff-root .ff-tab { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--ff-border); background: var(--ff-surface); font-size: 15px; font-weight: 500; cursor: pointer; }
.ff-root .ff-tab[aria-selected="true"] { background: var(--ff-navy); border-color: var(--ff-navy); color: #fff; }
.ff-root .ff-count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: #FDECEA; color: var(--ff-error); font-size: 12px; font-weight: 700; }

/* ---- questions */
.ff-root fieldset.ff-page { margin: 0; min-width: 0; }
.ff-root .ff-item-section { margin-top: 8px; padding-top: 20px; border-top: 1px solid var(--ff-line); }
.ff-root .ff-grid + .ff-item-section:first-of-type, .ff-root .ff-item-section:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.ff-root .ff-item-title { margin: 0 0 16px; font-size: 18px; font-weight: 700; color: var(--ff-navy); }
.ff-root fieldset.ff-page[disabled] { opacity: 0.85; }
.ff-root .ff-note { margin: 0 0 16px; padding: 12px 16px; border-radius: 12px; background: var(--ff-tint); border: 1px solid #CFE6E2; font-size: 15px; color: var(--ff-muted); }
.ff-root .ff-add-party-row { margin: -8px 0 12px; }
.ff-root .ff-page { background: var(--ff-surface); border: 1px solid var(--ff-line); border-radius: var(--ff-radius); padding: 32px; }
.ff-root .ff-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; }
.ff-root .ff-q { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ff-root .ff-q.is-wide { grid-column: 1 / -1; }
/* Each question is three rows — heading (label, "?" text, help), answer,
   error — shared with the question beside it (subgrid), so two questions
   side by side have their answer boxes level even when one has help text
   or a longer label. */
.ff-root .ff-q { display: grid; grid-template-rows: subgrid; grid-row: span 3; row-gap: 8px; align-content: start; }
.ff-root .ff-q-head { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
/* Grid items default to their content's width; let wide content (the schedule table) scroll inside instead. */
.ff-root .ff-q > *, .ff-root .ff-list, .ff-root .ff-item, .ff-root .ff-schedule-upload, .ff-root .ff-sr { min-width: 0; }
.ff-root .ff-label { margin: 0; font-size: 15px; font-weight: 700; color: var(--ff-navy); }
.ff-root .ff-optional { font-weight: 400; color: var(--ff-soft); }
.ff-root .ff-tag { display: inline-block; margin-left: 4px; padding: 2px 8px; border-radius: 999px; background: var(--ff-ground); border: 1px solid var(--ff-line); font-size: 12px; font-weight: 500; color: var(--ff-muted); vertical-align: 1px; }
.ff-root .ff-help { margin: -4px 0 0; font-size: 14px; line-height: 1.5; color: var(--ff-soft); }
.ff-root .ff-error { margin: 0; font-size: 14px; color: var(--ff-error); }
.ff-root .ff-q.is-invalid > .ff-control, .ff-root .ff-q.is-invalid .ff-money, .ff-root .ff-q.is-invalid > .ff-pills .ff-pill { border-color: var(--ff-error); }

.ff-root .ff-control { width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid var(--ff-border); border-radius: var(--ff-radius-control); background: var(--ff-surface); font-size: 16px; }
.ff-root textarea.ff-control { padding: 12px 14px; min-height: 96px; resize: vertical; line-height: 1.5; }
.ff-root select.ff-control { appearance: none; -webkit-appearance: none; padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%230F2A44' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; cursor: pointer; }
.ff-root .ff-control:hover { border-color: var(--ff-soft); }
.ff-root .ff-control:focus-visible { outline: 3px solid var(--ff-teal); outline-offset: 0; border-color: var(--ff-teal); }
.ff-root .ff-other { margin-top: 8px; }
.ff-root .ff-mono { font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }

.ff-root .ff-money { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 14px; border: 1px solid var(--ff-border); border-radius: var(--ff-radius-control); background: var(--ff-surface); font-size: 17px; }
.ff-root .ff-money:focus-within { border: 2px solid var(--ff-teal); padding: 0 13px; }
.ff-root .ff-money span { color: #5A6675; }
/* Currency: a compact select beside the amount box (sized to "£ GBP"), never inside or over it. */
.ff-root .ff-money-field { display: flex; align-items: stretch; gap: 8px; min-width: 0; }
.ff-root .ff-money-field .ff-money { flex: 1 1 auto; min-width: 0; }
.ff-root .ff-money-row .ff-money-field { flex: 1 1 220px; }
.ff-root .ff-currency { flex: none; width: auto; max-width: 112px; min-height: 48px; margin: 0; padding: 0 30px 0 12px; border: 1px solid var(--ff-border); border-radius: var(--ff-radius-control); appearance: none; -webkit-appearance: none; background: var(--ff-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%230F2A44' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 11px center; color: var(--ff-navy); font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.ff-root .ff-currency:hover { border-color: var(--ff-soft); }
.ff-root .ff-currency:focus-visible { outline: 3px solid var(--ff-teal); outline-offset: 0; border-color: var(--ff-teal); }
.ff-root .ff-label-row { display: flex; align-items: center; gap: 8px; }
.ff-root .ff-label-row > .ff-label { flex: 0 1 auto; }
.ff-root .ff-info-btn { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; min-height: 0; padding: 0; border: 1px solid var(--ff-border); border-radius: 50%; background: var(--ff-surface); color: var(--ff-teal-dark); font-size: 13px; font-weight: 700; line-height: 1; cursor: pointer; }
.ff-root .ff-info-btn[aria-expanded="true"], .ff-root .ff-info-btn:hover { background: var(--ff-tint); border-color: var(--ff-teal); }
.ff-root .ff-info-text { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--ff-tint); border: 1px solid var(--ff-line); font-size: 14px; line-height: 1.5; color: var(--ff-navy); white-space: pre-line; }
.ff-root .ff-money input:focus-visible { outline: none; }
.ff-root .ff-money input { padding: 0; width: auto; box-shadow: none; }
.ff-root .ff-money input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; min-height: 44px; font-size: 17px; }
.ff-root .ff-money-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ff-root .ff-money-row .ff-money { flex: 1 1 220px; }
.ff-root .ff-money.is-max { background: var(--ff-tint); border-color: var(--ff-teal); }
.ff-root .ff-money.is-max input::placeholder { color: var(--ff-teal-dark); font-weight: 700; opacity: 1; }
.ff-root .ff-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--ff-border); background: var(--ff-surface); font-size: 15px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.ff-root .ff-chip:hover { border-color: var(--ff-navy); }
.ff-root .ff-chip svg { display: none; color: var(--ff-mint); }
.ff-root .ff-chip[aria-pressed="true"] { background: var(--ff-navy); border-color: var(--ff-navy); color: #fff; }
.ff-root .ff-chip[aria-pressed="true"] svg { display: block; }
.ff-root .ff-affix { position: relative; }
.ff-root .ff-affix.is-percent .ff-control { padding-right: 36px; }
.ff-root .ff-affix span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: #5A6675; }
.ff-root .ff-party-pct { display: grid; gap: 8px; max-width: 420px; }
.ff-root .ff-party-pct-row { display: grid; grid-template-columns: 1fr 140px; align-items: center; gap: 12px; font-weight: 400; }
.ff-root .ff-party-pct-row:only-child { grid-template-columns: 160px; }
.ff-root .ff-party-pct-name { color: #0F2A44; }
.ff-root .ff-duration, .ff-root .ff-date-or { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ff-root .ff-duration label, .ff-root .ff-date-or label { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; color: var(--ff-muted); }
.ff-root .ff-duration .ff-control, .ff-root .ff-date-or label .ff-control { width: 92px; }
.ff-root .ff-date-or > .ff-control { width: auto; min-width: 180px; }
.ff-root .ff-dob { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.ff-root .ff-dob > .ff-control { flex: 1 1 180px; min-width: 0; }
.ff-root .ff-dob-age { font-size: 15px; font-weight: 600; color: var(--ff-muted); white-space: nowrap; }
.ff-root .ff-dob-age:empty { display: none; }
.ff-root .ff-or { font-size: 14px; color: var(--ff-soft); }

.ff-root .ff-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.ff-root .ff-pill { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--ff-border); background: var(--ff-surface); font-size: 15px; font-weight: 500; cursor: pointer; transition: background-color 0.15s ease, border-color 0.15s ease; }
.ff-root .ff-pill:hover { border-color: var(--ff-navy); }
.ff-root .ff-pill svg { display: none; flex: none; color: var(--ff-mint); }
.ff-root .ff-pill[aria-pressed="true"] { background: var(--ff-navy); border-color: var(--ff-navy); color: #fff; }
.ff-root .ff-pill[aria-pressed="true"] svg { display: block; }

.ff-root .ff-consent { display: flex; align-items: flex-start; gap: 12px; padding: 16px; border: 1px solid var(--ff-line); border-radius: 12px; background: var(--ff-ground); font-size: 15px; cursor: pointer; }
.ff-root .ff-consent input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--ff-teal); }
.ff-root .ff-consent-choice { display: grid; gap: 8px; }
.ff-root .ff-computed { min-height: 48px; display: flex; align-items: center; padding: 0 14px; border-radius: var(--ff-radius-control); background: var(--ff-tint); font-weight: 700; font-size: 17px; }

/* ---- address suggestions (places.js) */
.ff-root .ff-suggest-wrap { position: relative; }
.ff-root .ff-suggest { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 20; background: var(--ff-surface); border: 1px solid var(--ff-border); border-radius: var(--ff-radius-control); box-shadow: 0 12px 28px rgba(15, 42, 68, 0.18); overflow: hidden; }
.ff-root .ff-suggest-item { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; cursor: pointer; }
.ff-root .ff-suggest-item:hover, .ff-root .ff-suggest-item[aria-selected="true"] { background: var(--ff-tint); }
.ff-root .ff-suggest-main { font-weight: 700; font-size: 15px; }
.ff-root .ff-suggest-rest { font-size: 13px; color: var(--ff-soft); }
.ff-root .ff-suggest-credit { padding: 6px 14px; border-top: 1px solid var(--ff-line); font-size: 11.5px; color: var(--ff-soft); text-align: right; }

/* ---- lists */
.ff-root .ff-list { display: flex; flex-direction: column; gap: 14px; }
.ff-root .ff-item { border: 1px solid var(--ff-line); border-radius: 14px; padding: 20px; background: var(--ff-ground); }
.ff-root .ff-item .ff-item { background: var(--ff-surface); }
.ff-root .ff-item-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.ff-root .ff-item-num { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ff-navy); color: #fff; font-size: 13px; font-weight: 700; }
.ff-root .ff-add { align-self: flex-start; min-height: 44px; padding: 0 18px; border-radius: var(--ff-radius-control); border: 1px dashed var(--ff-teal); background: var(--ff-surface); color: var(--ff-teal-dark); font-weight: 700; font-size: 15px; cursor: pointer; }
.ff-root .ff-add:hover { background: var(--ff-tint); }
.ff-root .ff-link { background: none; border: 0; padding: 0 4px; min-height: 44px; color: var(--ff-teal); font-weight: 700; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ---- buttons */
.ff-root .ff-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: var(--ff-radius-control); border: 1px solid transparent; font-size: 16px; font-weight: 700; cursor: pointer; }
.ff-root .ff-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.ff-root .ff-btn-primary { background: var(--ff-navy); color: #fff; border-color: var(--ff-navy); }
.ff-root .ff-btn-primary:hover:not(:disabled) { background: #173A5C; }
.ff-root .ff-btn-outline { background: var(--ff-surface); color: var(--ff-navy); border-color: var(--ff-navy); }
.ff-root .ff-btn-ghost { background: transparent; color: var(--ff-navy); border-color: var(--ff-border); }
.ff-root .ff-btn-block { display: flex; width: 100%; margin-top: 16px; }

/* ---- submit */
.ff-root .ff-summary, .ff-root .ff-ready { margin-top: 24px; padding: 20px 24px; border-radius: 14px; }
.ff-root .ff-summary { background: #FFF7ED; border: 1px solid #F5D0A9; }
.ff-root .ff-summary ul { margin: 8px 0 0; padding-left: 18px; }
.ff-root .ff-summary li { display: flex; align-items: center; gap: 8px; }
.ff-root .ff-ready { background: var(--ff-tint); border: 1px solid #CFE6E2; }
.ff-root .ff-submit-result { margin-top: 12px; font-weight: 700; }
.ff-root .ff-submit-result.is-ok { color: var(--ff-teal-dark); }
.ff-root .ff-submit-result.is-error { color: var(--ff-error); }

@media (max-width: 899.98px) {
  .ff-root .ff-app { grid-template-columns: minmax(0, 1fr); grid-template-areas: "side" "main" "bar"; gap: 16px; }
  .ff-root .ff-side { position: static; max-height: none; padding: 8px; overflow-x: auto; }
  .ff-root .ff-steps { flex-direction: row; gap: 4px; }
  .ff-root .ff-steps li { flex: none; }
  .ff-root .ff-steps button { white-space: nowrap; font-size: 14px; }
  .ff-root .ff-steps li:not(.is-current) button span:last-child { display: none; }
  .ff-root .ff-page { padding: 20px; }
  .ff-root .ff-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .ff-root .ff-item { padding: 16px; }
  .ff-root .ff-bar { flex-wrap: wrap; }
  .ff-root .ff-bar .ff-btn { flex: 1; white-space: nowrap; padding-left: 12px; padding-right: 12px; }
  .ff-root .ff-savenote { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) { .ff-root * { transition: none !important; } }

/* ---- host pages (portal/admin) have their own global element styles; keep ours */
.ff-root label, .ff-root p { margin: 0; }
.ff-root .ff-label { display: block; }
.ff-root .ff-duration label, .ff-root .ff-date-or label { margin: 0; }
.ff-root input[type="checkbox"] { width: 20px; height: 20px; padding: 0; }
.ff-root h1 { border: 0; padding: 0; }

/* ---- gate & dialog used by the portal */
.ff-root .ff-gate { max-width: 640px; margin: 24px auto; background: var(--ff-surface); border: 1px solid var(--ff-line); border-radius: var(--ff-radius); padding: 32px; display: flex; flex-direction: column; gap: 16px; }
.ff-root .ff-gate h1 { margin: 0; font-family: var(--ff-display); font-weight: 600; font-size: 32px; letter-spacing: -0.02em; }
.ff-root .ff-gate-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.ff-root .ff-setup-person { margin: 0; padding: 16px; border: 1px solid var(--ff-line); border-radius: var(--ff-radius); display: flex; flex-direction: column; gap: 12px; }
.ff-root .ff-setup-person legend { padding: 0 6px; }
.ff-root .ff-setup-confirm { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.5; }
.ff-root .ff-setup-confirm input { width: 20px; height: 20px; margin-top: 2px; flex: none; }
.ff-root .ff-error-text { color: var(--ff-error); font-size: 14px; }
.ff-dialog-backdrop { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px; background: rgba(10, 31, 51, 0.6); }
.ff-dialog-backdrop .ff-dialog { width: min(520px, 100%); background: #fff; border-radius: 20px; padding: 28px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 30px 60px rgba(4, 16, 28, 0.35); }
.ff-dialog-backdrop .ff-dialog h2 { margin: 0; font-family: var(--ff-display); font-weight: 600; font-size: 26px; }

/* Property schedule upload and review (ui.js, scheduleUploadHtml) */
.ff-root .ff-schedule-upload { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; padding: 16px; border: 1px dashed var(--ff-border); border-radius: var(--ff-radius-control); background: var(--ff-tint); }
.ff-root .ff-file-btn { align-self: flex-start; position: relative; cursor: pointer; }
.ff-root .ff-file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.ff-root .ff-file-btn:focus-within { outline: 2px solid var(--ff-teal); outline-offset: 2px; }
.ff-root .ff-schedule-status { margin: 0; font-size: 14px; color: var(--ff-navy); }
.ff-root .ff-sr { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.ff-root .ff-sr p { margin: 0; }
.ff-root .ff-sr-key { padding: 0 4px; border-radius: 4px; }
.ff-root .ff-sr-key.is-missing, .ff-root .ff-sr-cell.is-missing input, .ff-root .ff-sr-cell.is-missing select { background: #FDECEC; border-color: var(--ff-error); }
.ff-root .ff-sr-key.is-unclear, .ff-root .ff-sr-cell.is-unclear input, .ff-root .ff-sr-cell.is-unclear select { background: #FFF4D6; border-color: #E0B04A; }
.ff-root .ff-sr-scroll { overflow-x: auto; background: var(--ff-surface); border: 1px solid var(--ff-line); border-radius: 10px; }
.ff-root .ff-sr-table { border-collapse: collapse; font-size: 13px; min-width: 1180px; width: 100%; }
.ff-root .ff-sr-table th { text-align: left; padding: 8px 6px; font-size: 12px; color: var(--ff-muted); border-bottom: 1px solid var(--ff-line); white-space: nowrap; }
.ff-root .ff-sr-table td { padding: 4px; border-bottom: 1px solid var(--ff-line); vertical-align: middle; }
.ff-root .ff-sr-table tfoot td { font-weight: 700; padding: 8px 6px; border-bottom: 0; }
.ff-root .ff-sr-table input, .ff-root .ff-sr-table select { width: 100%; min-width: 90px; min-height: 34px; padding: 4px 6px; border: 1px solid var(--ff-border); border-radius: 6px; font: inherit; background: var(--ff-surface); }
.ff-root .ff-sr-table input:disabled { background: var(--ff-ground); border-color: var(--ff-line); }
.ff-root .ff-sr-table td:nth-child(2) input { min-width: 220px; }
.ff-root .ff-sr-table .is-money, .ff-root .ff-sr-table .is-money input { text-align: right; }
.ff-root .ff-sr-num { color: var(--ff-soft); text-align: center; }
.ff-root .ff-sr-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.ff-root .ff-portfolio { display: flex; flex-direction: column; min-width: 0; }
.ff-root .ff-portfolio-totals:empty { display: none; }
.ff-root .ff-portfolio-totals { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.ff-root .ff-totals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0; }
.ff-root .ff-totals > div { padding: 10px 12px; border: 1px solid var(--ff-line); border-radius: 10px; background: var(--ff-surface); }
.ff-root .ff-totals dt { font-size: 13px; color: var(--ff-muted); }
.ff-root .ff-totals dd { margin: 2px 0 0; font-size: 18px; font-weight: 700; color: var(--ff-navy); }
@media (max-width: 899.98px) { .ff-root .ff-totals { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Figures in another currency: the pounds equivalent underneath */
.ff-root .ff-money-wrap { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ff-root .ff-gbp-equiv { margin: 0; font-size: 13px; color: var(--ff-soft); }
.ff-root .ff-gbp-equiv:empty { display: none; }
.ff-root .ff-sr-money { display: flex; gap: 4px; }
.ff-root .ff-sr-money select { flex: none; width: auto; min-width: 0; padding: 4px 2px; }
.ff-root .ff-sr-money input { min-width: 80px; }
.ff-root .ff-sr-equiv { font-size: 11.5px; color: var(--ff-soft); text-align: right; padding: 2px 2px 0; }
.ff-root .ff-sr-equiv:empty { display: none; }

/* A 'documents' question (supporting documents): the files added, and a button to add more. */
.ff-root .ff-docs { display: grid; gap: 10px; }
.ff-root .ff-docs-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ff-root .ff-docs-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 8px 12px; border: 1px solid var(--ff-line, #DDE3E1); border-radius: 10px; background: #fff; min-width: 0; }
.ff-root .ff-docs-name { font-weight: 600; overflow-wrap: anywhere; min-width: 0; }
.ff-root .ff-docs-size, .ff-root .ff-docs-hint, .ff-root .ff-docs-empty { color: var(--ff-muted); font-size: 14px; margin: 0; }
.ff-root .ff-docs-list .ff-link { margin-left: auto; min-height: 32px; }
.ff-root .ff-docs-add { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.ff-root .ff-docs-status { margin: 0; font-size: 14px; min-height: 1em; color: var(--ff-muted); }
.ff-root .ff-docs-status.is-error { color: #B42318; font-weight: 600; }
.ff-root .ff-docs-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Monthly expenditure as one table: a row per cost, a column per applicant, "All applicants" for shared costs. */
.ff-root .ff-cost-block { display: grid; gap: 10px; margin-bottom: 20px; }
.ff-root .ff-cost-block .ff-help { margin: 0; }
.ff-root .ff-cost-wrap { overflow-x: auto; border: 1px solid var(--ff-line); border-radius: 12px; background: #fff; }
.ff-root .ff-cost-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.ff-root .ff-cost-table th, .ff-root .ff-cost-table td { padding: 8px 10px; border-bottom: 1px solid var(--ff-line); text-align: left; vertical-align: middle; }
.ff-root .ff-cost-table thead th { font-size: 14px; color: var(--ff-muted); font-weight: 700; white-space: nowrap; }
.ff-root .ff-cost-table tbody th { font-weight: 600; min-width: 200px; }
.ff-root .ff-cost-table td { min-width: 130px; }
.ff-root .ff-cost-table .is-shared { background: #F3FAF8; }
.ff-root .ff-cost-sub { display: block; font-weight: 400; font-size: 12px; }
.ff-root .ff-cost-table .ff-money { margin: 0; }
.ff-root .ff-cost-table .ff-money input { width: 100%; min-width: 0; text-align: right; font-variant-numeric: tabular-nums; }
.ff-root .ff-cost-table td.is-missing .ff-money { outline: 2px solid #B42318; outline-offset: 1px; border-radius: 8px; }
.ff-root .ff-cost-table td.is-na { background: #FAFAF8; }
.ff-root .ff-cost-total th, .ff-root .ff-cost-total td { font-weight: 700; border-bottom: 0; font-variant-numeric: tabular-nums; }
.ff-root .ff-cost-total td { text-align: right; padding-right: 14px; }
.ff-root .ff-cost-household { margin: 0; font-size: 15px; }
