/* Performance Dashboard. Every class starts with pd- so it cannot clash with the other tools. */
.pd-app { padding-bottom: 48px; }
.pd-intro { padding-top: 8px; }
.pd-conn { display: flex; flex-wrap: wrap; gap: 12px; margin: 14px 0; }
.pd-chipc { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); min-width: 0; flex: 1 1 280px; max-width: 460px; }
.pd-chipc-dot { width: 10px; height: 10px; border-radius: 50%; background: #94a3b8; flex: none; }
.pd-chipc.on .pd-chipc-dot { background: var(--cov-fg); box-shadow: 0 0 0 4px color-mix(in srgb, var(--cov-fg) 22%, transparent); }
.pd-chipc-text { display: grid; line-height: 1.25; flex: 1; min-width: 0; }
.pd-chipc-text span { font-size: .84rem; color: var(--muted); }

/* Toolbar */
.pd-bar { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; margin: 6px 0 18px; display: grid; gap: 12px; box-shadow: var(--shadow); }
.pd-bar-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; min-width: 0; }
.pd-bar-row[hidden] { display: none; }
.pd-f-site { flex: 2 1 260px; min-width: 0; }
.pd-f-period { flex: 2 1 300px; min-width: 0; }
.pd-f-type { flex: 0 1 130px; }
.pd-bar .field select, .pd-bar .field input { max-width: 100%; }
.pd-filterrow { align-items: center; border-top: 1px dashed var(--line); padding-top: 12px; }
.pd-filterlabel { font-weight: 700; color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; }
.pd-filterrow select, .pd-filterrow input { padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; max-width: 100%; }
.pd-fval { display: inline-flex; min-width: 0; flex: 1 1 200px; max-width: 320px; }
.pd-fval input, .pd-fval select { width: 100%; }
.pd-chips { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
.pd-chips:empty { display: none; }
.pd-fchip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-strong); font-size: .88rem; font-weight: 600; max-width: 100%; overflow-wrap: anywhere; }
.pd-fchip button { border: 0; background: transparent; color: inherit; cursor: pointer; font-size: 1.1rem; line-height: 1; width: 24px; height: 24px; border-radius: 50%; }
.pd-fchip button:hover { background: color-mix(in srgb, var(--accent) 18%, transparent); }

/* Shell: menu on the left, one focused view on the right */
.pd-shell { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 22px; align-items: start; }
.pd-shell[hidden] { display: none; }
.pd-nav { position: sticky; top: 82px; display: grid; gap: 14px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; max-height: calc(100vh - 100px); overflow-y: auto; }
.pd-navgroup { display: grid; gap: 2px; }
.pd-navhead { margin: 0 0 4px 8px; font-size: .7rem; text-transform: uppercase; letter-spacing: .09em; font-weight: 800; color: var(--muted); }
.pd-navitem { text-align: left; border: 0; background: transparent; padding: 8px 10px; border-radius: 10px; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; }
.pd-navitem:hover { background: var(--accent-soft); }
.pd-navitem[aria-current="page"] { background: var(--accent); color: var(--accent-ink); }
.pd-navitem.dim { color: var(--muted); font-weight: 500; }
.pd-view { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-content: start; }
.pd-view > * { min-width: 0; }
.pd-pagehead { display: flex; flex-wrap: wrap; gap: 10px 20px; justify-content: space-between; align-items: flex-start; }
.pd-pagehead h2 { font-size: 1.5rem; margin-bottom: 4px; }
.pd-pagehead .muted { max-width: 70ch; }
.pd-urlh { font-family: var(--mono); font-size: 1.15rem; overflow-wrap: anywhere; }

