/* Attribution follow-up: P3 1184:25364 / table 2214:10427. Shared page spacing stays at 30 / 15 / 58 / 72. */
.app-shell[data-page=attribution] .business-pages{container-name:attribution;container-type:inline-size}
.app-shell[data-page=attribution] .bp-attribution-charts{grid-template-columns:minmax(0,957fr) minmax(0,643fr);gap:30px;align-items:stretch;margin:0 0 30px;transform:none}
.app-shell[data-page=attribution] .bp-attribution-charts>.bp-panel{height:auto;min-width:0;margin:0;padding:29px;border-radius:12px;overflow:visible}
html:not([data-theme=light]) .app-shell:not(.is-sidebar-collapsed)[data-page=attribution] .bp-attribution-mix{margin-top:0}
.app-shell[data-page=attribution] .bp-attribution-chart-head{min-height:119px;margin:0 0 20px}
.app-shell[data-page=attribution] .bp-attribution-chart-head h2{position:static;width:auto;height:auto;margin:0;font-size:20px;line-height:20px;white-space:normal}
.app-shell[data-page=attribution] .bp-attribution-chart-head p{margin:15px 0 0;font-size:16px;line-height:16px;color:var(--cy-white-55)}
.bp-matrix-legend{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:24px;row-gap:8px;margin-top:20px}
:is(.bp-matrix-legend,.bp-mix-legend)>span{display:flex;align-items:center;gap:8px;font-size:16px;line-height:16px;font-weight:400;min-width:0}
:is(.bp-matrix-legend,.bp-mix-legend) i{display:block;flex:none;width:12px;height:12px;background:var(--legend-color);border-radius:50%}
.bp-mix-legend{display:flex;justify-content:flex-end;gap:24px;margin-top:20px}
.bp-mix-legend i{border-radius:2px}
.app-shell[data-page=attribution] :is(.bp-attribution-matrix,.bp-attribution-mix) .bp-attribution-plot{width:100%;max-width:100%;height:432px;margin:0}
.app-shell[data-page=attribution] .bp-attribution-canvas{width:100%;height:432px}
.app-shell[data-page=attribution] .bp-attribution-plot svg{display:block;width:100%;height:432px}
.app-shell[data-page=attribution] .bp-attribution-plot svg text.attr-axis{font-family:Inter,'PingFang SC','Microsoft YaHei',sans-serif;font-size:14px;line-height:14px;font-weight:400}
.app-shell[data-page=attribution] .bp-attribution-plot svg text.attr-axis-title{font-size:14px;font-weight:500}
.app-shell[data-page=attribution] .bp-attribution-plot svg text.attr-point-label{font-size:14px;font-weight:400}
.app-shell[data-page=attribution] #attribution-charts{scroll-margin-top:30px}
/* P3 title → description = 15; description → table = 30; header 42; every data row 58. */
.app-shell[data-page=attribution] #attribution-table.bp-panel{padding:29px 29px 14px;min-height:572px;border-radius:12px;margin:0}
.app-shell[data-page=attribution] #attribution-table .bp-panel-head{height:20px;margin:0 0 15px}
.app-shell[data-page=attribution] #attribution-table>.bp-muted{font-size:16px;line-height:16px;margin:0 0 30px}
.app-shell[data-page=attribution] .bp-attribution-table{min-width:1280px;table-layout:fixed}
.app-shell[data-page=attribution] .bp-attribution-table th{height:46px;vertical-align:middle;padding:0 12px;background:var(--cy-white-5);font-size:14px;line-height:14px;white-space:nowrap}
.app-shell[data-page=attribution] .bp-attribution-table th button{display:block;font-size:14px;line-height:14px;white-space:nowrap}
.app-shell[data-page=attribution] .bp-attribution-table td,.app-shell[data-page=attribution] .bp-attribution-table tbody tr:first-child td{height:58px;padding:0 12px;font-size:16px;line-height:16px;vertical-align:middle}
.app-shell[data-page=attribution] .bp-attribution-table :is(th,td):last-child{text-align:right;padding-left:0;padding-right:12px}
.app-shell[data-page=attribution] .bp-attribution-table th:last-child button{margin-left:auto}
.app-shell[data-page=attribution] .bp-attribution-table td.numeric{font-weight:700;white-space:nowrap}
.app-shell[data-page=attribution] .bp-attribution-channel{display:flex;align-items:center;gap:8px}
.app-shell[data-page=attribution] .bp-attribution-channel>div{flex:none}
.app-shell[data-page=attribution] .bp-attribution-channel strong{display:block;font-size:16px;line-height:16px;font-weight:700}
.app-shell[data-page=attribution] .bp-attribution-channel small{font-size:10px;line-height:10px;margin:4px 0 0}
.app-shell[data-page=attribution] .bp-attribution-channel .bp-badge{flex:none;height:28px;padding:5px 11px;margin:0;border-radius:4px;font-size:14px;line-height:14px;font-weight:500}
.app-shell[data-page=attribution] .bp-attribution-channel .green{color:#56ffac}
.app-shell[data-page=attribution] .bp-attribution-channel .red{color:#fb6b54}
.app-shell[data-page=attribution] .bp-attribution-table .bp-aov-high{color:#42cf8a}
.app-shell[data-page=attribution] .bp-attribution-table .bp-aov-low{color:#e2614c}
html[data-theme=light] .app-shell[data-page=attribution] .bp-attribution-channel .green{color:#42cf8a}
html[data-theme=light] .app-shell[data-page=attribution] .bp-attribution-channel .red{color:#e15454}
@container attribution (max-width:900px){.app-shell[data-page=attribution] .bp-attribution-charts{grid-template-columns:minmax(0,1fr)}}
@container attribution (max-width:540px){.bp-matrix-legend{grid-template-columns:minmax(0,1fr)}.app-shell[data-page=attribution] .bp-attribution-chart-head{min-height:0}}

html[data-theme=light] .app-shell[data-source-frame="1184:24181"] .bp-attribution-charts{transform:none}
.app-shell[data-page=attribution] .bp-attribution-table th:first-child{border-radius:4px 0 0 4px}
.app-shell[data-page=attribution] .bp-attribution-table th:last-child{border-radius:0 4px 4px 0}

/* P1 KPI tags are masked by the card in Figma (1184:20705). Match that shared outer corner. */
.app-shell[data-page=attribution] .bp-attribution-kpis>.bp-kpi{overflow:hidden;isolation:isolate;border-radius:8px}
.app-shell[data-page=attribution] .bp-attribution-kpis>.bp-kpi>.bp-badge{top:-1px;left:-1px;height:28px;padding:5px 11px;border-radius:8px 4px 4px 4px;font-size:14px;line-height:14px;font-weight:500;box-shadow:none}
.app-shell[data-page=attribution] .bp-attribution-kpis>.bp-kpi>.bp-badge.blue{color:#3d5bf6;background:rgb(61 91 246 / .1);border-color:rgb(61 91 246 / .35)}
.app-shell[data-page=attribution] .bp-attribution-kpis>.bp-kpi>.bp-badge.green{color:#42cf8a;background:rgb(66 207 138 / .1);border-color:rgb(66 207 138 / .35)}
.app-shell[data-page=attribution] .bp-attribution-kpis>.bp-kpi>.bp-badge.red{color:#fb6b54;background:rgb(225 84 84 / .1);border-color:rgb(225 84 84 / .35)}
.app-shell[data-page=attribution] .bp-attribution-kpis>.bp-kpi>.bp-badge.orange{color:#ea9d4d;background:rgb(234 157 77 / .1);border-color:rgb(234 157 77 / .35)}

html:not([data-theme=light]) .app-shell[data-page=attribution] .bp-attribution-kpis>.bp-kpi>.bp-badge.green{color:#42cf8a;background:rgb(66 207 138 / .1);border-color:rgb(66 207 138 / .35)}

/* User follow-up: larger legend; 15px clear gap from y-axis title to tick text; square table header. */
.app-shell[data-page=attribution] .bp-matrix-legend{column-gap:30px;row-gap:16px;margin-top:20px}
.app-shell[data-page=attribution] .bp-matrix-legend>span{font-size:20px;line-height:20px;font-weight:400;gap:10px}
.app-shell[data-page=attribution] .bp-matrix-legend i{width:20px;height:20px}
.app-shell[data-page=attribution] .bp-attribution-chart-head{min-height:139px}
.app-shell[data-page=attribution] .bp-attribution-plot svg text.attr-axis{font-size:16px;line-height:16px}
.app-shell[data-page=attribution] .bp-attribution-plot svg text.attr-axis-title{font-size:16px;line-height:16px}
.app-shell[data-page=attribution] .bp-attribution-table th:first-child,.app-shell[data-page=attribution] .bp-attribution-table th:last-child{border-radius:0}

.app-shell[data-page=attribution] .bp-attribution-plot svg text.attr-point-label{font-size:16px;line-height:16px}

/* P2 is the baseline for the chart body. Only the four-item legend has custom layout. */
.app-shell[data-page=attribution] .bp-attribution-charts>.bp-panel{min-height:687px}
.app-shell[data-page=attribution] .bp-attribution-chart-head{min-height:173px}
.app-shell[data-page=attribution] :is(.bp-attribution-matrix,.bp-attribution-mix) .bp-attribution-plot{width:calc(100% + 30px);max-width:none}
.app-shell[data-page=attribution] .bp-attribution-plot svg text.attr-point-label{font-size:14px;line-height:14px}
.app-shell[data-page=attribution] .bp-matrix-legend{grid-template-columns:repeat(2,minmax(0,1fr));column-gap:30px;row-gap:16px}
.app-shell[data-page=attribution] .bp-matrix-legend>span{font-size:20px;line-height:20px;gap:10px}
.app-shell[data-page=attribution] .bp-matrix-legend i{width:20px;height:20px}
@container attribution (max-width:1200px){.app-shell[data-page=attribution] .bp-attribution-charts{grid-template-columns:minmax(0,1fr)}}
@container attribution (max-width:540px){.app-shell[data-page=attribution] .bp-matrix-legend{grid-template-columns:minmax(0,1fr)}.app-shell[data-page=attribution] .bp-attribution-chart-head{min-height:173px}}

/* Move only the four-item matrix legend down 10px; retain the P2 plot position. */
.app-shell[data-page=attribution] .bp-matrix-legend{margin-top:30px}

/* Anchor the legend to the bottom of the P2 header: 14px below header + 16px chart inset = 30px clear gap. */
.app-shell[data-page=attribution] .bp-attribution-matrix .bp-attribution-chart-head{display:flex;flex-direction:column;min-height:179px;margin-bottom:14px}
.app-shell[data-page=attribution] .bp-attribution-matrix .bp-matrix-legend{margin-top:auto}

/* Synced to the edited P2 1184:22558 / 1184:22602 on 2026-11-19. */
.app-shell[data-page=attribution] .bp-attribution-matrix .bp-attribution-chart-head{display:block;min-height:173px;margin-bottom:20px}
.app-shell[data-page=attribution] .bp-attribution-chart-head{position:relative}
.app-shell[data-page=attribution] .bp-attribution-matrix .bp-matrix-legend{margin:46px 0 0 59px;grid-template-columns:201px minmax(0,201px);column-gap:30px;row-gap:20px}
.app-shell[data-page=attribution] .bp-matrix-legend>span{font-size:16px;line-height:16px;font-weight:600;gap:12px;white-space:nowrap}
.app-shell[data-page=attribution] .bp-matrix-legend i{width:20px;height:20px}
.app-shell[data-page=attribution] .bp-mix-legend{position:absolute;top:133px;right:0;gap:14px;margin:0}
.app-shell[data-page=attribution] .bp-mix-legend>span{font-size:16px;line-height:16px;gap:5px}
.app-shell[data-page=attribution] .bp-mix-legend i{width:14px;height:14px}
.bp-p2-subtitle-second{display:inline-block;margin-top:14px}
@container attribution (max-width:800px){.app-shell[data-page=attribution] .bp-attribution-matrix .bp-matrix-legend{margin-left:20px;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:24px}.app-shell[data-page=attribution] .bp-matrix-legend>span{white-space:normal}}
@container attribution (max-width:540px){.app-shell[data-page=attribution] .bp-attribution-matrix .bp-matrix-legend{grid-template-columns:minmax(0,1fr);margin-left:0;margin-top:30px}.app-shell[data-page=attribution] .bp-attribution-matrix .bp-attribution-chart-head{min-height:173px}}

/* Readability adjustment requested for the matrix, retaining its plot geometry. */
.app-shell[data-page=attribution] .bp-attribution-matrix .bp-matrix-legend{grid-template-columns:260px minmax(0,260px);column-gap:40px;row-gap:16px}
.app-shell[data-page=attribution] .bp-matrix-legend>span{font-size:16px;line-height:16px;gap:12px}
.app-shell[data-page=attribution] .bp-matrix-legend i{width:24px;height:24px}
@container attribution (max-width:800px){.app-shell[data-page=attribution] .bp-attribution-matrix .bp-matrix-legend{grid-template-columns:repeat(2,minmax(0,1fr));column-gap:24px;margin-left:20px}.app-shell[data-page=attribution] .bp-matrix-legend>span{white-space:normal}}
@container attribution (max-width:540px){.app-shell[data-page=attribution] .bp-attribution-matrix .bp-matrix-legend{grid-template-columns:minmax(0,1fr);margin-left:0}}

/* Align first-purchase AOV with the preceding leading-aligned numeric columns. */
.app-shell[data-page=attribution] .bp-attribution-table :is(th,td):last-child{text-align:left;padding-left:12px;padding-right:12px}
.app-shell[data-page=attribution] .bp-attribution-table th:last-child button{margin-left:0;text-align:left}

/* Channel names are uniformly14px in every bubble state. */
html body .app-shell[data-page="attribution"] #workspace #business-pages [data-attribution-plot="bubble"] svg text.attr-point-label{font-family:Inter,sans-serif!important;font-size:14px!important;line-height:14px!important;font-weight:400!important;letter-spacing:0px!important}

/* Two attribution notices share one readable hierarchy and aligned columns. */
html body .app-shell[data-page="attribution"] #workspace #workspace-panel #business-pages>.bp-attribution-notice{--attribution-notice-label-width:72px;display:grid!important;grid-template-columns:var(--attribution-notice-label-width) 1px minmax(0,1fr)!important;column-gap:30px!important;row-gap:0!important;align-items:start!important;box-sizing:border-box;height:auto!important;min-height:0!important;max-height:none!important;margin:0 0 30px!important;padding:20px 30px!important}
html body .app-shell[data-page="attribution"] #workspace #workspace-panel #business-pages>.bp-attribution-notice::before{content:"";display:block;grid-column:2;grid-row:1;position:static;align-self:stretch;justify-self:center;width:1px;height:auto;min-height:0;padding:0!important;margin:0;background:var(--cy-white-10);transform:none;outline:0!important;border:0!important}
html body .app-shell[data-page="attribution"] #workspace #workspace-panel #business-pages>.bp-attribution-notice>.bp-attribution-notice-label{grid-column:1;grid-row:1;display:flex!important;flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:4px!important;width:100%!important;min-width:0!important;max-width:100%!important;height:auto!important;margin:0!important;padding:0!important;border:0!important;text-align:left!important;font-family:'PingFang SC',sans-serif!important;font-size:14px!important;line-height:14px!important;font-weight:500!important;color:var(--cy-orange,#EA9D4D)!important;letter-spacing:0px!important}
html body .app-shell[data-page="attribution"] #workspace #workspace-panel #business-pages>.bp-attribution-notice .bp-attribution-notice-title{display:block;width:max-content!important;max-width:100%!important;margin:0!important;font-family:'PingFang SC',sans-serif!important;font-size:14px!important;line-height:14px!important;font-weight:500!important;letter-spacing:0px!important}
html body .app-shell[data-page="attribution"] #workspace #workspace-panel #business-pages>.bp-attribution-notice .bp-attribution-notice-subtitle{display:block;width:max-content!important;min-width:0!important;max-width:100%!important;margin:0!important;padding:0!important;text-align:left!important;font-family:'PingFang SC',sans-serif!important;font-size:12px!important;line-height:12px!important;font-weight:400!important;color:var(--cy-white-55)!important;letter-spacing:0px!important}
html body .app-shell[data-page="attribution"] #workspace #workspace-panel #business-pages>.bp-attribution-notice>.bp-attribution-notice-copy{grid-column:3;grid-row:1;position:relative;display:flex;flex-direction:column;gap:8px;min-width:0;width:100%;padding:0!important;border:0!important;font-family:'PingFang SC',sans-serif!important;font-size:14px!important;line-height:14px!important;font-weight:400!important;color:var(--cy-white-75)!important}
html body .app-shell[data-page="attribution"] #workspace #workspace-panel #business-pages>.bp-attribution-notice>.bp-attribution-notice-copy::before{content:none!important;display:none!important}
html body .app-shell[data-page="attribution"] #workspace #workspace-panel #business-pages>.bp-attribution-notice>.bp-attribution-notice-copy>p{margin:0!important;padding:0!important;min-width:0;max-width:100%;font-family:'PingFang SC',sans-serif!important;font-size:14px!important;line-height:14px!important;font-weight:400!important;letter-spacing:0px!important;white-space:normal!important;overflow-wrap:break-word!important;text-overflow:clip!important;overflow:visible!important}
html body .app-shell[data-page="attribution"] #workspace #workspace-panel #business-pages>.bp-attribution-notice>.bp-attribution-notice-copy>p :is(em,span,b,strong){font-family:inherit!important;font-size:inherit!important;line-height:inherit!important;letter-spacing:0px!important}
html[lang="en"] body .app-shell[data-page="attribution"] #workspace #workspace-panel #business-pages>.bp-attribution-notice{--attribution-notice-label-width:128px}
html[lang="en"] body .app-shell[data-page="attribution"] #workspace #workspace-panel #business-pages>.bp-attribution-notice :is(.bp-attribution-notice-label,.bp-attribution-notice-title,.bp-attribution-notice-subtitle,.bp-attribution-notice-copy,.bp-attribution-notice-copy>p){font-family:Inter,sans-serif!important}

/* Reference layout: centered orange label, large title above a smaller subtitle. */
html body .app-shell[data-page="attribution"] #workspace #workspace-panel #business-pages>.bp-attribution-notice{--attribution-notice-label-width:112px;align-items:center!important}
html body .app-shell[data-page="attribution"] #workspace #workspace-panel #business-pages>.bp-attribution-notice>.bp-attribution-notice-label{align-items:center!important;text-align:center!important;gap:4px!important}
html body .app-shell[data-page="attribution"] #workspace #workspace-panel #business-pages>.bp-attribution-notice .bp-attribution-notice-title{font-size:20px!important;line-height:20px!important;text-align:center!important;color:var(--cy-orange,#EA9D4D)!important}
html body .app-shell[data-page="attribution"] #workspace #workspace-panel #business-pages>.bp-attribution-notice .bp-attribution-notice-subtitle{font-size:12px!important;line-height:12px!important;text-align:center!important;color:var(--cy-orange,#EA9D4D)!important}
