/* Functions share the Verticals workspace, selector, title and KPI components. */
#stage .functions-view{position:relative;z-index:2;max-width:none;width:100%;margin:0;text-align:left}
.functions-view[hidden]{display:none!important}
#stage.is-functions>.skyline,#stage.is-functions>.ambient{display:none}
.function-list{overflow:auto;min-height:0;display:flex;flex-direction:column;gap:6px;scrollbar-width:thin;scrollbar-color:#16684666 transparent;padding:2px;flex:1}
.function-list .function-card{position:relative!important;inset:auto!important;transform:none!important;flex-shrink:0;width:100%!important;max-width:none!important;min-height:58px!important;margin:0!important;padding:0!important}
.function-list .vertical-row{width:100%;min-height:58px!important}
.function-list .node-copy{min-width:0;flex:1}.function-list .node-copy>span{white-space:normal!important;line-height:1.35!important}.function-list .node-copy small{display:block!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.function-card:focus-visible{outline:2px solid #166846;outline-offset:1px}
.fn-panel .realty-panel-heading p{white-space:normal!important}
.fn-progress{margin:10px 0}.fn-progress>div:first-child{display:flex;justify-content:space-between;gap:12px;font:400 14px/1.4 Roboto,sans-serif;margin-bottom:8px;color:#1b1d4d}.fn-progress .completion-track{height:9px;background:#edf0f4;overflow:hidden;border-radius:8px}.fn-progress .completion-track span{display:block;height:100%;border-radius:8px}
.fn-action{display:flex;align-items:flex-start;gap:10px;padding:14px 0;border-bottom:1px solid #edf0f5}.fn-action:last-of-type{border-bottom:0}.fn-action h5{font:500 14px/1.4 Roboto,sans-serif;margin:0;color:#1b1d4d}.fn-action p{font:400 14px/1.5 Roboto,sans-serif;color:#64748b;margin:4px 0 0}.fn-action>small{font-size:12px;white-space:nowrap;margin-left:auto;color:#52647b}.fn-dot{width:7px;height:7px;border-radius:50%;flex-shrink:0;margin-top:5px}.fn-dot.green{background:#166846}.fn-dot.amber{background:#b86b08}.fn-note{font-size:11px;color:#64748b;grid-column:1/-1}
.function-kpis small>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.function-expanded .detail-top{padding:18px 22px}.function-expanded .realty-dashboard{display:grid;gap:16px}.function-expanded .realty-panels{align-items:stretch}
@media(max-width:760px){.function-list{max-height:260px}.function-workspace{display:grid;grid-template-columns:1fr!important}.function-detail{min-height:0!important}.function-selector{display:flex;flex-direction:column}.function-kpis{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.function-expanded .realty-panels{grid-template-columns:1fr}}

#stage.is-functions .vertical-selector .function-list{display:flex;flex-direction:column;flex:1;overflow:auto;min-height:0}
#stage.is-functions .function-list .function-card{border-radius:10px;background:#ffffff08;border:1px solid #ffffff16}
#stage.is-functions .function-list .function-card[aria-selected=true]{background:#fff;border-color:#fff;box-shadow:0 4px 12px #0a253320}
#stage.is-functions .function-list .function-card .vertical-row{display:flex;align-items:center;gap:8px;text-align:left;padding:8px 9px}
#stage.is-functions .function-list .function-card .node-copy>span{color:inherit;text-shadow:none}
#stage.is-functions .function-list .function-card[aria-selected=true] .node-copy>span{color:#1b1d4d}
#stage.is-functions .function-list .node-copy small{white-space:nowrap!important;text-overflow:ellipsis!important;overflow:hidden!important}

/* Reuse the vertical KPI dimensions and fit function content to the desktop workspace. */
.function-kpis .kpi-target{min-width:0}
.function-kpis .kpi-target>span,.function-kpis .kpi-target>b{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.function-kpis .kpi small{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(min-width:761px){
 #stage.is-functions .workspace>.function-detail>.fn-content{min-height:0;grid-template-rows:auto minmax(0,1fr);gap:10px}
 .function-detail .realty-stats{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
 .function-detail .realty-panels{grid-template-columns:repeat(2,minmax(0,1fr));min-height:0;gap:12px}
 #stage.is-functions .workspace .fn-panel{min-height:0;gap:0;padding:12px;display:flex;flex-direction:column}
 .function-detail .realty-panel-heading h4{font-size:18px;line-height:1.25}
 .function-detail .realty-panel-heading p{font-size:12px;line-height:1.4}
 .function-detail .fn-progress{margin:6px 0}
 .function-detail .fn-progress>div:first-child{font-size:13px;margin-bottom:5px}
 .function-detail .fn-action{padding:8px 0;gap:7px}
 .function-detail .fn-action>div{min-width:0}
 .function-detail .fn-action h5{font-size:13px;line-height:1.3}
 .function-detail .fn-action p{font-size:12px;line-height:1.35;margin-top:3px}
 .function-detail .fn-action>small{font-size:10px}
 #stage.is-functions .workspace .realty-panel-footer{font-size:11px;line-height:1.35;min-height:0;padding-top:6px}
}
@media(min-width:761px) and (max-height:800px){
 #stage.is-functions .workspace>.function-detail>.fn-content{padding:8px;gap:8px}
 .function-detail .realty-stat{padding:9px 11px;grid-template-rows:minmax(32px,auto) 30px auto;gap:2px}
 .function-detail .realty-stat h4{font-size:12px;line-height:1.3}
 .function-detail .realty-stat>p{font-size:11px;line-height:1.3}
 #stage.is-functions .workspace .fn-panel{padding:9px}
 .function-detail .realty-panel-heading{padding-bottom:6px;gap:4px}
 .function-detail .realty-panel-heading h4{font-size:16px}
 .function-detail .fn-action{padding:5px 0}
 .function-detail .fn-progress{margin:4px 0}
}
/* Narrow screens keep natural scrolling rather than hiding dashboard content. */
@media(max-width:760px){
 .function-workspace>.function-selector,.function-workspace>.function-detail{grid-column:1/-1!important}
 .function-detail>.fn-content{grid-template-rows:auto auto}
}
#stage .functions-view{padding-left:3.4%;padding-right:3.4%}


/* Pending action status uses the shared red accent. */
.fn-dot.red{background:#d60039}

/* Current brand theme, strictly scoped to Functions. */
#stage.is-functions{background:radial-gradient(ellipse at 86% 14%,#67b29014,transparent 62%),radial-gradient(ellipse at 8% 88%,#d6003907,transparent 58%),#fff;isolation:isolate}
#stage.is-functions:before{content:'';position:absolute;inset:0;background:url('assets/landing-waves.svg?v=bottom-only') center bottom/100% 100% no-repeat;opacity:.3;pointer-events:none;z-index:0}
#stage.is-functions .function-kpis .kpi{background:radial-gradient(ellipse at 100% 100%,#67b29055,#67b29020 32%,transparent 70%),#fff!important;border-color:transparent;box-shadow:0 4px 16px #1b1d4d0b}
#stage.is-functions .function-kpis .kpi:after,#stage.is-functions .function-kpis .kpi:before{display:none}
#stage.is-functions .kpi-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
#stage.is-functions .function-kpi-icon{display:grid;place-items:center;width:36px;height:36px;flex:0 0 36px;border-radius:10px;background:#1668460d;color:#166846}
#stage.is-functions .function-kpi-icon svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
#stage.is-functions .workspace>.function-selector{background:linear-gradient(155deg,#166846,#245c69 52%,#1b1d4d);color:#fff;border-color:transparent;box-shadow:0 6px 20px #1b1d4d15}
#stage.is-functions .function-selector :is(h3,.eyebrow,.selector-hint){color:#e8f3ef}
#stage.is-functions .function-selector .selector-count{background:#ffffff20;color:white}
#stage.is-functions .function-selector :is(.selector-heading,.selector-hint){border-color:#ffffff25}
#stage.is-functions .function-list .function-card{background:#ffffff08;color:#fff;border-color:#ffffff16;border-radius:10px}
#stage.is-functions .function-list .function-card .node-copy small{color:#d5e6e4}
#stage.is-functions .function-list .function-card .selector-icon{background:#ffffff15;color:#e5f4ee}
#stage.is-functions .function-list .function-card:hover{background:#ffffff18}
#stage.is-functions .function-list .function-card[aria-selected=true]{background:white;color:#1b1d4d;box-shadow:0 4px 12px #0a253320}
#stage.is-functions .function-list .function-card[aria-selected=true] .node-copy small{color:#637583}
#stage.is-functions .function-list .function-card[aria-selected=true] .selector-icon{background:#eaf4ef;color:#166846}
#stage.is-functions #function-detail{background:#edf5fc;border-color:transparent;box-shadow:0 4px 20px #1b1d4d0a}
#stage.is-functions #function-detail>.detail-top,.function-expanded>.detail-top{background:white!important;color:#1b1d4d;margin:12px 12px 0;border:0;border-radius:12px;box-shadow:0 4px 14px #1b1d4d0a;align-items:center}
#stage.is-functions .detail-title h3,.function-expanded .detail-title h3{color:#1b1d4d!important}
#stage.is-functions .detail-title p,.function-expanded .detail-title p{color:#64748b!important}
#stage.is-functions .detail-title .symbol{display:grid;place-items:center;background:#edf4fa;color:#1b1d4d}
#stage.is-functions .detail-actions{display:flex;align-items:flex-end;gap:12px;flex-wrap:wrap}
#stage.is-functions .expand{background:#1b1d4d;color:white;border:0;border-radius:9px;min-height:40px;padding:9px 16px;display:flex;align-items:center;gap:8px}
#stage.is-functions .business-picker-label,.function-expanded .business-picker-label{color:#536379}
#stage.is-functions .business-picker select,.function-expanded .business-picker select{background:#f3f7fa;color:#1b1d4d;border:1px solid #cbd8e2;border-radius:9px;height:40px;padding:9px 38px 9px 12px}
#stage.is-functions .business-picker-chevron,.function-expanded .business-picker-chevron{color:#166846}
#stage.is-functions .business-picker option{color:#1b1d4d;background:white}
#stage.is-functions .fn-content .realty-stat{height:138px;border-color:transparent;background:linear-gradient(135deg,#fff,#e0eee5);box-shadow:0 3px 14px #1b1d4d09}
#stage.is-functions .fn-content .realty-stat:nth-child(2){background:linear-gradient(135deg,#fff,#e1eaf5)}
#stage.is-functions .fn-content .realty-stat:nth-child(3){background:linear-gradient(135deg,#fff,#eee3ce)}
#stage.is-functions .fn-content .realty-stat:nth-child(4){background:linear-gradient(135deg,#fff,#e7e9f3)}
#stage.is-functions .realty-stat:before{display:none}
body #stage.is-functions .realty-stat>strong{font-weight:500!important}
body #stage.is-functions .realty-panel-heading h4{font-size:18px!important}
body #stage.is-functions .realty-panel-heading p{font-size:12px!important;line-height:1.5!important;white-space:normal!important}
#stage.is-functions .fn-panel{border-color:transparent;box-shadow:0 3px 14px #1b1d4d08;display:flex;flex-direction:column;gap:14px}
#stage.is-functions .fn-progress{flex:1;display:flex;flex-direction:column;justify-content:center}
#stage.is-functions .fn-action{flex:1;padding:14px;border-radius:10px;background:#f5f8fb;align-items:center}
#stage.is-functions .fn-action>div{min-width:0}
#stage.is-functions .fn-action small{white-space:nowrap}

/* Match the Verticals selector's geometry and interaction treatment. */
#stage.is-functions .workspace>.function-selector{padding:12px 10px 10px;border-radius:18px;display:flex;flex-direction:column;min-height:0;overflow:hidden}
#stage.is-functions .function-selector .selector-heading{margin:0 2px 8px;padding:0 0 10px;border-bottom:1px solid #ffffff25;flex-shrink:0}
#stage.is-functions .function-list{display:flex;flex-direction:column;gap:6px;padding:2px;min-height:0;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:#ffffff55 transparent}
#stage.is-functions .function-list .function-card{min-height:72px!important;flex:0 0 auto;box-shadow:none;border:1px solid #ffffff16;border-radius:10px}
#stage.is-functions .function-list .function-card .vertical-row{min-height:70px!important;height:100%;padding:10px;display:flex;align-items:center;gap:10px}
#stage.is-functions .function-list .selector-icon{width:28px;height:28px;flex:0 0 28px;border-radius:8px;display:grid;place-items:center;border:1px solid #ffffff20}
#stage.is-functions .function-list .selector-icon svg{width:16px;height:16px}
#stage.is-functions .function-list .node-copy{flex:1;min-width:0;text-align:left}
#stage.is-functions .function-list .node-copy>span{font-size:13px;line-height:1.35!important;color:inherit}
#stage.is-functions .function-list .node-copy small{font-size:10px;line-height:1.4}
#stage.is-functions .function-list .selector-arrow{display:grid;place-items:center;flex:0 0 20px;width:20px;height:20px;border-radius:50%;font-size:14px;color:inherit}
#stage.is-functions .function-list .function-card[aria-selected=true],#stage.is-functions .function-list .function-card[aria-selected=true]:hover{background:#fff;color:#1b1d4d;border-color:#fff;box-shadow:0 4px 12px #0a253320}
#stage.is-functions .function-list .function-card[aria-selected=true] .selector-arrow{background:#edf4f2;color:#166846}
#stage.is-functions .function-list .function-card[aria-selected=true] .selector-icon{background:#eaf4ef;color:#166846;border-color:#d5e7dd}
#stage.is-functions .function-list .function-card:focus-visible{outline:2px solid #b8e6db;outline-offset:2px}
#stage.is-functions .function-selector .selector-hint{margin:8px 2px 2px;padding-top:8px;color:#dae8e6;border-color:#ffffff25;flex-shrink:0}
#stage.is-functions .function-selector .selector-hint:before{background:#a9d9c4}

/* Reference-matched selector header and readable row states. */
#stage.is-functions .function-selector .selector-heading h3{color:#fff;font-size:20px;line-height:1.25;margin:5px 0 0}
#stage.is-functions .function-selector .selector-heading .eyebrow{color:#e1f0e9;font-size:9px;letter-spacing:1px}
#stage.is-functions .function-list .function-card:not([aria-selected=true]){color:#fff;background:#ffffff08;border-color:#ffffff16}
#stage.is-functions .function-list .function-card:not([aria-selected=true]):hover{background:#ffffff18;border-color:#ffffff36}
#stage.is-functions .function-list .function-card[aria-selected=true] .node-copy small{color:#637583}
#stage.is-functions .function-list .function-card:not([aria-selected=true]) .node-copy small{color:#d5e6e4}
#stage.is-functions .function-selector .selector-count{border:1px solid #ffffff25;background:#ffffff18;color:#fff;border-radius:9px}

/* Reference-style detail KPIs for all eighteen Functions. */
#stage.is-functions .fn-content .realty-stat,.function-expanded .fn-content .realty-stat{position:relative;box-sizing:border-box;height:138px;min-height:138px;display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);grid-template-rows:32px 33px auto;gap:5px 8px;padding:14px;border:0;border-radius:12px;background:linear-gradient(135deg,#fff 12%,#f2f8f5 64%,#e0eee5)!important;box-shadow:0 3px 14px #1b1d4d09}
#stage.is-functions .fn-content .realty-stat:nth-child(2),.function-expanded .realty-stat:nth-child(2){background:linear-gradient(135deg,#fff 12%,#f2f6fb 64%,#e1eaf5)!important}
#stage.is-functions .fn-content .realty-stat:nth-child(3),.function-expanded .realty-stat:nth-child(3){background:linear-gradient(135deg,#fff 12%,#fcf4f3 64%,#f2dedb)!important}
#stage.is-functions .fn-content .realty-stat:nth-child(4),.function-expanded .realty-stat:nth-child(4){background:linear-gradient(135deg,#fff 12%,#f4f5fa 64%,#e7e9f3)!important}
:is(#stage.is-functions,.function-expanded) .fn-content .realty-stat-heading{grid-column:1/-1;grid-row:1}
:is(#stage.is-functions,.function-expanded) .fn-content .realty-stat>strong{grid-column:1;grid-row:2;font-weight:500!important;align-self:center}
:is(#stage.is-functions,.function-expanded) .fn-content .realty-stat>p{grid-column:1;grid-row:3;align-self:start;font-size:11px;line-height:1.4}
:is(#stage.is-functions,.function-expanded) .fn-metric-chart{grid-column:2;grid-row:2/4;align-self:end;min-width:0;height:76px}
:is(#stage.is-functions,.function-expanded) .fn-metric-chart svg{width:100%;height:76px;display:block;fill:none;stroke:none;overflow:visible}
:is(#stage.is-functions,.function-expanded) .fn-metric-chart text{font:8px Roboto,Arial,sans-serif;fill:#536379}
:is(#stage.is-functions,.function-expanded) .fn-content .realty-stat:before{display:none}

/* Function priorities: aligned action rows matching the vertical panel rhythm. */
#stage.is-functions #function-detail .realty-panels>.fn-panel:nth-child(2){display:flex;flex-direction:column;gap:12px}
#stage.is-functions #function-detail .fn-action{display:grid;grid-template-columns:8px minmax(0,1fr) 76px;align-items:center;gap:12px;padding:16px 14px;flex:1;border:0;border-radius:10px;background:#f5f8fb;box-shadow:0 2px 8px #1b1d4d04}
#stage.is-functions #function-detail .fn-action .fn-dot{margin:0;width:7px;height:7px;align-self:center}
#stage.is-functions #function-detail .fn-action>div{min-width:0}
#stage.is-functions #function-detail .fn-action h5{margin:0 0 5px;font:500 14px/1.4 Roboto,Arial,sans-serif;color:#1b1d4d}
#stage.is-functions #function-detail .fn-action p{margin:0;font:400 12px/1.5 Roboto,Arial,sans-serif;color:#64748b}
#stage.is-functions #function-detail .fn-action>small{margin:0;justify-self:stretch;text-align:center;padding:5px 7px;border-radius:6px;font:500 11px/1.4 Roboto,Arial,sans-serif;background:#fff3df;color:#946015;white-space:nowrap}
#stage.is-functions #function-detail .fn-action:has(.green)>small{background:#e7f3ec;color:#166846}
#stage.is-functions #function-detail .fn-action:has(.red)>small{background:#fbecea;color:#b42318}
#stage.is-functions #function-detail .fn-action .fn-dot.red{background:#b42318}
#stage.is-functions #function-detail .realty-panels>.fn-panel:nth-child(2)>.realty-panel-footer{margin-top:auto}
@media(max-width:600px){#stage.is-functions #function-detail .fn-action{grid-template-columns:8px minmax(0,1fr);padding:12px}#stage.is-functions #function-detail .fn-action>small{grid-column:2;justify-self:start}}

/* Match the Verticals detail canvas without changing its inner cards. */
#stage.is-functions #function-detail,
#stage.is-functions #function-detail>.fn-content,
.function-expanded>.fn-content{background:#edf5fc!important;background-image:none!important}
#stage.is-functions #function-detail{border-color:transparent;box-shadow:0 4px 20px #1b1d4d0a,0 1px 4px #1b1d4d04}
