/* Bounded FF-only layout. Existing colors, inputs, and math remain unchanged. */
html[data-verdict-product="flip"] {overflow:auto!important;height:auto!important}
body.ff-workspace {--ff-header-height:112px;overflow:visible!important;height:auto!important;min-height:100dvh;margin:0!important;padding:0!important}
body.ff-workspace #v2-shell {display:grid!important;grid-template-columns:220px minmax(0,1fr)!important;height:auto!important;min-height:100dvh;overflow:visible!important;gap:24px;padding:20px!important;align-items:start}
body.ff-workspace #v2-sidebar {position:sticky!important;top:20px!important;display:flex!important;flex-direction:column;height:calc(100dvh - 40px)!important;min-height:0!important;max-height:calc(100dvh - 40px);overflow-y:auto!important;overflow-x:hidden}
body.ff-workspace #v2-sidebar-toggle {display:none!important}
body.ff-workspace .v2-main {display:block!important;height:auto!important;min-height:0!important;overflow:visible!important;min-width:0}
body.ff-workspace #v2-center-rail,body.ff-workspace .v2-columns,body.ff-workspace .v2-intake-pane,body.ff-workspace #v2-results,body.ff-workspace .v2-intake__body {height:auto!important;max-height:none!important;overflow:visible!important;min-height:0!important}
body.ff-workspace #uw-banner {position:sticky;top:0;z-index:20;background:linear-gradient(100deg,#0b1527,#080d18)!important;border:0!important;border-left:3px solid var(--banner-accent)!important;border-bottom:1px solid #26364b!important;border-radius:0 0 8px 0!important;box-shadow:0 5px 18px #03081155!important;height:auto!important;min-height:96px!important;padding:12px 16px!important;margin:0 0 12px!important;grid-template-columns:minmax(0,1fr) minmax(180px,240px);gap:18px}
body.ff-workspace #uw-banner-status {display:none!important}
body.ff-workspace #uw-banner h1 {white-space:normal;font-size:26px;margin-bottom:6px;overflow:visible}
body.ff-workspace #uw-banner-eyebrow {display:none}
body.ff-workspace #uw-banner-note {display:block;font-size:11px;line-height:1.45;text-align:left;color:#b8c5db}
body.ff-workspace #uw-banner-note[hidden] {display:none}
body.ff-workspace #uw-banner .uw-banner__action {align-items:stretch;gap:7px}
body.ff-workspace #uw-banner[data-prominent="false"] #uw-banner-cta {background:#14243c;color:#e9f0fa;border-color:#52647c}
body.ff-workspace #v2-results-tabs {position:static!important;margin:0 0 16px!important}
body.ff-workspace #v2-results-tabs .v2-tabs__strip {display:flex!important;flex-wrap:nowrap!important;overflow-x:auto;scrollbar-width:thin;gap:4px;max-width:100%}
body.ff-workspace #v2-results-tabs .v2-tab {flex:1 0 100px;min-height:44px}
body.ff-workspace #ff-mobile-top {display:none}
#ff-tab-hint {display:none}
body.ff-workspace #ff-sidebar-promo {margin-top:auto;padding:22px 12px 12px;border-top:1px solid #29303d;flex-shrink:0}
#ff-sidebar-promo .ff-promo-brand {font-size:11px;font-weight:750;letter-spacing:.13em;color:#b2eb3f;margin:0 0 14px}
#ff-sidebar-promo h2 {font-size:19px;line-height:1.35;color:#f0f3f9;margin:0 0 10px}
#ff-sidebar-promo p {font-size:13px;line-height:1.5;color:#b7c1d4}
#ff-sidebar-promo .ff-promo-products {font-size:10px;font-weight:700;white-space:nowrap}
.ff-promo-button {display:flex;justify-content:center;align-items:center;min-height:44px;background:#b2eb3f;border-radius:7px;color:#0b1012!important;text-decoration:none;font-size:13px;font-weight:750}
#ff-sidebar-promo small {display:block;font-size:11px;line-height:1.5;color:#a8b3c7;margin-top:10px}
body.ff-workspace #v2-tier-sub,body.ff-workspace #ff-quality-summary,body.ff-workspace #ff-funding-summary {display:none!important}
#ff-takeaways p {font-size:14px;line-height:1.55;margin:0 0 10px;color:#c9d0df}
#ff-takeaways strong {color:#f0f3f9}
body.ff-workspace #ff-result-details {grid-column:1/-1;grid-row:auto;margin:12px 0;padding:0 12px}
body.ff-workspace #v2-verdict-block > [data-ff-exit-cost] {order:10}
body.ff-workspace #ff-result-details #v2-conf,body.ff-workspace #ff-result-details #v2-norm {margin:12px 0!important}
#ff-fund-underwriting {border-left:3px solid #edb65b;padding:10px 14px;font-size:14px;line-height:1.6;margin:0 0 18px}
body.ff-workspace #v2-fundcta {display:block!important;padding:24px!important;max-width:850px;margin:0 auto}
body.ff-workspace #v2-fundcta[hidden] {display:none!important}
body.ff-workspace #v2-fundcta .v2-fundcta__headline {font-size:20px;line-height:1.45;max-width:65ch}
#ff-fund-explanation h3 {font-size:15px;color:#f0f3f9;margin:24px 0 8px}
#ff-fund-explanation p {font-size:15px;color:#b7c1d4;line-height:1.6}
body.ff-workspace #v2-fundcta .v2-fundcta__actions {margin-top:24px}
body.ff-workspace #v2-fundcta[data-prominent="false"] #v2-fundcta-primary {background:transparent!important;border:1px solid #748396;color:#e4eaf3!important;box-shadow:none!important}
body.ff-workspace #v2-fundcta-primary[hidden] {display:none!important}
.ff-result-funding {grid-column:1/-1;border-top:1px solid #35455c;margin-top:16px;padding:18px 0 4px;max-width:850px}
.ff-result-funding[hidden] {display:none!important}
.ff-result-funding h3 {font-size:16px;color:#eaf1fa;margin:0 0 8px}
.ff-result-funding p {font-size:14px;line-height:1.55;color:#c3cede;margin:0 0 12px}
.ff-result-funding button {min-height:44px;padding:10px 18px;border:1px solid #b2eb3f;border-radius:7px;background:#b2eb3f;color:#101713;font:700 14px/1.4 inherit;cursor:pointer}
.ff-result-funding[data-prominent="false"] button {background:#14243c;border-color:#6c7d94;color:#e9f0fa}
.ff-result-funding small {display:block;font-size:12px;line-height:1.5;color:#aab8ce;max-width:78ch;margin-top:10px}
#ff-stack-questions {border-top:1px solid #303948;margin-top:22px;padding-top:14px}
#ff-stack-questions[hidden] {display:none}
#ff-stack-questions p {font-size:14px;line-height:1.6;color:#b7c1d4}
body.ff-workspace input,body.ff-workspace select,body.ff-workspace textarea {scroll-margin-top:160px}
@media(max-width:900px){
  body.ff-workspace #v2-shell {display:block!important;padding:0 12px 28px!important}
  body.ff-workspace #v2-sidebar {display:none!important}
  body.ff-workspace #ff-mobile-top {position:sticky;top:0;z-index:30;display:flex;justify-content:space-between;align-items:center;box-sizing:border-box;height:calc(44px + env(safe-area-inset-top,0px));min-height:44px;padding:env(safe-area-inset-top,0px) 0 0!important;background:var(--v121-bg,#060810);margin:0 -2px}
  #ff-mobile-top a,#ff-mobile-top button {display:flex;align-items:center;justify-content:center;min-height:44px;min-width:44px;border:0;background:transparent;color:#edf2fb;font:600 14px/1.2 inherit;padding:8px 10px;text-decoration:none}
  #ff-mobile-top a {font-size:24px}
  body.ff-workspace #uw-banner {top:calc(44px + env(safe-area-inset-top,0px));min-height:64px!important;padding:8px 10px!important;display:block;max-height:none;margin-bottom:8px!important}
  body.ff-workspace #uw-banner h1 {font-size:20px;line-height:1.25;margin:0 0 5px}
  body.ff-workspace #uw-banner-message {font-size:13px;line-height:1.35;margin:0}
  body.ff-workspace #uw-banner .uw-banner__action {display:flex;flex-direction:row;flex-wrap:wrap;gap:4px 10px;margin-top:4px;align-items:center}
  body.ff-workspace #uw-banner-cta {width:auto;min-height:44px;font-size:12px;padding:6px 10px;border-radius:5px}
  body.ff-workspace #uw-banner-note {font-size:10px;line-height:1.25;flex:1 1 120px}
  body.ff-workspace #v2-results-tabs {margin:8px 0 14px!important;position:static!important}
  body.ff-workspace #v2-results-tabs .v2-tabs__strip {padding:0 0 5px;mask-image:none;border-radius:0;scroll-snap-type:x proximity}
  body.ff-workspace #v2-results-tabs::after {display:none!important}
  body.ff-workspace #v2-results-tabs {height:auto!important;max-height:none!important}
  #ff-tab-hint {display:block;font-size:11px;color:#9eaec5;padding:2px 4px;margin:0}
  body.ff-workspace #v2-results-tabs .v2-tab {flex:0 0 auto;min-width:84px;padding:10px!important;scroll-snap-align:start}
  body.ff-workspace #v2-results-tabs .v2-tab__label {font-size:12px}
  body.ff-workspace .v2-intake-pane {padding:12px 4px 24px!important}
  body.ff-workspace .v119-grid,body.ff-workspace .ff-intake__grid,body.ff-workspace .v2-grid {grid-template-columns:minmax(0,1fr)!important}
  body.ff-workspace input:not([type=radio]):not([type=checkbox]),body.ff-workspace select,body.ff-workspace textarea {font-size:16px!important;max-width:100%;box-sizing:border-box;min-height:44px}
  body.ff-workspace .v2-router__opts {display:flex!important;flex-direction:column;align-items:stretch;width:100%}
  body.ff-workspace .v2-router__opts label {width:100%;box-sizing:border-box;min-height:44px;white-space:normal}
  body.ff-workspace .v119-advanced>summary {display:flex;flex-wrap:wrap;gap:6px;line-height:1.4;white-space:normal}
  body.ff-workspace .v119-advanced>summary>* {min-width:0;max-width:100%;white-space:normal}
  body.ff-workspace #v2-fundcta {padding:16px 8px!important}
  body.ff-workspace #v2-fundcta .v2-fundcta__headline {font-size:18px}
  body.ff-workspace #v2-fundcta-primary {width:100%;white-space:normal}
  body.ff-workspace #v2-verdict-block {display:flex!important;flex-direction:column;gap:14px}
  body.ff-workspace #v2-verdict-block>* {width:100%;box-sizing:border-box}
  body.ff-workspace #v2-gauge {width:170px;align-self:center}
  body.ff-workspace #v2-kpis {display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))}
  body.ff-workspace .v2-main {padding:0!important;margin:0!important}
  body.ff-workspace .v2-tabpanel {padding-left:0!important;padding-right:0!important}
  body.ff-workspace #v2-intake-panel,body.ff-workspace .v119-advanced,body.ff-workspace .v2-tabpanel {max-height:none!important;overflow-y:visible!important}
  body.ff-workspace :is(input,select,textarea,button,[aria-invalid="true"]) {scroll-margin-top:220px;scroll-margin-bottom:60px}
  .ff-result-funding button {width:100%}
}
@media(max-width:900px) and (max-height:450px){
  body.ff-workspace:focus-within #uw-banner {position:static}
}

/* Owner-requested sticky analysis strip and right-side banner action. */
html[data-verdict-product="flip"] {
  scroll-padding-top:calc(var(--ff-top-height,0px) + var(--ff-banner-height,96px) + var(--ff-tabs-height,60px) + 12px);
}
body.ff-workspace #v2-results-tabs {
  position:sticky!important;
  top:calc(var(--ff-top-height,0px) + var(--ff-banner-height,96px));
  z-index:19;background:#080d18!important;margin-top:0!important;
}
body.ff-workspace #uw-banner {margin-bottom:0!important}
body.ff-workspace #uw-banner-cta::after {content:" →";font-size:18px}
body.ff-workspace :is(input,select,textarea,button,[aria-invalid="true"],.v2-tabpanel) {
  scroll-margin-top:12px!important;
}
@media(max-width:900px){
  body.ff-workspace #uw-banner {
    position:sticky!important;display:grid!important;
    grid-template-columns:minmax(0,1fr) 44px;gap:4px 12px;
  }
  body.ff-workspace #uw-banner .uw-banner__copy {grid-column:1;grid-row:1}
  body.ff-workspace #uw-banner .uw-banner__action {display:contents}
  body.ff-workspace #uw-banner-cta {
    grid-column:2;grid-row:1 / span 2;align-self:center;justify-self:end;
    width:44px;height:44px;min-width:44px;padding:0;font-size:0;
  }
  body.ff-workspace #uw-banner-cta::after {content:"→";font-size:23px;line-height:1}
  body.ff-workspace #uw-banner-note {grid-column:1;grid-row:2;margin:0}
}
/* The current funding section owns the result CTA. Keep the legacy mount for
   existing renderer writes, but remove its duplicate control from public UI. */
html[data-verdict-product="flip"] #v127-score-cta { display:none!important; }

/* Approved integrated banner: presentation only; current actions stay authoritative. */
body.ff-workspace #uw-banner {
  background:radial-gradient(ellipse at 12% 25%,#315abd13,transparent 65%),var(--v121-bg,#060810)!important;
  border:0!important;border-bottom:1px solid #304364!important;border-radius:0!important;
  box-shadow:none!important;min-height:184px!important;padding:26px 4px 24px!important;
  grid-template-columns:minmax(0,1fr) auto;gap:12px 36px;
}
body.ff-workspace #uw-banner::after {
  content:"";position:absolute;bottom:-1px;left:4px;right:40%;height:1px;
  background:linear-gradient(90deg,var(--banner-accent),transparent);opacity:.8;pointer-events:none;
}
body.ff-workspace #uw-banner .uw-banner__copy {grid-column:1;grid-row:1}
body.ff-workspace #uw-banner .uw-banner__action {display:contents}
body.ff-workspace #uw-banner-eyebrow {display:block;color:#90ace2;font-size:12px;letter-spacing:.14em;margin:0 0 10px}
body.ff-workspace #uw-banner h1 {font-size:clamp(28px,2.6vw,38px);line-height:1.18;letter-spacing:-.03em;margin:0 0 10px}
body.ff-workspace #uw-banner-message {font-size:16px;line-height:1.5;color:#c5d0e0}
body.ff-workspace #uw-banner-guidance {font-size:13px;color:#8597b0;line-height:1.5;margin:7px 0 0}
body.ff-workspace #uw-banner-guidance[hidden] {display:none!important}
body.ff-workspace #uw-banner .uw-banner__name {color:#aff34f;text-shadow:0 0 28px #a6f04a12}
body.ff-workspace #uw-banner .uw-banner__key {color:var(--banner-accent)}
body.ff-workspace #uw-banner[data-state="ready"] .uw-banner__key {color:#a9c3ff}
body.ff-workspace #uw-banner-cta {
  grid-column:2;grid-row:1;align-self:center;justify-self:end;display:flex;align-items:center;gap:16px;
  width:auto;max-width:280px;min-height:52px;padding:0!important;border:0!important;box-shadow:none!important;
  background:transparent!important;color:#becce0!important;font-size:13px;font-weight:600;text-align:right;
}
body.ff-workspace #uw-banner-cta::after {
  content:"↗";flex-shrink:0;display:grid;place-items:center;width:52px;height:52px;border-radius:12px;
  border:1px solid #3b527b;background:#142039;color:#b7ceff;font-size:25px;font-weight:400;
}
body.ff-workspace #uw-banner[data-prominent="true"] #uw-banner-cta::after {color:#aff34f;background:#243818;border-color:#a6f04a77}
body.ff-workspace #uw-banner-note {grid-column:1/-1;grid-row:2;font-size:12px;line-height:1.45;margin:0;max-width:850px;color:#95a4bb}
@media(max-width:900px) {
  body.ff-workspace #uw-banner {min-height:0!important;padding:12px 0!important;grid-template-columns:minmax(0,1fr) 44px;gap:7px 12px}
  body.ff-workspace #uw-banner h1 {font-size:24px;line-height:1.17;margin-bottom:6px}
  body.ff-workspace #uw-banner-eyebrow,body.ff-workspace #uw-banner-guidance {display:none!important}
  body.ff-workspace #uw-banner-message {font-size:12px;line-height:1.4}
  body.ff-workspace #uw-banner-cta {width:44px;height:44px;min-height:44px;font-size:0;gap:0}
  body.ff-workspace #uw-banner-cta::after {width:44px;height:44px;box-sizing:border-box;border-radius:9px;font-size:23px}
  body.ff-workspace #uw-banner-note {font-size:11px;line-height:1.4}
}
/* Tablet breathing room, without enlarging the phone/short-screen header.
   Existing ResizeObserver measurements keep sticky tabs and focus offsets
   aligned with the actual banner height; no application logic changes. */
@media(min-width:701px) and (max-width:900px) and (min-height:600px) {
  body.ff-workspace #uw-banner {
    min-height:124px!important;padding:22px 6px 20px!important;
    grid-template-columns:minmax(0,1fr) 48px;gap:10px 24px;
  }
  body.ff-workspace #uw-banner h1 {font-size:32px;line-height:1.2;margin-bottom:8px}
  body.ff-workspace #uw-banner-message {font-size:15px;line-height:1.5}
  body.ff-workspace #uw-banner-note {font-size:12px;line-height:1.45}
  body.ff-workspace #uw-banner-cta,
  body.ff-workspace #uw-banner-cta::after {width:48px;height:48px;min-height:48px}
  /* Reuse some of the space beneath the tabs rather than pushing intake down. */
  body.ff-workspace .v2-intake-pane {padding-top:4px!important}
  body.ff-workspace .v2-intake__body {padding-top:8px!important}
  body.ff-workspace .ff-intake__header {margin-bottom:6px!important}
}