/* Cards */
.pd-card2 { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; min-width: 0; box-shadow: var(--shadow); }
.pd-card-title { font-size: 1.05rem; margin: 0 0 10px; letter-spacing: -.01em; }
.pd-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.pd-two.wide-left { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
.pd-three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.pd-card3 { border: 1px solid var(--line); --bar: var(--accent); border-radius: 14px; padding: 12px 16px; background: var(--surface); min-width: 0; }
.pd-card3.good { --bar: var(--cov-fg); } .pd-card3.bad { --bar: var(--can-fg); }
.pd-card3 h3 { font-size: 1rem; margin-bottom: 6px; }
.pd-card3 ul { margin: 0; padding-left: 18px; }
.pd-card3 li { margin-bottom: 8px; overflow-wrap: anywhere; }
.pd-hint { color: var(--muted); font-size: .86rem; margin: 6px 0 0; }
.pd-note { background: color-mix(in srgb, var(--accent) 8%, var(--surface)); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 0; font-size: .92rem; }
.pd-empty { border: 1px dashed var(--line); border-radius: 14px; padding: 28px 18px; text-align: center; color: var(--muted); background: var(--surface); }
.pd-loading { display: flex; gap: 12px; align-items: center; padding: 28px 18px; color: var(--muted); }
.pd-spin { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: pd-rot .8s linear infinite; flex: none; }
@keyframes pd-rot { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .pd-spin { animation: none; } }

/* Headline */
.pd-headline { border: 1px solid var(--line); --bar: var(--muted); border-radius: 16px; padding: 16px 20px; background: var(--surface); }
.pd-headline.good { --bar: var(--cov-fg); background: color-mix(in srgb, var(--cov-fg) 6%, var(--surface)); }
.pd-headline.bad { --bar: var(--can-fg); background: color-mix(in srgb, var(--can-fg) 6%, var(--surface)); }
.pd-headline-title { font-size: 1.35rem; margin-bottom: 6px; }
.pd-headline ul { margin: 6px 0 12px; padding-left: 20px; }
.pd-headline li { margin-bottom: 4px; overflow-wrap: anywhere; }

/* KPI tiles */
.pd-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); gap: 12px; }
.pd-kpi { --c: var(--accent); text-align: left; border: 1px solid var(--line); --bar: var(--c); border-radius: 14px; padding: 12px 14px; background: var(--surface); font: inherit; color: var(--ink); cursor: pointer; display: grid; gap: 2px; align-content: start; min-width: 0; }
.pd-kpi[aria-pressed="true"] { background: color-mix(in srgb, var(--c) 9%, var(--surface)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 40%, transparent); }
.pd-kpi:not([aria-pressed="true"]) { opacity: .78; }
.pd-kpi.static { cursor: default; opacity: 1; --bar: var(--accent); }
.pd-kpi-cta { border-style: dashed; --c: var(--chart-8); opacity: 1; }
.pd-kpi-l { font-size: .82rem; color: var(--muted); display: flex; gap: 6px; align-items: center; font-weight: 600; }
.pd-kpi-v { font-size: 1.6rem; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pd-kpi-v.small { font-size: 1rem; }
.pd-chg { font-size: .82rem; font-weight: 700; }
.pd-chg.up, .pd-up { color: var(--cov-fg); font-weight: 650; }
.pd-chg.down, .pd-down { color: var(--can-fg); font-weight: 650; }
.pd-was { color: var(--muted); font-size: .84rem; }


/* Events */
.pd-events { display: grid; gap: 8px; }
.pd-event { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); font-size: .92rem; }
.pd-pill { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: .74rem; font-weight: 700; background: var(--unk-bg); color: var(--unk-fg); vertical-align: middle; }
.pd-pill.g { background: var(--cov-bg); color: var(--cov-fg); } .pd-pill.b { background: var(--can-bg); color: var(--can-fg); }
.pd-pill.new { background: var(--cov-bg); color: var(--cov-fg); } .pd-pill.gone { background: var(--can-bg); color: var(--can-fg); }
.pd-noteform { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 10px; }
.pd-notelist { padding-left: 18px; }

