/* T04: shared typography and provenance for app-scoped reporting. */
.ctx-scoped-panel{display:none;color:var(--ink,#172033)}
/* Always replace legacy FunOn-only overview/history/category/competitor datasets
   with the selected app's verified store observations. No parallel panels. */
body.ctx-scoped-active #page-overview>.view-page,
body.ctx-scoped-active #page-overview>:not(.ctx-scoped-panel),
body.ctx-scoped-active #page-trends>:not(.ctx-scoped-panel),
body.ctx-scoped-active #page-history>:not(.ctx-scoped-panel),
body.ctx-scoped-active #page-competitors>:not(.ctx-scoped-panel){display:none!important}
body.ctx-scoped-active #page-overview>.ctx-scoped-panel,
body.ctx-scoped-active #page-trends>.ctx-scoped-panel,
body.ctx-scoped-active #page-history>.ctx-scoped-panel,
body.ctx-scoped-active #page-competitors>.ctx-scoped-panel{display:block!important}
.ctx-scoped-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:23px}
.ctx-scoped-head h2{font-size:24px;font-weight:830;letter-spacing:-.45px;margin:7px 0 7px;color:var(--ink,#172033);line-height:1.3}
.ctx-scoped-head p{font-size:13px;color:#526174;line-height:1.65;margin:0;max-width:700px}
.ctx-scoped-head a{border:1px solid #9cbbe4;border-radius:9px;padding:12px 15px;white-space:nowrap;font-size:12px;font-weight:800;color:#2563eb;background:#f5f9ff;min-height:44px}
.ctx-kicker{font-size:11px;color:#376ca3;font-weight:850;letter-spacing:.09em}
.ctx-kpis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px;margin-bottom:23px}
.ctx-kpis>div{min-height:130px;display:flex;flex-direction:column;gap:7px;padding:20px;background:var(--paper,#fff);border:1px solid #cbd5e1;border-radius:12px}
.ctx-kpis strong{font-size:28px;font-weight:850;line-height:1;color:var(--ink,#172033);font-variant-numeric:tabular-nums}
.ctx-kpis span{font-size:13px;font-weight:800;color:var(--ink,#172033)}
.ctx-kpis small{font-size:12px;color:#526174}
.ctx-data-panel{border:1px solid #cbd5e1;border-radius:12px;background:var(--paper,#fff);overflow:hidden;margin-bottom:23px}
.ctx-data-panel>h3{margin:0;padding:18px 20px;border-bottom:1px solid #cbd5e1;font-size:16px;font-weight:820;color:var(--ink,#172033)}
.ctx-cat-row{min-height:55px;display:grid;grid-template-columns:minmax(0,1fr) minmax(85px,.3fr) minmax(130px,.4fr);gap:14px;align-items:center;padding:13px 20px;border-bottom:1px solid #e2e8f0;font-size:13px}
.ctx-cat-row:last-child{border-bottom:0}
.ctx-cat-row>div{min-width:0;display:flex;flex-direction:column;gap:3px}
.ctx-cat-row strong{font-weight:800;overflow-wrap:anywhere;color:var(--ink,#172033)}
.ctx-cat-row small{font-size:12px;color:#526174;line-height:1.4}
.ctx-cat-row>b{color:#2b628a;font-size:17px;font-weight:850;font-variant-numeric:tabular-nums}
.ctx-cat-row>span{text-align:right;font-size:12px;color:#526174;font-variant-numeric:tabular-nums}
.ctx-empty{padding:28px 20px;color:#526174;font-size:13px;line-height:1.7}
.ctx-empty strong{color:var(--ink,#172033)}
.ctx-help{padding:11px 20px;margin:0;color:#526174;font-size:12px;line-height:1.7;background:var(--soft,#f5f7fa)}
.ctx-record-list{max-height:520px;overflow-y:auto}
.ctx-plot{min-height:320px;display:flex;align-items:center;justify-content:center;padding:17px 20px}
.ctx-plot svg{height:auto;max-width:100%;min-height:260px;width:100%}
.ctx-cat-buttons{display:flex;gap:7px;align-items:center;flex-wrap:wrap;padding:13px 18px 10px}
.ctx-cat-button{min-height:44px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;padding:9px 14px;font-size:13px;color:#526174;font-weight:800}
.ctx-cat-button.active{background:#e9f2ff;border-color:#96b9ee;color:#2563eb}
.ctx-table-wrap{width:100%;overflow-x:auto}
.ctx-table-wrap table{width:100%;border-collapse:collapse;min-width:650px;text-align:left}
.ctx-table-wrap th,.ctx-table-wrap td{padding:15px 17px;border-bottom:1px solid #e2e8f0;font-size:13px;vertical-align:middle}
.ctx-table-wrap th{font-weight:830;color:#526174;background:var(--soft,#f8fafc)}
.ctx-table-wrap td strong{font-size:13px;color:var(--ink,#172033)}
.ctx-table-wrap td small{display:block;color:#526174;margin-top:4px;font-size:12px}
.ctx-table-wrap td b{font-variant-numeric:tabular-nums;white-space:nowrap;color:var(--ink,#172033)}
.ctx-table-wrap td a{color:#2563eb;font-size:12px;font-weight:800}
body[data-page="overview"] .page-heading,body[data-page="trends"] .page-heading,
body[data-page="history"] .page-heading,body[data-page="competitors"] .page-heading{display:none}
body[data-page="overview"] .scope-bar,body[data-page="trends"] .scope-bar,
body[data-page="history"] .scope-bar,body[data-page="competitors"] .scope-bar{display:none}
body.ctx-keywords-nonprimary #keywords>.kw-topline,
body.ctx-keywords-nonprimary #keywords>.kw-tools,
body.ctx-keywords-nonprimary #keywords>.kw-summary,
body.ctx-keywords-nonprimary #keywords>.kw-layout,
body.ctx-keywords-nonprimary #keywords>.kw-disclaimer{display:none!important}
.ctx-keywords-notice{display:none;border:1px solid #cbd5e1;border-radius:11px;background:var(--soft,#f8fafc);padding:17px;margin:0 0 18px;color:#526174;font-size:13px;line-height:1.65}
body.ctx-keywords-nonprimary .ctx-keywords-notice{display:block}
@media(max-width:850px){.ctx-scoped-head h2{font-size:20px}.ctx-data-panel>h3{padding:13px}.ctx-cat-row{padding:12px;grid-template-columns:minmax(0,1fr) auto}.ctx-cat-row>span{grid-column:1/-1;text-align:left}.ctx-kpis>div{padding:14px}.ctx-plot{padding:10px;min-height:260px}}
@media(max-width:650px){.ctx-scoped-head{flex-direction:column;align-items:flex-start;gap:12px}.ctx-scoped-head a{width:100%;text-align:center}.ctx-kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.ctx-kpis strong{font-size:24px}.ctx-kpis>div{min-height:120px}.ctx-cat-row{gap:5px}.ctx-table-wrap th,.ctx-table-wrap td{padding:12px;font-size:12px}}

/* Legacy right-hand widgets display FunOn regardless of the selected app.
   Hide until they are reimplemented on app-scoped observations. */
body .page-layout{grid-template-columns:minmax(0,1fr)!important}
body .page-layout>.right-rail{display:none!important}
body.ctx-scoped-active .main-col{min-width:0}
.sidebar-bottom .app-meta b,.sidebar-bottom .app-meta small{max-width:155px;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:850px){body .main-col{min-width:0}}
