/* CIGRO composition, FINISHIFT homepage palette. 2026-09-23. */
:root{color-scheme:dark;--bg:#0a0e16;--rail:#101723;--panel:#101723;--panel-hi:#172131;--input:#0a0e16;--line:#243044;--line-2:#2a3547;--line-4:#46536b;--text:#f3f5f8;--dim:#b4bfd0;--dim-2:#a3afc1;--accent:#5b8def;--accent-hover:#80a8f5;--on-accent:#0a0e16;--up:#51d7ac;--down:#ff8a9e;--hold:#e9c26c}
body{background:var(--bg);color:var(--text);font-size:15px;letter-spacing:-.015em}
button,input{font-family:inherit}button{touch-action:manipulation}
.demo-bar{height:36px;display:flex;align-items:center;justify-content:flex-end;gap:9px;padding:0 38px;background:#172131;color:var(--dim);font-size:12px}
.demo-bar i{height:6px;width:6px;border-radius:50%;background:var(--accent)}
.app{min-height:calc(100dvh - 36px)}
.rail{position:sticky;top:0;width:98px;flex:0 0 98px;height:100dvh;background:var(--rail);border-right:1px solid var(--line);padding:0;align-items:center}
.rail .mark{height:106px;width:100%;border:0;color:var(--accent);display:flex;justify-content:center}
.rail .mark svg{height:43px;width:43px}.rail .mark::after{display:none}
.rail nav{gap:17px;padding:10px 0;align-items:center}
.ri{width:78px;height:82px;padding:0;gap:9px;flex-direction:column;justify-content:center;border-radius:12px;color:var(--dim)}
.ri svg{width:49px;height:49px;padding:11px;stroke-width:1.8;background:#1a2434;border-radius:15px;color:#aebbd0}
.ri i{font-size:12px;font-weight:550;line-height:1.2}.ri:hover{background:transparent;color:var(--text)}.ri:hover svg{background:#243149}
.ri[aria-current=page]{background:transparent;color:var(--accent-hover)}.ri[aria-current=page] svg{background:var(--accent);color:#fff}
.ri[aria-current=page]::before{display:none}.ri.is-muted{opacity:.48;cursor:not-allowed}
.rail-bottom{margin-top:auto;padding:20px 0 24px}.rail-bottom .ri{height:70px}
.top,.wrap{width:calc(100% - clamp(64px,13.5vw,276px));max-width:1692px;margin:0 auto;padding:0}
.top{position:relative;min-height:124px;display:flex;flex-wrap:nowrap;gap:20px;background:transparent;border:0;box-shadow:none;backdrop-filter:none;z-index:60}
.workspace-heading{display:flex;align-items:center;gap:17px;margin-right:auto;min-width:0}.workspace-heading h1{margin:0;font-size:30px;line-height:1.2;font-weight:720;letter-spacing:-.025em;white-space:nowrap}
.help-link{display:flex;align-items:center;gap:7px;font-size:13px;color:var(--accent-hover);white-space:nowrap}.help-link svg{width:18px;height:18px}
.control-icon{height:22px;width:22px;stroke:var(--accent);fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none}
.pill{min-height:52px;width:280px;padding:13px 18px;gap:16px;border:0;border-radius:8px;background:var(--panel-hi);color:var(--text);font-size:15px;font-weight:500;justify-content:flex-start}
.pill>svg:last-child{margin-left:auto;color:var(--dim)}.pill:hover{background:#1f2b3e}.pill small{font-size:11px;color:var(--dim)}
#brand-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.date-control{width:306px;font-variant-numeric:tabular-nums;gap:14px;white-space:nowrap}
.date-popover{position:absolute;top:64px;right:0;width:366px;padding:22px;border:1px solid var(--line-4);border-radius:12px;background:var(--panel-hi);box-shadow:0 18px 45px #0006}
.date-popover h2{margin:0 0 6px;font-size:17px}.date-popover p{font-size:12px;color:var(--dim);margin:0 0 18px}.date-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}.date-fields label{font-size:12px;color:var(--dim)}.date-fields input{display:block;width:100%;min-height:42px;margin-top:6px;padding:6px 8px;background:var(--bg);border:1px solid var(--line-4);color:var(--text);border-radius:6px;font-size:13px}
.date-popover .seg{display:flex;margin:16px 0;gap:6px;border:0;padding:0;background:transparent}.date-popover .seg button{flex:1;min-height:36px;padding:6px;background:#22314a;color:var(--dim);font-size:12px;border-radius:6px}.date-popover .seg button[aria-pressed=true]{background:var(--accent);color:var(--on-accent)}
.apply-date{width:100%;min-height:40px;border:0;border-radius:6px;background:var(--accent);color:var(--on-accent);font-weight:650}.apply-date:hover{background:var(--accent-hover)}
.date-popover .date-error{color:#ffb4ae;margin:10px 0;font-size:12px}
.wrap{padding:0 0 72px}#view-dash{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:28px}#view-dash>*{min-width:0}
.dash-intro{display:none}.cig{margin:0}#m-trend,#m-kpi-sec,.profit-structure{grid-column:1/-1}
#m-trend,.profit-structure,.channel-card{border:0;border-radius:24px;background:var(--panel)}
#m-trend{padding:48px 52px 40px;min-height:590px}.cig-head{display:flex;align-items:center;gap:22px;margin:0 0 34px}.cig-head h2,.sh h2{font-size:20px;font-weight:600;letter-spacing:-.02em;color:var(--dim);margin:0}
.cig-head .mseg{margin-left:auto;flex:none;border:0;padding:3px;border-radius:8px;background:#172131}.mseg button{min-height:34px;padding:7px 13px;font-size:12px;color:var(--dim);border:0!important;border-radius:6px}.mseg button[aria-pressed=true]{background:#293d60;color:#c8dcff}.mseg button:hover{color:#fff}
.cig-body{display:grid;grid-template-columns:minmax(0,1.25fr) 95px minmax(0,1fr) 118px;grid-template-areas:'chart trendlegend donut legend';align-items:center;gap:24px;height:406px;padding:0;border:0;border-radius:0;background:transparent}
.chart{grid-area:chart;min-width:0;align-self:center}.chart svg{display:block;width:100%;height:370px;overflow:visible}.chart .grid,.metric-chart .grid{stroke:#253044;stroke-width:1;opacity:.7}.chart .ax,.metric-chart .ax{fill:#a3afc1;font-size:11px;font-family:var(--sans);font-weight:400;letter-spacing:0}.chart .zero{stroke:#46536b}.chart .cross{stroke:#8091ac}
.donut{grid-area:donut;min-width:0;width:100%;align-self:center}.donut svg{display:block;width:100%;height:auto;max-height:405px;overflow:visible}.donut .dn1{fill:var(--text);font-size:14px;font-weight:600;letter-spacing:-.4px}.donut .dn2{fill:var(--dim);font-size:7px}
.legend{grid-area:legend;list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:18px;align-self:center}.trend-legend{grid-area:trendlegend}.legend .lg{display:grid;grid-template-columns:9px 1fr;column-gap:8px;row-gap:3px;padding:4px 2px;margin:0;border-radius:4px;font-size:12px;color:var(--dim);cursor:pointer}.legend i{width:9px;height:9px;border-radius:50%;align-self:center}.legend b{font-weight:450;color:var(--dim);white-space:nowrap}.legend em{grid-column:2;font-style:normal;color:var(--text);font-size:11px}.legend span{display:none}.trend-legend em{display:none}.legend .lg:hover{background:#1c293c}.legend .lg.is-off{opacity:.5}.legend .lg.is-off b{text-decoration:line-through}
.chart-caption{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:18px;color:var(--dim-2);font-size:11px;line-height:1.6}.mrange{font-size:11px;margin:0}.chart-caption .legend-hint{opacity:.85}
#m-kpi-sec>.cig-head{display:none}.kgrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:28px}.kcard{display:block;min-width:0;min-height:432px;padding:38px 40px 28px;border:0;border-radius:24px;background:var(--panel);color:var(--text);box-shadow:none;animation:none;cursor:pointer;text-align:left}.kcard:hover{background:#131e2e}.kcard:active{transform:none}.kt{display:flex;align-items:center;gap:12px;min-height:26px;margin:0 0 21px}.kn2{font-size:20px;font-weight:600;color:var(--dim)}.metric-arrow{width:19px;height:19px;stroke:#8393ab;fill:none;stroke-width:1.7}.metric-help{display:inline-flex;margin-left:auto;color:#97a5ba}.metric-help svg{width:18px;height:18px}
.metric-value-row{display:flex;justify-content:space-between;align-items:baseline;gap:12px;margin-bottom:27px}.kcard .kv2{display:block;margin:0;color:#f3f5f8;font-size:clamp(25px,1.7vw,34px);line-height:1.25;letter-spacing:-.025em;font-weight:650;white-space:nowrap}.kv2 u{font-size:.7em;font-weight:500;margin-left:4px;color:var(--dim)}.kd{font-size:17px;line-height:1.2;white-space:nowrap;font-weight:600}.g{color:var(--up)}.r{color:var(--down)}
.metric-chart{display:block;width:100%;height:235px;overflow:visible}.knote{display:block;margin-top:10px;font-size:11px;line-height:1.5;color:var(--dim-2);font-weight:400}.chart-unit{fill:#a3afc1;font-size:10px;font-family:var(--sans)}
.profit-structure{padding:42px 48px 24px}.profit-structure .sh{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:22px}.profit-structure .sh a{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--dim)}.profit-structure .sh svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.7}.profit-structure .pbox{border:0;padding:0;background:transparent;border-radius:0;overflow-x:auto}.prow{display:flex;align-items:center;gap:14px;padding:30px 0;border:0;min-width:1060px}.plabel{display:flex;flex:none;align-items:center;gap:8px;width:104px;min-width:104px}.plabel i{width:9px;height:9px;border-radius:50%;flex:none}.plabel b{font-weight:550;font-size:13px;white-space:nowrap}.pflow{display:flex;flex:1;align-items:center;gap:9px;min-width:0}.pterm{display:flex;flex-direction:column;align-items:center;text-align:center;flex:0 1 138px;min-width:94px;gap:0}.pterm>b{width:100%;font-size:13px;font-weight:550;line-height:1.4;color:var(--text);border-bottom:1px solid #334157;padding-bottom:14px;white-space:nowrap}.pterm .pn{font-size:12px;color:var(--dim);padding-top:11px;white-space:nowrap}.pterm em{font-size:13px;font-style:normal;font-weight:600;color:#91b9f0;margin-top:6px}.pterm.is-head{border:0}.pop{flex:none;color:#96a3b5;font-size:14px;padding:0;align-self:flex-start;margin-top:7px}
.channel-card{padding:40px 42px}.channel-card .sh{display:flex;justify-content:space-between;align-items:center;margin:0 0 24px}.channel-card .sh>span{font-size:11px;color:var(--dim-2)}.channel-visual{display:grid;grid-template-columns:minmax(0,1fr) 140px;gap:26px;align-items:center;min-height:225px;margin-bottom:25px}.channel-visual svg{width:100%;max-height:228px;display:block}.channel-key{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:17px}.channel-key li{display:grid;grid-template-columns:8px 1fr auto;align-items:center;gap:8px;font-size:12px;color:var(--dim)}.channel-key i{width:8px;height:8px;border-radius:50%}.channel-key b{font-weight:550;color:var(--text)}
.tw{background:transparent;border:0;border-radius:0;overflow-x:auto}table{width:100%;min-width:0;background:transparent;font-size:12px;table-layout:fixed}th,td{padding:13px 10px;border-color:#243044}th{background:transparent;font-size:11px;color:var(--dim);font-weight:500}tbody tr:hover{background:#172131}tbody tr.tot td{background:#172131;border-color:#2a3547;color:var(--text)}td.name{font-weight:500}.hint{color:var(--dim)}
.dmenu,.tip{background:#172131;border-color:#46536b;box-shadow:0 16px 35px #0005}.dmenu{min-width:280px;padding:7px}.dmenu li{min-height:42px;font-size:14px}.dmenu li.is-sel{background:#293d60;color:#c8dcff}.dmenu li:hover{background:#243149}.dmenu li.dm-add{color:var(--accent-hover)}.tip{max-width:260px;font-size:12px;line-height:1.5}
footer{grid-column:1/-1;color:var(--dim-2);border:0;margin:0;padding:4px 0;font-size:11px}.footer-links{display:flex;gap:20px}
#view-setup{padding-top:16px}.f,.fi input,.fi select,td select,.ob-back,.ob-steps button,.prep span,.cbtn{background:var(--panel-hi);color:var(--text);border-color:var(--line-2)}.ob-go{background:var(--accent);color:#0a0e16}.ob-go:hover{background:var(--accent-hover)}.ob-steps li.is-now button{background:#1c2c46;border-color:#5b8def}.ob-steps li.is-now i{background:var(--accent);color:#0a0e16;border-color:var(--accent)}.done{background:#12292b;border-color:#285d55}.act.a-up{background:#173831;color:#7fe4bf}.act.a-down{background:#38212d;color:#ffacba}.act.a-hold{background:#352e1e;color:#eed39a}.act.a-keep{background:#1b273a;color:var(--dim)}
@media(min-width:1800px){.kcard{min-height:450px;padding:45px 48px 30px}.metric-chart{height:242px}.metric-value-row{margin-bottom:29px}}
@media(max-width:1500px){.top,.wrap{width:calc(100% - 100px)}.top{gap:12px}.workspace-heading h1{font-size:26px}.pill{width:225px;font-size:14px}.date-control{width:282px}.pill small{display:none}.help-link{font-size:12px}.top{min-height:112px}#m-trend{padding:36px 36px 28px;min-height:530px}.cig-body{gap:18px;grid-template-columns:minmax(0,1.3fr) 75px minmax(0,1fr) 92px;height:365px}.chart svg{height:325px}.legend{gap:13px}.kcard{padding:30px 28px 25px;min-height:404px}.kn2{font-size:17px}.kd{font-size:14px}.metric-chart{height:218px}.channel-card{padding:32px}.profit-structure{padding:32px}.kgrid,#view-dash{gap:24px}.metric-value-row{gap:7px}.channel-visual{grid-template-columns:minmax(0,1fr) 120px}}
@media(max-width:1120px){.rail{width:78px;flex-basis:78px}.ri{width:66px}.top,.wrap{width:calc(100% - 48px)}.top{flex-wrap:wrap;gap:12px;padding:24px 0}.workspace-heading{width:100%;margin:0 0 8px}.top .drop{flex:1}.pill{width:100%}.cig-body{grid-template-columns:minmax(0,1.1fr) 70px minmax(0,1fr);grid-template-areas:'chart trendlegend donut' 'legend legend legend';height:auto}.legend:not(.trend-legend){flex-direction:row;justify-content:center;gap:20px;flex-wrap:wrap}.chart svg{height:285px}#m-trend{min-height:0}.kgrid{grid-template-columns:repeat(2,minmax(0,1fr))}.kcard{min-height:405px}.channel-card{padding:26px}.channel-visual{grid-template-columns:1fr;gap:16px}.channel-visual svg{max-height:200px}.channel-key{flex-direction:row;flex-wrap:wrap;gap:15px}.channel-key li{font-size:11px}.cig-head{flex-wrap:wrap;gap:14px}.cig-head h2{font-size:18px}.chart-caption{flex-wrap:wrap;gap:4px}.profit-structure{padding:28px}.prow{min-width:1100px}}
@media(max-width:720px){.demo-bar{height:28px;padding:0 16px;justify-content:center;font-size:10px}.app{display:block}.rail{position:relative;top:auto;width:100%;height:64px;flex-direction:row;justify-content:space-between;padding:0 17px;border-right:0;border-bottom:1px solid var(--line)}.rail .mark{width:40px;height:56px}.rail .mark svg{width:32px;height:32px}.rail nav{flex-direction:row;width:auto;padding:0;gap:8px}.ri{height:48px;width:auto;min-width:58px;flex-direction:row;gap:6px;padding:0 10px}.ri svg,.ri[aria-current=page] svg{width:22px;height:22px;padding:0;border-radius:0;background:transparent;color:inherit}.ri i{font-size:12px}.ri[aria-current=page]{background:#1e2d45}.ri.is-muted,.rail-bottom{display:none}.top,.wrap{width:auto;margin:0 16px}.top{padding:25px 0 23px;gap:10px}.workspace-heading{margin:0 0 10px;justify-content:space-between}.workspace-heading h1{font-size:27px}.help-link{font-size:12px}.top .drop{flex:auto;width:100%}.pill{min-height:46px;padding:11px 15px;font-size:14px;gap:12px}.date-popover{top:56px;width:min(366px,calc(100vw - 32px));padding:18px}.control-icon{width:19px;height:19px}#view-dash{grid-template-columns:1fr;gap:16px}#m-trend,#m-kpi-sec,.profit-structure,.channel-card{grid-column:1}#m-trend{padding:24px 20px 18px;border-radius:18px}.cig-head{gap:15px;margin-bottom:22px}.cig-head h2{font-size:17px}.cig-head .mseg{margin:0}.mseg button{font-size:11px;padding:6px 12px;min-height:32px}.cig-body{grid-template-columns:1fr;grid-template-areas:'chart' 'trendlegend' 'donut' 'legend';gap:22px}.chart svg{height:238px}.trend-legend{flex-direction:row;flex-wrap:wrap;justify-content:center;gap:8px 15px}.legend .lg{font-size:11px}.donut svg{height:245px;max-width:265px;margin:auto}.legend:not(.trend-legend){gap:12px 20px}.legend:not(.trend-legend) .lg{min-width:70px}.chart-caption{margin-top:24px;gap:6px;font-size:10px}.mrange{font-size:10px}.kgrid{grid-template-columns:1fr;gap:16px}.kcard{border-radius:18px;padding:26px 26px 22px;min-height:365px}.kt{margin-bottom:20px}.kn2{font-size:18px}.kcard .kv2{font-size:29px}.kd{font-size:15px}.metric-value-row{margin-bottom:23px}.metric-chart{height:215px}.knote{font-size:11px}.profit-structure{border-radius:18px;padding:25px 22px 15px}.profit-structure .sh{align-items:flex-start;flex-direction:column;gap:12px;margin-bottom:10px}.sh h2{font-size:18px}.profit-structure .sh a{font-size:12px}.profit-structure .pbox{padding-bottom:12px}.prow{padding:22px 0}.channel-card{border-radius:18px;padding:26px 22px}.channel-card .sh{gap:12px;align-items:flex-start;flex-wrap:wrap}.channel-visual{grid-template-columns:1fr 105px;gap:18px;min-height:190px;margin-bottom:18px}.channel-key{flex-direction:column;gap:15px}.channel-visual svg{max-height:182px}.channel-key li{grid-template-columns:7px 1fr;gap:5px}.channel-key b{grid-column:2}th,td{padding:12px 7px;font-size:11px}footer{font-size:10px;line-height:1.7}.wrap{padding-bottom:32px}}
.pterm{border-bottom:0}
.donut .ring-track{stroke:#1b2738}
.donut .ring-segment{transition:opacity .16s ease-out;outline:none}
.donut .ring-segment:focus-visible{stroke:#f3f5f8;stroke-width:1;stroke-linejoin:round}
.donut .dn1{font-size:21px;font-weight:620;letter-spacing:-.65px;font-variant-numeric:tabular-nums}
.donut .dn2{font-size:7.5px;font-weight:450;fill:#b4bfd0}
.donut .dn3{font-size:6.5px;font-weight:500;fill:#91a3bd;letter-spacing:0}
.donut text{pointer-events:none}
article.kcard,article.kcard:hover{cursor:default;background:var(--panel)}
/* Mobile reading and touch layout; desktop composition remains unchanged. */
@media(max-width:720px){
  .top{padding:20px 0;gap:8px}
  .workspace-heading{margin-bottom:4px}
  .help-link{min-height:44px;display:inline-flex;align-items:center}
  .pill{font-size:16px;min-height:48px}
  .date-control{font-size:14px}
  .date-fields{grid-template-columns:1fr}
  .date-fields input{font-size:16px;min-height:48px;min-width:0}
  .date-popover{max-height:calc(100dvh - 32px);overflow-y:auto}
  .date-popover .seg button,.apply-date{min-height:44px;font-size:14px}
  .dmenu{min-width:0;width:100%;max-height:50dvh;overflow-y:auto}
  .dmenu li{min-height:44px}
  #m-trend{padding:20px 16px}
  .cig-head .mseg{display:flex;width:100%}
  .mseg button{flex:1;min-height:44px;font-size:13px}
  .legend .lg{min-height:44px;align-content:center;font-size:13px}
  .trend-legend{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px 8px}
  .legend:not(.trend-legend){display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
  .legend:not(.trend-legend) .lg{min-width:0}
  .legend em{font-size:12px}
  .chart-caption{font-size:12px;line-height:1.7}
  .mrange{font-size:11px}
  .kcard{padding:22px 20px;min-height:330px}
  .kcard .kv2{font-size:clamp(22px,6.8vw,29px)}
  .metric-value-row{flex-wrap:wrap;margin-bottom:16px}
  .metric-chart{height:190px}
  .knote{font-size:12px}
  .profit-structure{padding:24px 20px}
  .profit-structure .sh a{min-height:44px;font-size:13px}
  .profit-structure .pbox{overflow:visible;padding:0}
  .profit-structure .equation-hint{display:none}
  .prow{min-width:0;display:block;padding:22px 0;border-top:1px solid var(--line)}
  .plabel{width:auto;margin-bottom:14px}
  .plabel b{font-size:15px}
  .pflow{display:grid;grid-template-columns:18px minmax(0,1fr);gap:8px 4px;align-items:center}
  .pterm{grid-column:2;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 8px;min-width:0;width:100%;text-align:right}
  .pterm>b{grid-column:2;grid-row:1;border:0;padding:0;font-size:13px}
  .pterm .pn{grid-column:1;grid-row:1;text-align:left;padding:0;font-size:13px;white-space:normal}
  .pterm em{grid-column:2;grid-row:2;margin:0;font-size:12px}
  .pterm:first-child{grid-column:1/-1;padding-bottom:12px}
  .pterm:first-child>b{font-size:18px}
  .pop{grid-column:1;align-self:start;margin:0;line-height:1.4}
  .channel-card{padding:24px 16px}
  .channel-card table{min-width:380px;table-layout:auto}
  .channel-card .tw{overscroll-behavior-x:contain}
  .channel-card th,.channel-card td{font-size:12px;white-space:nowrap}
  .wrap{padding-bottom:max(32px,env(safe-area-inset-bottom))}
  .footer-links a{display:inline-flex;align-items:center;min-height:44px;font-size:12px}
}
@media(pointer:coarse) and (min-width:721px){
  .mseg button,.date-popover .seg button,.apply-date,.legend .lg{min-height:44px}
  .date-fields input{font-size:16px;min-height:44px}
}
.equation-hint{display:none;margin:0;color:var(--dim-2);font-size:11px}
@media(max-width:1500px){.equation-hint{display:block}}
@media(min-width:1121px) and (max-width:1500px){.donut svg{max-height:320px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