/* Movers and insight lists */
.pd-movers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 10px; }
.pd-mover h4 { margin: 0 0 6px; font-size: .95rem; }
.pd-mover ol, .pd-insight ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.pd-mover li { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.pd-mover li .pd-link-btn { overflow-wrap: anywhere; text-align: left; }
.pd-insights { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 16px; }
.pd-insight { background: var(--surface); border: 1px solid var(--line); --bar: var(--accent); border-radius: 14px; padding: 14px 16px; display: grid; gap: 6px; align-content: start; min-width: 0; }
.pd-insight.up { --bar: var(--cov-fg); } .pd-insight.down { --bar: var(--can-fg); } .pd-insight.info { --bar: var(--gap-fg); }
.pd-insight header { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.pd-insight h3 { font-size: 1rem; }
.pd-count { font-weight: 800; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.pd-insight li { display: grid; gap: 0; padding: 6px 0; border-top: 1px solid var(--line); min-width: 0; overflow-wrap: anywhere; }
.pd-insight li:first-child { border-top: 0; }
.pd-plainlist { padding-left: 18px; margin: 0; display: grid; gap: 8px; }
.pd-sub { margin: 12px 0 6px; font-size: .92rem; }
.pd-cardlist-detail:empty { display: none; }

/* Controls, segmented buttons */
.pd-controls { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: flex-end; margin: 4px 0; }
.pd-controls .grow { flex: 1 1 240px; min-width: 0; }
.pd-controls .field input[type="search"], .pd-controls .field input[type="number"] { max-width: 100%; }
.pd-segs { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); max-width: 100%; }
.pd-seg { border: 0; background: transparent; padding: 7px 14px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; border-right: 1px solid var(--line); }
.pd-seg:last-child { border-right: 0; }
.pd-seg:hover { background: var(--accent-soft); color: var(--ink); }
.pd-seg[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.pd-check { display: inline-flex; gap: 6px; align-items: center; font-size: .92rem; }
.pd-export, .pd-copy { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* Tables */
.pd-tablebox { min-width: 0; display: grid; gap: 8px; }
.pd-scroll { max-width: 100%; overflow: auto; }
.pd-scroll .mini { width: 100%; }
.pd-scroll .mini td, .pd-scroll .mini th { white-space: nowrap; }
.pd-scroll .mini td.first { white-space: normal; min-width: 200px; max-width: 460px; overflow-wrap: anywhere; }
.pd-scroll .mini td.wide { white-space: normal; min-width: 220px; max-width: 360px; }
.pd-link-btn { all: unset; cursor: pointer; color: var(--accent-strong); text-decoration: underline; overflow-wrap: anywhere; }
.pd-link-btn:focus-visible, .pd-caret:focus-visible, .pd-th:focus-visible, .pd-navitem:focus-visible, .pd-seg:focus-visible, .pd-kpi:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pd-th { all: unset; cursor: pointer; font-weight: 700; }
.pd-caret { all: unset; cursor: pointer; display: inline-block; width: 20px; color: var(--accent-strong); font-weight: 800; }
.pd-caret.off { color: var(--muted); cursor: default; }
.pd-indent { display: inline-block; }
.pd-pagerow td { color: var(--muted); font-size: .9em; }
.pd-total td { font-weight: 800; background: var(--surface-2); }
.pd-foldertbl { width: 100%; }
.pd-foldertbl td.num, .pd-foldertbl th.num { text-align: right; white-space: nowrap; }
.pd-pick { color: inherit; text-decoration: none; font-weight: 650; }
.pd-pick:hover { color: var(--accent-strong); text-decoration: underline; }
.pd-accordion { display: grid; gap: 8px; }
.pd-acc { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; background: var(--surface-2); }
.pd-acc > summary { cursor: pointer; }
.pd-acc table { margin-top: 8px; }

/* Deeper analysis views */
.pd-deephost, .pd-deepbody { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; min-width: 0; }
.pd-deepbody > * , .pd-deephost > * { min-width: 0; }
.pd-built { font-size: .86rem; }
.pd-dist { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 16px; }
.pd-distcard { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: var(--surface); min-width: 0; }
.pd-distcard .h3 { text-align: center; }
.pd-bars { width: 100%; height: auto; max-height: 280px; display: block; }
.pd-barfill { fill: var(--accent); }
.pd-click { cursor: pointer; }
.pd-barfill:hover { fill: var(--accent-strong); }
.pd-detail { border: 1px solid var(--accent); border-radius: 14px; padding: 12px 16px; background: var(--surface); }
.pd-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; font-size: .9rem; }
.pd-dotkey { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }
.pd-quick { fill: var(--cov-fg); background: var(--cov-fg); } .pd-striking { fill: var(--gap-fg); background: var(--gap-fg); } .pd-other { fill: #94a3b8; background: #94a3b8; }
.pd-dot-pt { opacity: .7; stroke: var(--surface); stroke-width: .8; }
.pd-dot-pt:hover { opacity: 1; stroke: var(--ink); }
.pd-medline { stroke: var(--cov-fg); stroke-width: 1.4; stroke-dasharray: 6 5; }
.pd-treemap { position: relative; width: 100%; min-height: 200px; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.pd-tile-box { position: absolute; box-sizing: border-box; border: 1px solid var(--surface); padding: 6px 8px; color: #fff; overflow: hidden; display: grid; align-content: start; cursor: pointer; font-size: .85rem; }
.pd-tile-box b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-tile-box span { font-size: .74rem; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-tile-box.tiny span { display: none; }
.pd-tile-box.tiny { padding: 2px 4px; font-size: .7rem; }
.pd-tile-box:hover { filter: brightness(1.12); }
.pd-hue0 { background: var(--chart-6); } .pd-hue1 { background: var(--chart-1); } .pd-hue2 { background: var(--chart-4); } .pd-hue3 { background: var(--chart-3); } .pd-hue4 { background: var(--chart-5); }
.pd-treebox { overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); max-height: 640px; }
.pd-tree { display: block; }
.pd-link { fill: none; stroke: var(--line); stroke-width: 1.6; }
.pd-nodec { stroke: var(--chart-1); stroke-width: 2; fill: var(--surface); cursor: pointer; }
.pd-nodec.closed { fill: var(--chart-1); }
.pd-nodec.leaf { cursor: default; stroke: var(--muted); }
.pd-nl { font-size: 12.5px; fill: var(--ink); cursor: pointer; dominant-baseline: middle; }
.pd-ns { font-size: 10.5px; fill: var(--muted); }
.pd-node.more .pd-nl { fill: var(--accent-strong); text-decoration: underline; }
.pd-donutbox { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: center; margin-bottom: 12px; }
.pd-donutkey { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.pd-donut-n { font-size: 24px; font-weight: 800; fill: var(--ink); }

@media (max-width: 1100px) {
  .pd-shell { grid-template-columns: minmax(0, 1fr); }
  .pd-nav { position: static; display: flex; gap: 12px; overflow-x: auto; max-height: none; padding: 8px; border-radius: 14px; scrollbar-width: thin; }
  .pd-navgroup { display: flex; gap: 8px; align-items: center; flex: none; padding-right: 12px; border-right: 1px solid var(--line); }
  .pd-navgroup:last-child { border-right: 0; }
  .pd-navhead { display: none; }
  .pd-navitem { white-space: nowrap; }
  .pd-two, .pd-two.wide-left, .pd-three, .pd-movers { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .pd-bar { padding: 12px; }
  .pd-segs { width: 100%; }
  .pd-seg { flex: 1; padding: 9px 6px; }
  .pd-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pd-kpi-v { font-size: 1.3rem; }
  .pd-fval { max-width: none; }
  .pd-headline-title { font-size: 1.15rem; }
  .pd-scroll .mini td.first { min-width: 150px; }
}

/* Connection boxes with the website / property drop-downs */
.pd-f-range, .pd-f-compare { flex: 2 1 250px; min-width: 0; }
.pd-chipc { flex-wrap: wrap; }
.pd-chipsel { display: grid; gap: 2px; font-size: .78rem; color: var(--muted); margin-top: 4px; min-width: 0; }
.pd-chipsel select { max-width: 100%; min-width: 220px; font-size: .92rem; }
.pd-alert { border: 1px solid var(--line); --bar: var(--chart-8); border-radius: 14px; padding: 12px 16px; background: var(--surface); display: grid; gap: 6px; }
.pd-alert.down { --bar: var(--can-fg); background: color-mix(in srgb, var(--can-fg) 6%, var(--surface)); }
.pd-alert.up { --bar: var(--cov-fg); background: color-mix(in srgb, var(--cov-fg) 6%, var(--surface)); }
.pd-alert ul { margin: 0; padding-left: 18px; }
.pd-eventtbl td.wide { min-width: 280px; }

.pd-bar-cell { display: flex; align-items: center; gap: 8px; min-width: 130px; }
.pd-bar-in { display: block; height: 8px; border-radius: 4px; background: var(--chart-1); opacity: .75; flex: none; }
.pd-tall { max-height: 640px; }
.pd-wd { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; align-items: end; height: 150px; }
.pd-wd-col { display: grid; grid-template-rows: auto 1fr auto; justify-items: center; gap: 4px; height: 100%; font-size: .8rem; }
.pd-wd-bar { display: block; width: 70%; align-self: end; background: var(--accent); border-radius: 6px 6px 0 0; min-height: 3px; opacity: .85; }
.pd-wd-col span { color: var(--muted); }

/* Spreadsheet-style scorecard */
.pd-sh-bar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: flex-end; justify-content: space-between; margin-bottom: 10px; }
.pd-sheet { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; font-variant-numeric: tabular-nums; font-size: .92rem; }
.pd-sheet th, .pd-sheet td { padding: 8px 12px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); text-align: right; white-space: nowrap; background: var(--surface); }
.pd-sheet thead th { background: #475569; color: #fff; font-weight: 700; position: sticky; top: 0; z-index: 2; }
.pd-sheet thead th.estimate { background: #b45309; }
.pd-sheet thead th.partial { background: #64748b; }
.pd-sheet .pd-sh-first { text-align: left; position: sticky; left: 0; z-index: 1; min-width: 190px; font-weight: 700; color: #fff; }
.pd-sheet thead .pd-sh-first { z-index: 3; background: #2f5d50; }
.pd-sheet .k-search .pd-sh-first { background: #3b6fd4; } .pd-sheet .k-impr .pd-sh-first { background: #6a4fb3; } .pd-sheet .k-ga .pd-sh-first { background: #f2b98b; color: #1f2937; } .pd-sheet .k-target .pd-sh-first { background: #334155; }
.pd-sheet .pd-sh-pct { font-weight: 700; min-width: 64px; }
.pd-sheet .pd-sh-pct.up { color: var(--cov-fg); } .pd-sheet .pd-sh-pct.down { color: var(--can-fg); }
.pd-sheet td.estimate { background: color-mix(in srgb, var(--gap-fg) 14%, var(--surface)); font-weight: 700; }
.pd-sheet td.beat { background: color-mix(in srgb, var(--cov-fg) 22%, var(--surface)); }
.pd-sheet td.miss { background: color-mix(in srgb, var(--can-fg) 18%, var(--surface)); }
.pd-daysheet thead th.day { background: #f4b942; color: #1f2937; }
.pd-sheet tr:hover td:not(.beat):not(.miss):not(.estimate) { background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }

.pd-markbar { fill: #475569; opacity: .8; }
.pd-markicon circle { fill: var(--surface); stroke: #94a3b8; stroke-width: 1.4; }
.pd-markicon text { font-size: 12px; font-weight: 800; fill: var(--chart-1); }
.pd-markicon:hover circle { stroke: var(--chart-1); }
.pd-mk a { cursor: pointer; }
.pd-pt { fill: var(--c); }

/* Google Analytics 4 views */
.pd-gabar { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: end; margin-bottom: 14px; }
.pd-gabar .field { min-width: 200px; }
.pd-gabar-note { flex: 1 1 100%; margin: 0; }
.pd-gafilter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.pd-gafilter input { flex: 1 1 260px; min-width: 0; }
.pd-gadetail { display: grid; gap: 14px; margin-bottom: 14px; }
.pd-galink { background: none; border: 0; padding: 0; font: inherit; font-weight: 650; color: var(--accent-strong); cursor: pointer; text-align: left; text-decoration: underline; text-underline-offset: 3px; }
.pd-gainsight { border-left: 4px solid var(--line); padding: 8px 0 8px 12px; margin: 0 0 10px; }
.pd-gainsight.good { border-left-color: var(--cov-fg); }
.pd-gainsight.bad { border-left-color: var(--can-fg); }
.pd-gainsight.note { border-left-color: var(--gap-fg); }
.pd-gainsight b { display: block; }
.pd-gainsight p { margin: 2px 0 0; }
.pd-gachg { font-size: .84rem; font-weight: 700; margin-top: 2px; }
.pd-view .tiles.minis .tile b { font-size: clamp(1.05rem, 1.5vw, 1.35rem); overflow-wrap: anywhere; }

/* Two data sources, kept apart: Search Console and Google Analytics 4 */
.pd-bar.pd-bar-off { display: none; }
.pd-bar-title { margin: 0 0 8px; font-size: .92rem; }
.pd-srctabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-bottom: 12px; }
.pd-srctab { display: grid; gap: 1px; text-align: left; padding: 9px 11px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; min-width: 0; }
.pd-srctab b { font-size: .92rem; }
.pd-srctab span { font-size: .76rem; color: var(--muted); }
.pd-srctab[aria-selected="true"] { background: var(--accent-soft); border-color: var(--accent); }
.pd-srctab[aria-selected="true"] b { color: var(--accent-strong); }
.pd-view.pd-from-gsc::before, .pd-view.pd-from-ga::before { display: inline-block; margin-bottom: 8px; padding: 3px 11px; border-radius: 999px; font-size: .76rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.pd-view.pd-from-gsc::before { content: 'Search Console'; background: var(--accent-soft); color: var(--accent-strong); }
.pd-view.pd-from-ga::before { content: 'Google Analytics 4'; background: #fdefd2; color: #92400e; }
.pd-srctabs { grid-template-columns: minmax(0, 1fr); }
.pd-view.pd-from-gsc::before, .pd-view.pd-from-ga::before { justify-self: start; }
@media (max-width: 1100px) { .pd-srctabs { grid-template-columns: repeat(2, minmax(150px, 1fr)); min-width: 320px; } }

/* Connected accounts: a tidy card per Google service (name and status on top, the website or property below, buttons on the right) */
#pd-conn { display: flex; flex-wrap: wrap; gap: 14px; align-items: stretch; }
#pd-conn .pd-chipc { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; column-gap: 10px; row-gap: 2px; align-items: start; padding: 14px 16px; flex: 1 1 380px; max-width: 560px; }
#pd-conn .pd-chipc-dot { grid-column: 1; grid-row: 1 / span 2; align-self: center; }
#pd-conn .pd-chipc-text { display: contents; }
#pd-conn .pd-chipc-text > b { grid-column: 2; grid-row: 1; font-size: 1rem; }
#pd-conn .pd-chipc-text > span { grid-column: 2; grid-row: 2; }
#pd-conn .pd-chipc.on .pd-chipc-text > span { color: var(--cov-fg); font-weight: 650; }
#pd-conn .pd-chipc .pd-chipsel { grid-column: 1 / -1; grid-row: 3; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
#pd-conn .pd-chipc .pd-chipsel > span { font-size: .8rem; font-weight: 650; color: var(--muted); }
#pd-conn .pd-chipc-actions, #pd-conn .pd-chipc > .btn { grid-column: 3; grid-row: 1 / span 2; align-self: center; flex-wrap: nowrap; }
#pd-conn .pd-chipc-actions .btn { white-space: nowrap; }
@media (max-width: 600px) {
  #pd-conn .pd-chipc-actions, #pd-conn .pd-chipc > .btn { grid-column: 1 / -1; grid-row: 4; margin-top: 10px; }
}
.pd-gacustom { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: end; flex: 1 1 100%; }
.pd-gacustom .error { flex: 1 1 100%; margin: 0; }
.bigchart .ln.ghost { fill: none; }

/* Analytics overview: the connection and settings come first; the old period and totals of the panel are replaced by the views below it */
.pd-gaslim .gaout, .pd-gaslim .ga-period, .pd-gaslim .ga-load, .pd-gaslim .gabox > h3 { display: none; }
.pd-gaslim .gabox { padding-top: 0; }
.pd-gaoverview { margin-top: 6px; }
.pd-view .tiles.minis .tile b { font-size: clamp(1rem, 1.25vw, 1.3rem); white-space: nowrap; overflow-wrap: normal; }
.pd-gaoverview > .pd-pagehead { display: none; }
.pd-gaslim .gabox .osec > p.muted:first-of-type { display: none; }

/* Horizontal bars and spike markers (Analytics views) */
.pd-hb { display: grid; gap: 8px; }
.pd-hb-title { margin: 0 0 2px; font-weight: 700; font-size: .9rem; }
.pd-hb-row { display: grid; grid-template-columns: minmax(120px, 34%) minmax(0, 1fr) minmax(70px, auto); gap: 10px; align-items: center; }
.pd-hb-name { display: grid; min-width: 0; }
.pd-hb-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; }
.pd-hb-name small { font-size: .76rem; }
.pd-hb-track { height: 12px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.pd-hb-fill { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.pd-hb-fill.up { background: var(--cov-fg); } .pd-hb-fill.down { background: var(--can-fg); }
.pd-hb-val { font-variant-numeric: tabular-nums; text-align: right; font-size: .9rem; }
.pd-hb-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 22px; }
.pd-spk-up { fill: var(--cov-fg); stroke: #fff; stroke-width: 2; } .pd-spk-down { fill: var(--can-fg); stroke: #fff; stroke-width: 2; }
@media (max-width: 600px) { .pd-hb-row { grid-template-columns: minmax(0, 1fr) minmax(70px, auto); } .pd-hb-track { grid-column: 1 / -1; order: 3; } }
.pd-readnote { margin-top: 12px; padding: 10px 14px; border-left: 4px solid var(--accent); border-radius: 0 10px 10px 0; background: var(--accent-soft); font-size: .9rem; }
.pd-readnote p { margin: 0 0 4px; } .pd-readnote p:last-child { margin: 0; }

/* Spacing in the Analytics trend card and the distribution grid */
.pd-kpis { margin-bottom: 18px; }
.pd-trendbox { display: grid; gap: 14px; }
.pd-trendbox > .pd-chartopts { margin: 4px 0 0; }
.pd-trendbox > .pd-legend2 { margin: 0; }
.pd-card2 > .pd-kpis + .pd-trendbox { margin-top: 6px; }
.pd-dist { align-items: start; margin-top: 14px; }
.pd-dl { paint-order: stroke; stroke: var(--surface); stroke-width: 3px; stroke-linejoin: round; }
.pd-dl.pd-dl-in { fill: #fff; stroke: none; }

/* Brand settings */
.pd-brandbox { margin: 12px 0; }
.brand-panel { display: grid; gap: 10px; }
.brand-sentence { margin: 0; padding: 10px 14px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.brand-sentence-label { margin: 4px 0 -4px; }
.brand-line { margin: 0 0 8px; }
.brand-preview .tbl td.num { text-align: right; font-variant-numeric: tabular-nums; }
.brand-patterns { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-family: var(--mono, monospace); font-size: .8rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.volbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; margin: 10px 0; }
.volbar-t { font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); align-self: center; }
