/* 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):not(#eventCentre),
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}}


/* Overview: one reading flow, with separators instead of nested dashboard cards. */
.ov-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin:0 0 22px}
.ov-head h2{margin:0 0 7px;font-size:25px;letter-spacing:-.5px;color:var(--ink,#172033)}
.ov-head p,.ov-muted{margin:0;color:var(--secondary,#64748b);font-size:12px}
.ov-pair{display:flex;align-items:center;justify-content:flex-end;gap:9px;flex-wrap:wrap;max-width:65%;font-size:12px}
.ov-pair .app-identity{max-width:300px}
.ov-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,260px));gap:20px;padding:12px 0 14px;border-top:1px solid var(--line,#dce3ee);border-bottom:1px solid var(--line,#dce3ee)}
.ov-metrics>div{display:flex;flex-direction:column;gap:4px;min-width:0}
.ov-metrics>div>span{font-size:12px;font-weight:700;color:var(--secondary,#64748b)}
.ov-metrics strong{font-size:24px;line-height:1.25;font-variant-numeric:tabular-nums;color:var(--ink,#172033)}
.ov-metrics strong small{font-size:14px;font-weight:500;color:var(--secondary,#64748b)}
.ov-metrics>div>small{font-size:11px;line-height:1.65;color:var(--secondary,#64748b)}
.ov-change{font-variant-numeric:tabular-nums;font-weight:750;white-space:nowrap}
.ov-metrics .up,.ov-change.up{color:#16805d}.ov-metrics .down,.ov-change.down{color:#bf4150}
.ov-section{padding:22px 0 3px;border-bottom:1px solid var(--line,#dce3ee)}
.ov-section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 12px}
.ov-section-head h3{margin:0;font-size:16px;color:var(--ink,#172033)}
.ov-section-head a,.ov-foot a{font-size:12px;color:var(--blue-strong,#405cca);font-weight:700;text-decoration:none}
.ov-section-head a{min-height:40px;display:inline-flex;align-items:center}
.ov-table-wrap{max-width:100%;overflow:auto}
.ov-table{width:100%;border-collapse:collapse;table-layout:fixed;text-align:left;font-size:12px;font-variant-numeric:tabular-nums}
.ov-table thead th{color:var(--secondary,#64748b);font-weight:650;font-size:11px;padding:8px 10px 12px}
.ov-table thead th:first-child,.ov-table tbody th{width:31%;padding-left:0}
.ov-table th,.ov-table td{border-bottom:1px solid var(--line,#e4eaf2);padding:12px 10px;vertical-align:middle;overflow-wrap:anywhere}
.ov-table tr:last-child>*{border-bottom:0}
.ov-table tbody th{font-weight:650;color:var(--ink,#172033)}
.ov-table th>small{display:block;margin-top:4px;color:var(--secondary,#64748b);font-size:10px;font-weight:400}
.ov-table .ov-position{color:#405cca;font-weight:800;font-size:15px}
.ov-table .ov-peer{color:#a45e21}
.ov-table .ov-time{font-size:10px;color:var(--secondary,#64748b)}
.ov-table button{font:inherit;color:inherit;padding:6px 0;background:none;border:0;cursor:pointer;text-align:left;text-decoration:underline;text-underline-offset:4px;min-height:36px}
.ov-note,.ov-empty,.ov-foot{font-size:12px;line-height:1.75;color:var(--secondary,#64748b)}
.ov-note{margin:0 0 10px}.ov-empty{margin:12px 0 20px}.ov-foot{margin:16px 0 0;font-size:11px;max-width:950px}
.ov-attention{font-size:12px;line-height:1.7;margin:14px 0 0;color:#96631f}
.ov-section a:focus-visible,.ov-table button:focus-visible{outline:3px solid #99acf4;outline-offset:3px}
body.dark .ov-position{color:#a9b9ff}body.dark .ov-table .ov-peer{color:#edbb82}body.dark .ov-attention{color:#edc78c}
@media(max-width:650px){
 .ov-head{display:block;margin-bottom:17px}.ov-head h2{font-size:22px}.ov-pair{max-width:none;justify-content:flex-start;margin-top:14px;gap:8px;font-size:11px}
 .ov-metrics{gap:16px 12px;grid-template-columns:repeat(2,minmax(0,1fr));padding:16px 0}.ov-metrics>div:nth-child(3){grid-column:1/-1}.ov-metrics strong{font-size:22px}.ov-metrics>div>small{font-size:10px}
 .ov-section{padding-top:17px}.ov-section-head h3{font-size:15px}.ov-section-head a{font-size:11px}
 .ov-table thead th:first-child,.ov-table tbody th{width:35%}.ov-table .ov-time{display:none}.ov-table th,.ov-table td{padding:10px 6px;font-size:11px}.ov-table thead th{font-size:10px}.ov-table .ov-position{font-size:14px}.ov-table .app-identity-name{display:none}.ov-table .app-identity-icon{width:22px;height:22px;min-width:22px}
 .ov-note,.ov-empty{font-size:11px}.ov-foot{font-size:10px}
}

body[data-page=overview] #contextBar{position:relative;top:auto}
.ov-metrics.ov-two{grid-template-columns:repeat(2,minmax(0,1fr))}
@media(max-width:650px){.ov-metrics.ov-two>div:last-child{grid-column:auto}}
.history-browser{margin:24px 0;padding:24px 0;border-top:1px solid var(--line,#dfe5ed);font-size:14px}.history-browser p{color:var(--muted,#526174);line-height:1.6;max-width:900px}.ha-controls{display:flex;flex-wrap:wrap;gap:12px;align-items:end}.ha-controls label{display:grid;gap:6px;min-width:160px}.ha-controls select,.ha-controls button{min-height:44px;border:1px solid #cad4df;border-radius:8px;background:var(--paper,#fff);color:inherit;padding:8px 12px;font:inherit}.ha-controls button{cursor:pointer}.ha-controls button:disabled{opacity:.5;cursor:default}.ha-table{max-width:100%;overflow:auto;margin-top:16px}.ha-table table{border-collapse:collapse;min-width:600px;width:100%}.ha-table th,.ha-table td{text-align:left;padding:10px;border-bottom:1px solid var(--line,#dfe5ed);font-size:12px;max-width:280px;overflow-wrap:anywhere}@media(max-width:600px){.ha-controls label,.ha-controls button{flex:1 1 180px;max-width:100%}}

.history-browser .ha-table{max-height:520px;overscroll-behavior:contain}.history-browser .ha-table thead{position:sticky;top:0;background:var(--paper,#fff);z-index:1}

/* Absent results are neutral; app colors identify measured positions. */
body .rank-not-found,body.dark .rank-not-found{color:var(--muted,#64748b)!important;font-size:12px;font-weight:600}

.ov-rating .app-identity{max-width:100%;font-size:11px;min-width:0}
.ov-rating .app-identity-icon{width:22px;height:22px;min-width:22px}
.ov-rating .app-identity-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
