/* Charts and their colours: one set for every chart on the site (Search Console, Analytics, dashboard, audit). Colours come from the --chart-* tokens in site.css,
   which have a day and a night value, so a chart never needs its own hex colours. Text in a chart is drawn at its real size (see fitChart in dashcharts.ts). */
.s-clicks, .pd-c-clicks, .pd-c-views { --c: var(--chart-1); }
.s-impressions, .pd-c-impressions, .pd-c-engagement { --c: var(--chart-3); }
.s-ctr, .pd-c-ctr, .pd-c-newusers, .pd-c-transactions { --c: var(--chart-2); }
.s-position, .pd-c-position, .pd-c-revenue { --c: var(--chart-5); }
.pd-c-sessions, .pd-c-rps { --c: var(--chart-6); }
.pd-c-users, .pd-c-aov { --c: var(--chart-4); }
.pd-c-cvr, .pd-c-keyevents { --c: var(--chart-7); }
.pd-c-duration { --c: var(--chart-8); }
.pd-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--accent)); display: inline-block; flex: none; }
/* Chart */
.pd-chartopts { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-bottom: 10px; }
.pd-more-opts > summary { cursor: pointer; font-weight: 650; color: var(--accent-strong); padding: 6px 4px; }
.pd-optgrid { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; padding: 8px 4px; }
.pd-legend2 { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .86rem; margin-bottom: 6px; }
.pd-key { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.pd-dash { width: 18px; border-top: 2px dashed var(--muted); display: inline-block; }
.pd-chartwrap, .pd-chartbox { width: 100%; min-width: 0; }
.pd-chartbox { overflow: hidden; }
.pd-chart, .pd-scatter, .pd-pareto, .pd-donut { display: block; max-width: 100%; }
.pd-fit { width: 100%; height: 340px; overflow: hidden; }
.pd-fit.short { height: 250px; }
.pd-ser .pd-line { fill: none; stroke: var(--c); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.pd-ser .pd-prev { stroke-dasharray: 5 5; opacity: .55; stroke-width: 1.8; }
.pd-ser .pd-trend { stroke-dasharray: 2 4; stroke-width: 2.2; filter: brightness(.8); }
.pd-ser .pd-area { fill: var(--c); opacity: .12; stroke: none; }
.pd-ser .pd-bar { fill: var(--c); opacity: .85; }
.pd-grid { stroke: var(--line); stroke-width: 1; }
.pd-axis { stroke: var(--muted); stroke-width: 1; opacity: .6; }
.pd-guide { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.pd-mark { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 4 4; opacity: .5; }
.pd-markhit { fill: transparent; cursor: help; }
.pd-xl { font-size: 11px; fill: var(--muted); }
.pd-dl { font-size: 10.5px; fill: var(--ink); font-weight: 700; }
.pd-tip { position: fixed; z-index: 70; background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: 10px; font-size: .85rem; max-width: 320px; box-shadow: var(--shadow-lg); pointer-events: none; display: grid; gap: 2px; }
.pd-tip[hidden] { display: none; }
.pd-ttrow { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pd-tip .pd-was { color: inherit; opacity: .7; }
.pd-pareto .pd-area { fill: var(--chart-1); opacity: .12; stroke: none; }
.pd-pareto .pd-line { fill: none; stroke: var(--chart-1); stroke-width: 2.4; }
.pd-markband { fill: var(--chart-1); opacity: .08; }
.pd-markband.n { fill: var(--chart-6); opacity: .12; }
.pd-mark.end { opacity: .3; }
.pd-arc { stroke: var(--chart-8); }
.pd-arc.pd-dev-mobile { stroke: var(--chart-3); } .pd-arc.pd-dev-desktop { stroke: var(--chart-2); } .pd-arc.pd-dev-tablet { stroke: var(--chart-6); }
.pd-dotkey.pd-dev-mobile { background: var(--chart-3); } .pd-dotkey.pd-dev-desktop { background: var(--chart-2); } .pd-dotkey.pd-dev-tablet { background: var(--chart-6); }

/* The four switch tiles above a Search Console chart: they are the summary and also show or hide a line */
.tiles.kpi-switches { grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 10px; margin-bottom: 12px; }
.tile.kpi-switch { display: grid; gap: 2px; text-align: left; font: inherit; color: var(--ink); cursor: pointer; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); transition: border-color .15s, background .15s; }
.tile.kpi-switch span { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .82rem; font-weight: 600; }
.tile.kpi-switch span::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.tile.kpi-switch b { color: var(--ink); font-size: 1.5rem; letter-spacing: -.02em; line-height: 1.2; }
.tile.kpi-switch[aria-pressed="false"] span::before { background: transparent; box-shadow: inset 0 0 0 2px var(--muted); }
.tile.kpi-switch[aria-pressed="true"] { border-color: var(--c); background: color-mix(in srgb, var(--c) 9%, var(--surface)); }
.tile.kpi-switch:hover { border-color: var(--c); }
