/* Only layout for additional live controls. Type, ink, cards and buttons are inherited. */
.pd-search-chart .depth-controls.search-controls{flex-wrap:wrap;gap:12px}
.pd-search-chart .depth-controls .search-group-tabs{display:flex;flex-wrap:wrap;border-radius:24px;width:auto}
.pd-search-chart .search-controls [data-search-group-style]{appearance:none;background:none;border:0;color:#5d5866;font:500 13.5px 'Instrument Sans',system-ui,sans-serif;padding:8px 18px;border-radius:999px;cursor:pointer;white-space:nowrap;min-height:0;box-shadow:none}
.pd-search-chart .search-controls [data-search-group-style]:hover{background:#F2EFF4;color:#18191e}
.pd-search-chart .search-controls [data-search-group-style][aria-pressed=true]{background:#191721;color:#FCFBFA;font-weight:600}
.pd-detail-actions.depth-leaf-actions .pd-build-dots{border:0;background:none;border-radius:0;box-shadow:none;padding:0 8px}
.depth-leaf-actions .depth-build-mark{width:20px;height:20px;fill:currentColor}
.depth-leaf-actions .pd-build-label{gap:8px}
.depth-leaf-actions .pd-build-actions{flex-wrap:wrap}
@media(max-width:767px){.pd-search-chart .depth-controls.search-controls{gap:8px}.pd-search-chart .search-controls [data-search-group-style]{padding:8px 10px}.depth-leaf-actions{flex-wrap:wrap}}
/* Compact leaf actions use the live buttons in one row, including on phones. */
html body .prototype-family .depth-leaf-actions{display:flex;width:auto;flex-wrap:wrap}
html body .prototype-family .depth-leaf-actions .pd-save form,html body .prototype-family .depth-leaf-actions .pd-save-btn{width:auto}
html body .prototype-family .depth-leaf-actions .pd-build-dots{background:transparent!important;border:0;border-radius:0;width:32px;padding:0}
html body:not(.pd-oauth) .prototype-family .depth-leaf-actions .pd-build-dots:is(:hover,:active){background:transparent!important;border-color:transparent}
.depth-breadcrumb{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
/* Estimate wrappers retain the figure's type, rather than the stats label type. */
.trend-prototype .stats strong [title="Estimate"]{display:inline;font:inherit;color:inherit;letter-spacing:inherit}
/* SPEC-54 discovery pages: live chart/card type and controls, new layout only. */
.depth-page .section{margin-top:64px}.depth-page .title-row{margin-bottom:32px}
.depth-search{display:flex;gap:12px;max-width:760px;margin-bottom:24px}.depth-search input,[data-compare-search],.depth-category select{min-width:0;border:1px solid var(--pd-line);border-radius:12px;background:#fff;padding:13px 16px;font:inherit;color:inherit}.depth-search input{flex:1}.depth-search .pd-button{flex-shrink:0}
.depth-category{display:flex;gap:16px;align-items:center;margin:24px 0}.depth-category select{min-width:220px}
.compare-picker-row,[data-compare-picks]{display:flex;gap:10px;align-items:stretch;flex-wrap:wrap}[data-compare-picks]{flex:1}.compare-pick{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:1;min-width:150px;border-top:3px solid var(--pick);padding:14px 16px;background:color-mix(in srgb,var(--pick) 8%,white);border-radius:12px;color:var(--pd-ink)}.compare-pick button{background:none;border:0;font-size:22px;color:inherit;cursor:pointer;min-height:32px;min-width:32px}
[data-compare-picker]{padding:20px 0}[data-compare-search]{width:100%}[data-compare-options]{display:grid;grid-template-columns:1fr;gap:0;margin-top:12px}[data-compare-options] button{display:flex;justify-content:space-between;text-align:left;padding:12px;border:0;background:transparent;color:inherit;font:inherit;cursor:pointer;border-bottom:1px solid var(--pd-line)}[data-compare-options] button:hover{background:#fff}[data-compare-options] button span{font-size:13px;color:var(--pd-muted);white-space:nowrap;margin-left:12px}
.compare-charts{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr);gap:16px;align-items:stretch}.depth-page .depth-chart{margin:0;min-width:0;padding:24px}.depth-chart .chart-title{font-size:var(--pd-title-card,28px)}.compare-scatter .trend-chart-mark{display:none}.compare-time{display:flex;flex-direction:column}.compare-time [data-time-plot]{flex:1;display:flex;align-items:center}.depth-time-svg,.depth-scatter-svg{width:100%;height:auto;display:block;overflow:hidden}.depth-scatter-svg text,.depth-time-svg text{font:11px var(--pd-font-body);fill:var(--pd-muted,#656774)}.depth-scatter-svg a text{font-weight:600}.scatter-grid path{stroke:var(--pd-line);fill:none;stroke-width:1}.depth-scatter-svg a:focus circle{stroke:var(--pd-ink);stroke-width:3}.depth-page .caption{font-size:13px;color:var(--pd-muted,#656774);margin:16px 0}.depth-page .search-group-tabs{display:flex;flex-wrap:wrap;gap:4px;margin:16px 0}.compare-phone-switch{display:none}.compare-figures{list-style:none;padding:0;display:flex;flex-wrap:wrap;gap:16px 32px;margin-top:24px}.compare-figures li{display:grid;grid-template-columns:8px 1fr;gap:6px 10px}.compare-figures i{width:8px;height:8px;border-radius:50%;margin-top:8px}.compare-figures span{grid-column:2;font-size:13px;color:var(--pd-muted)}
[data-trend-suggestions]{max-width:760px}[data-trend-suggestions]>a{display:flex;justify-content:space-between;gap:16px;padding:14px 0;border-bottom:1px solid var(--pd-line);color:inherit;text-decoration:none}[data-trend-suggestions] small{color:var(--pd-muted)}[data-trend-search-result]{max-width:760px;margin-top:32px}[data-trend-search-result] .pd-button{margin-top:16px}
@media(max-width:900px){.compare-charts{grid-template-columns:1fr}.compare-phone-switch{display:flex;gap:8px;margin:16px 0}[data-view=time] .compare-scatter,[data-view=scatter] .compare-time{display:none}.compare-pick{min-width:125px}.depth-page .depth-chart{padding:18px}.depth-page .section{margin-top:48px}[data-compare-options]{grid-template-columns:1fr}.depth-search{gap:8px}.depth-search .pd-button{padding:12px 18px}.depth-category{align-items:flex-start;flex-direction:column;gap:8px}.depth-category select{width:100%}}

.depth-page .compare-phone-switch{display:none}
@media(max-width:900px){.depth-page .compare-phone-switch{display:flex}.depth-page .pd-search-chart .depth-controls .search-group-tabs{display:flex}}
.depth-page .depth-search{padding:0}.depth-page .depth-search input{width:auto}
.prototype-family.depth-page .catalogue-page :is(input[type=search],select){background-color:#fff;border:1px solid #d4d5dc;border-radius:12px;min-height:48px}

.depth-page .depth-chart.pd-big-chart{width:100%}
/* Visible live-colour switches; native buttons supply Enter and Space. */
.depth-controls .depth-switch{display:inline-flex;align-items:center;gap:8px;min-height:44px;border:0;background:transparent;color:var(--pd-ink);font:500 14px var(--pd-font-body);cursor:pointer;border-radius:var(--pd-radius-pill)}
.depth-switch-track{display:inline-block;width:34px;height:20px;border-radius:var(--pd-radius-pill);background:var(--pd-line-strong);position:relative}
.depth-switch-track::after{content:"";position:absolute;width:14px;height:14px;top:3px;left:3px;border-radius:50%;background:var(--pd-ground);transition:transform 180ms}
.depth-switch[aria-checked=true] .depth-switch-track{background:var(--pd-ink)}
.depth-switch[aria-checked=true] .depth-switch-track::after{transform:translateX(14px)}
.depth-pair-legend{list-style:none;padding:0;margin:20px 0 0;display:grid;gap:16px}
.depth-pair-legend li{display:grid;grid-template-columns:10px minmax(0,1fr) auto;gap:6px 12px;align-items:center}
.depth-pair-legend li>i{width:8px;height:8px;border-radius:50%}
.depth-pair-legend .pair-figures{grid-column:2;font-size:13px;color:var(--pd-muted)}
.depth-pair-legend .tt-actions{grid-column:3;grid-row:1/3}
.depth-pair-legend a{font:400 17px var(--pd-font-title);color:var(--pd-ink)}
.depth-pair .depth-time-svg{width:100%;height:auto}
.depth-pair .upgrade-cta.upgrade-cta.upgrade-cta{color:var(--pd-on-dark)}
.depth-page .compare-picker-row>[data-add-pick],.depth-page .compare-picker-row>[data-clear-picks]{display:inline-flex;align-items:center;justify-content:center;align-self:center;min-height:44px;min-width:44px;border:1px solid var(--pd-line-strong);border-radius:var(--pd-radius-pill);padding:0 16px;background:transparent;color:var(--pd-ink);font:500 14px var(--pd-font-body);cursor:pointer}
.depth-page .compare-time-control>summary[data-compare-time-summary]{display:none}
.compare-time-control:not([open])>div{display:block}
.scatter-reveal-label{display:none}
.depth-scatter-svg a:is(:hover,:focus,.is-selected) .scatter-reveal-label{display:block}
@media(max-width:900px){
 .compare-picker-row{display:flex;flex-wrap:wrap}
 [data-compare-picks]{display:flex;flex:1 1 100%;flex-direction:column;width:100%}
 .compare-pick{flex:none;min-height:64px;width:100%;box-sizing:border-box}
 .compare-pick>span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .depth-page .compare-time-control>summary[data-compare-time-summary]{display:list-item;min-height:44px;cursor:pointer;padding:12px 0;color:var(--pd-ink)}
 .compare-time-control:not([open])>div{display:none}
 .compare-time-control .search-group-tabs{flex-wrap:wrap}
 .depth-pair-legend li{grid-template-columns:10px minmax(0,1fr)}
 .depth-pair-legend .tt-actions{grid-row:auto;grid-column:2;justify-self:start}
}
.depth-page .compare-pick button{min-height:32px;min-width:32px;padding:0;font-size:22px}
.depth-page .compare-pick button{height:32px;line-height:1}

/* Review pass 3: compact cards, one lock per chart section, and one-line tracks. */
.trend-prototype .depth-why-now{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.trend-prototype .depth-local .trend-term-chip{background:transparent;border:1px solid var(--pd-line);color:var(--pd-ink)}
.depth-pairs{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(340px,100%),1fr));gap:16px}
.trend-prototype .depth-pairs .depth-pair{min-width:0;width:100%;margin:0;padding:16px;background:var(--pd-surface-raised);border:1px solid var(--pd-line);border-radius:var(--pd-radius-card)}
.depth-pair .depth-time-svg{height:160px;width:100%}
.depth-pair-legend{margin-top:12px;gap:12px}
.depth-pair-legend li{grid-template-columns:8px minmax(0,1fr);gap:4px 8px}
.depth-pair-legend .tt-actions{grid-column:2;grid-row:auto;justify-self:start}
.depth-pair-legend a{font-size:16px}
.depth-chart-gate.depth-chart-gate{background:transparent;border:0;padding:0}
body:not(.member-on) .depth-chart-gate.depth-chart-gate::after{display:none}
.depth-chart-lock{position:relative;min-height:320px;background:var(--pd-surface-raised);border:1px solid var(--pd-line);border-radius:var(--pd-radius-card)}
body:not(.member-on) .depth-chart-gate[data-paid-wrap]::after{content:none}
.trend-prototype .depth-chart-lock .locked-grid{inset:32px 24px}
.trend-prototype .depth-chart-lock .locked-grid i{border-top:1px dashed var(--pd-line)}
.depth-chart-lock .locked-chart-prompt{z-index:3}
.depth-chart-lock .upgrade-cta{color:var(--pd-on-dark);padding:12px 24px}
body.member-on .depth-chart-lock{display:none}
.depth-controls .depth-switch[hidden]{display:none}
.compare-pick small{display:block;margin-top:5px;font:400 12px/1.4 var(--pd-font-body);color:var(--pd-muted)}
.compare-summary{align-self:center;color:var(--pd-muted);font-size:14px;margin-left:auto;white-space:nowrap}
.depth-page .compare-time-control>summary[data-compare-time-summary]::after{content:none!important;display:none!important}
.depth-page .compare-time-control>summary[data-compare-time-summary]{list-style:disclosure-closed inside}
.depth-page .compare-time-control[open]>summary[data-compare-time-summary]{list-style-type:disclosure-open}
.depth-page .compare-time-control>summary[data-compare-time-summary]::-webkit-details-marker{display:revert}
.depth-page .compare-time-control>summary::marker{content:normal}
.depth-page .compare-time-control .search-group-tabs,.depth-page [data-trend-map] .search-group-tabs{width:max-content;max-width:100%}
.depth-page .compare-scatter .chart-title{font-size:clamp(18px,1.6vw,22px)}
.depth-page [data-compare-options] button{min-height:44px;font-size:16px;padding:10px 0;align-items:center;gap:16px}
.trend-search-heading{font-size:14px;color:var(--pd-muted);margin:0 0 8px}
[data-trend-suggestions] .trend-search-figures{flex:none;white-space:nowrap;color:var(--pd-muted);font-size:13px}
@media(max-width:900px){
 .pd-search-chart .depth-controls .search-group-tabs{overflow-x:auto;flex-wrap:nowrap;width:max-content;max-width:100%;scrollbar-width:none}
 .pd-search-chart .depth-controls .search-group-tabs button{flex:none}
 .pd-search-chart .depth-controls{min-width:0}
 .depth-pair-legend .tt-actions{grid-column:2}
 .compare-pick>span{white-space:normal}
 [data-trend-suggestions]>a{gap:12px}
}

.pd-search-chart .depth-source-controls{display:flex;gap:12px;flex-wrap:wrap;align-items:center;margin-top:20px}
.pd-search-chart:has([data-trend-source-panel="0"][hidden]) .depth-source-controls>[aria-label="Search group"]{display:none}
@media(max-width:760px){.pd-search-chart .depth-source-controls{display:none}}
.trend-prototype .depth-chart-lock .upgrade-cta.upgrade-cta.upgrade-cta{color:var(--pd-on-dark);min-height:44px;box-sizing:border-box}
@media(min-width:901px){
 .depth-pair-legend li{grid-template-columns:8px minmax(0,1fr) auto}
 .depth-pair-legend .tt-actions{grid-column:3;grid-row:1}
 .depth-pair-legend .pair-figures{grid-column:2/4;grid-row:2}
}
/* Round 2 only: the approved hero and chart control hierarchy. */
.depth-round2 .depth-meta,.depth-round2 .trend-why-now{font:400 13px/1.5 var(--pd-font-body);color:var(--pd-muted);margin:10px 0 0;display:block}
.depth-round2[data-depth-leaf] .depth-meta{margin-top:16px}
.depth-round2 .depth-local{display:inline}
.depth-round2 .trend-category{font-size:13px}
.depth-round2 :is(.back-link,.depth-breadcrumb a,.trend-category a){display:inline-flex;align-items:center;min-height:44px}
.depth-round2 .trend-category a,.depth-round2 .depth-breadcrumb a{padding:12px 0;margin:-12px 0}
.depth-round2 .trend-lede{font-size:18px}
.depth-phone-ranges{display:none}
[data-depth-chart] .depth-legend-hint{margin:14px 0 4px;border-top:1px solid var(--chart-border);padding-top:10px;color:var(--chart-muted);font:400 11px/1.5 var(--pd-font-body)}
.pd-search-chart [data-depth-chart] .chart-legend{display:grid;grid-template-columns:repeat(5,minmax(0,1fr))}
.pd-search-chart [data-depth-chart] .legend-item{min-height:40px;font-size:13px}
.pd-search-chart [data-depth-chart] .legend-item[aria-pressed=false]:not(.unavailable){opacity:1;color:var(--chart-muted);text-decoration-line:line-through;text-decoration-style:solid;text-decoration-thickness:1px}
.pd-search-chart [data-depth-chart] .legend-item[aria-pressed=false]:not(.unavailable) .swatch{background:var(--pd-line);opacity:1}
@media(max-width:767px){
 .depth-round2 .trend-lede{font-size:17px}
 .depth-round2 .depth-source-controls,.pd-search-chart [data-depth-chart] .depth-controls{display:none}
 .pd-search-chart [data-depth-chart] .depth-phone-ranges{display:flex;gap:24px;margin:0 0 8px;order:0}
 .depth-round2 .word-select{display:inline-flex;min-height:44px;font-size:14px}
 .pd-search-chart [data-depth-chart] .search-controls{margin:8px 0 0;gap:24px}
 .pd-search-chart [data-depth-chart] .chart-legend{grid-template-columns:repeat(2,minmax(0,1fr))}
 .pd-search-chart [data-depth-chart] .legend-item{min-height:44px;font-size:13px}
 .pd-search-chart [data-depth-chart] .search-overlap{font-size:12px}
}
@media(max-width:600px){
 .depth-round2 .stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;padding:24px 0 28px}
 .depth-round2 .stats>div:first-child{grid-column:1/-1}
}
.depth-compare .compare-picker-row{display:flex;gap:10px;align-items:stretch}
.depth-compare [data-compare-picks]{display:contents}
.depth-compare .compare-pick{flex:1 1 150px;min-width:150px;min-height:67px;padding:12px 12px 12px 16px}
.depth-compare .compare-pick>span{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font:500 15px/1.3 var(--pd-font-body)}
.depth-page .depth-compare .compare-pick button{width:44px;height:44px;min-width:44px;min-height:44px;flex:none;margin:-6px -8px -6px 0}
.depth-page .depth-compare .pick-add{display:flex;flex:1 1 150px;align-self:stretch;min-width:150px;min-height:64px;border:1px dashed var(--pd-line-strong);border-radius:12px;text-align:left;justify-content:flex-start;padding:12px 16px;font:500 14px/1.3 var(--pd-font-body);background:transparent}
.depth-page .depth-compare .pick-add[aria-expanded=true]{border-style:solid;border-color:#426bdd;background:#fafbff}
.depth-compare .picks-foot{display:flex;align-items:center;justify-content:space-between;margin-top:8px}
.depth-compare .compare-summary{margin:0}
.depth-compare .picks-foot button{height:44px;padding:0 4px;border:0;background:none;font:500 14px var(--pd-font-body);color:var(--pd-ink);cursor:pointer}
.depth-compare .compare-charts{margin-top:20px}
.depth-compare .compare-range-phone{display:none}
.depth-compare [data-compare-status]:empty{display:none}
.depth-compare [data-compare-picker]{padding:16px;border:1px solid var(--pd-line);border-radius:12px;background:var(--pd-surface-raised);margin-top:12px}
.depth-compare [data-compare-search]{height:48px}
.depth-compare [data-time-plot]{margin:16px 0 8px;height:300px;flex:none}
.depth-compare [data-compare-scatter]{margin:12px 0 8px}
.depth-compare .compare-empty{padding:28px 0 8px;color:var(--pd-muted);font-size:15px}
.depth-compare [hidden]{display:none!important}
.depth-compare .word-select{display:inline-flex;position:relative;align-items:center;gap:8px;min-height:44px;font:400 14px/1.5 var(--pd-font-body);color:var(--chart-accent)}
.depth-compare .choice-text{text-decoration:underline;text-underline-offset:3px}
.depth-compare .choice-arrow{width:12px;height:12px;fill:none;stroke:currentColor;stroke-width:1.6}
.depth-compare .word-select select{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
.depth-compare .dot-label{fill:var(--pd-ink);font-weight:600}
.depth-compare .dot-label .g{font-weight:400;fill:var(--pd-muted)}
@media(max-width:900px){
 .depth-compare .compare-picker-row{flex-direction:column}
 .depth-compare .compare-pick,.depth-page .depth-compare .pick-add{flex:none;width:100%}
 .depth-compare .compare-charts{display:grid;grid-template-columns:1fr;margin-top:16px}
 .depth-compare .compare-range-track{display:none}
 .depth-compare .compare-range-phone{display:flex;margin-top:14px}
 .depth-compare [data-time-plot]{height:260px}
 .depth-compare .picks-foot{margin-top:4px}
 .depth-compare .pd-big-chart{padding:18px}
 .depth-compare .chart-title{font-size:22px}
}
/* Pick slots use the same tokens as the chart card, including outside the card. */
.depth-compare{--chart-blue:#426bdd;--chart-term-1:#ab4b1e;--chart-term-2:#00948d;--chart-term-3:#874086;--chart-term-4:#b0892a;--chart-accent:#254fc8}
.depth-round2 h1{font-size:clamp(56px,5vw,72px);line-height:1.1;letter-spacing:-.025em}
.depth-round2 .stats{border-top:0}
.depth-round2 .stats strong{font:400 clamp(2.75rem,4.4vw,4rem)/1.1 var(--pd-font-title);letter-spacing:-.025em}
.depth-round2 .stats>div>span{font:400 15px/1.4 var(--pd-font-body);margin-top:10px}
.depth-round2 .stats small{font:400 13px/1.5 var(--pd-font-body);margin-top:6px}
.depth-compare .scatter-grid path{stroke-dasharray:1 5}
.depth-page [data-trend-suggestions]:has(.tt--round2){max-width:none}

@media(max-width:900px){.depth-compare .compare-charts{margin-inline:-4px}}

/* Round-2 hero uses the design's type and rhythm, including all three figures. */
.prototype-family.trend-prototype.depth-round2 .title-row{padding:16px 0 0}
.prototype-family.trend-prototype.depth-round2 .stats{grid-template-columns:repeat(3,minmax(0,1fr));gap:24px 28px;padding:28px 0 32px}
.prototype-family.trend-prototype.depth-round2 .stats strong{display:block;min-height:0;margin:0;font:400 var(--pd-number-large)/1.1 var(--pd-font-title)}
.prototype-family.trend-prototype.depth-round2 .stats>div>span{font:400 15px/1.4 var(--pd-font-body);margin:10px 0 0}
.prototype-family.trend-prototype.depth-round2 .stats small{font:400 13px/1.5 var(--pd-font-body);margin:6px 0 0}
.depth-compare .caption{font:400 12px/1.5 var(--pd-font-body);margin:12px 0 0}
.depth-page #compare>.section-head{margin-bottom:20px}
.depth-page #compare>.section-head h2{margin:0}
@media(max-width:600px){
 .prototype-family.trend-prototype.depth-round2 .stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;padding:24px 0 28px}
 .prototype-family.trend-prototype.depth-round2 .trend-lede{margin-top:18px}
}
@media(max-width:900px){.depth-compare .compare-time{min-height:438px}.depth-compare .compare-scatter{min-height:446px}}

.depth-compare .compare-scatter.pd-big-chart .trend-chart-mark{display:none}

@media(min-width:768px){
 .pd-search-chart [data-depth-chart] figcaption.trend-chart-caption{display:flex;flex-direction:column}
 .pd-search-chart [data-depth-chart] .trend-chart-figures{order:1}
 .pd-search-chart [data-depth-chart] .depth-controls{order:2}
 .pd-search-chart [data-depth-chart] [data-depth-forecast-note]{order:3}
}

.pd-search-chart [data-depth-chart] button.legend-item.legend-item{min-height:40px;font-size:13px}
@media(max-width:767px){.pd-search-chart [data-depth-chart] button.legend-item.legend-item{min-height:44px}}

.depth-compare .compare-pick small{display:block;margin-top:4px;font:400 12px/1.4 var(--pd-font-body)}

.pd-search-chart [data-depth-chart] .trend-chart-figures{width:100%}
@media(min-width:768px){.pd-search-chart [data-depth-chart] figcaption.trend-chart-caption{align-items:stretch}}

@media(max-width:767px){
 .pd-search-chart [data-depth-chart] figcaption.trend-chart-caption{display:flex;flex-flow:row wrap;align-items:center;justify-content:flex-start;column-gap:24px;padding:8px 0}
 .pd-search-chart [data-depth-chart] .search-controls:not(.depth-controls),.pd-search-chart [data-depth-chart] .depth-phone-ranges{display:contents}
 .pd-search-chart [data-depth-chart] .trend-chart-figures{order:2}
 .pd-search-chart [data-depth-chart] [data-depth-forecast-note]{order:3}
}
.pd-search-chart [data-depth-chart] figcaption.trend-chart-caption{row-gap:0}
/* Keep the hidden-line mark visible through the shared control focus/reset layer. */
.pd-search-chart [data-depth-chart] .legend-item[aria-pressed=false]:not(.unavailable)>span{text-decoration-line:line-through!important;text-decoration-style:solid;text-decoration-thickness:1px}
.pd-search-chart [data-depth-chart] .legend-item[aria-pressed=false]:not(.unavailable) .swatch{border-color:var(--pd-line)}
.pd-search-chart [data-depth-chart] .legend-item[aria-pressed=false]:not(.unavailable) .swatch path{stroke:var(--pd-line)}

.depth-forecast-desktop select{font:inherit;color:inherit;background:transparent;border:0;padding:10px 0;cursor:pointer}.chart-metric[hidden]{display:none!important}
/* C2: the same compact chart controls at every width. */
.chart-options{display:flex;align-items:center;gap:12px;font:500 14px/1.3 var(--pd-font-body);color:var(--pd-ink);z-index:12}
.chart-options-menu{position:relative}.chart-options-menu summary{display:flex;align-items:center;justify-content:space-between;gap:14px;min-height:44px;box-sizing:border-box;padding:0 12px;border:1px solid var(--pd-line,#dfe1e6);border-radius:8px;background:var(--pd-surface,#fff);cursor:pointer;list-style:none;white-space:nowrap}.chart-options-menu summary::-webkit-details-marker{display:none}
.chart-options-panel{position:absolute;top:calc(100% + 6px);right:0;width:210px;padding:12px;background:#fff;border:1px solid var(--pd-line,#dfe1e6);border-radius:12px;box-shadow:0 8px 24px #18213b20;z-index:30}
.chart-options-panel fieldset{padding:0;margin:0;border:0}.chart-options-panel fieldset+fieldset{border-top:1px solid var(--pd-line,#dfe1e6);padding-top:12px;margin-top:8px}.chart-options-panel legend{font-size:12px;color:var(--pd-muted);padding:0 8px 4px}.chart-options-panel label{display:flex;align-items:center;gap:10px;min-height:44px;padding:0 8px;border-radius:6px;cursor:pointer}.chart-options-panel label:hover{background:var(--pd-ground,#f5f6f8)}.chart-options-panel input{accent-color:var(--pd-accent,#254fc8);width:16px;height:16px;margin:0}
.chart-forecast-toggle{display:flex;align-items:center;gap:8px;min-height:44px;position:relative;cursor:pointer;white-space:nowrap}.chart-forecast-toggle input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer;margin:0}.chart-switch{width:32px;height:20px;background:#b8bdc6;border-radius:20px;position:relative;pointer-events:none}.chart-switch:after{content:'';position:absolute;top:3px;left:3px;width:14px;height:14px;background:#fff;border-radius:50%;transition:translate .15s}.chart-forecast-toggle input:checked+.chart-switch{background:var(--pd-accent,#254fc8)}.chart-forecast-toggle input:checked+.chart-switch:after{translate:12px 0}.chart-options summary:focus-visible,.chart-options label:has(input:focus-visible){outline:2px solid #254fc8;outline-offset:3px}
.pd-search-chart:has([data-depth-chart]),.cp-time{position:relative;overflow:visible}.pd-search-chart [data-depth-chart] .chart-options,.cp-time .chart-options{position:absolute;top:20px;right:24px}.pd-search-chart:has([data-depth-chart])>.chart-heading{padding-right:260px;min-height:44px;align-items:center}.pd-search-chart:has([data-depth-chart])>.chart-heading .trend-chart-mark{margin-left:16px}.cp-time .chart-heading{padding-right:260px;min-height:44px;align-items:center}.cp-time .chart-mark{display:none}
@media(max-width:600px){
 .pd-search-chart:has([data-depth-chart])>.chart-heading,.cp-time .chart-heading{padding-right:0}
 .pd-search-chart [data-depth-chart] .trend-chart-caption{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;gap:8px}
 .pd-search-chart [data-depth-chart] .search-controls:not(.depth-controls){display:contents}
 .pd-search-chart [data-depth-chart] .chart-options,.cp-time .chart-options{position:static;margin-left:auto;gap:8px;font-size:12px;order:0}
 .chart-options-menu summary{padding:0 9px;gap:8px}.chart-forecast-toggle{gap:6px}
 .pd-search-chart [data-depth-chart] .trend-chart-figures{width:100%;order:2}
 .cp-time .chart-options{justify-content:flex-end;margin-top:12px}
}

.chart-options-menu>summary:after,.chart-options-menu>summary:before{display:none!important;content:none!important}
.chart-options-menu>summary{background:#fff}
.pd-search-chart [data-depth-chart] .chart-options,.cp-time .chart-options{top:28px;right:30px}
:root .prototype-family .chart-options-menu>summary::after,:root .prototype-family .chart-options-menu>summary::before{display:none!important;content:none!important}
/* Fix 5: title row, then the shared controls row. */
.title-ending{white-space:nowrap}
.pd-search-chart:has([data-depth-chart])>.chart-heading{padding-right:0;justify-content:space-between}
.pd-search-chart:has([data-depth-chart])>.chart-heading .trend-chart-mark{margin-left:auto}
.pd-search-chart .depth-source-controls{min-height:44px;padding-right:260px}
.pd-search-chart [data-depth-chart] .chart-options{top:94px}
.depth-pair>.chart-options,.brand-chart>.chart-options,.trend-main-chart:not([data-search-chart])>.chart-options{position:static;justify-content:flex-end;margin:12px 0}

@media(max-width:600px){.title-ending{font-size:min(1em,calc((100vw - 40px)/var(--ending-width)))}}
.prototype-family .depth-pair .tt-actions.tt-actions-menu-only>.tt-build,.prototype-family .depth-pair .tt-actions.tt-actions-menu-only>.pd-save{display:none}
:root body .revenue-detail .chart-options-menu>summary::after,:root body .revenue-detail .chart-options-menu>summary::before{display:none!important;content:none!important}
.depth-page .cp-time .chart-heading{padding-right:0;justify-content:space-between}
.depth-page .cp-time .chart-mark{display:block;margin-left:auto}
.depth-page .cp-time .chart-options{position:static;margin-top:12px;justify-content:flex-end}

/* Search groups remain exposed; range and forecast occupy their own phone row. */
@media(max-width:767px){
 .pd-search-chart .depth-source-controls,.depth-round2 .depth-source-controls{display:flex;padding-right:0;min-width:0}
 .pd-search-chart .search-group-tabs,.pd-search-chart .depth-controls .search-group-tabs{display:flex;flex-wrap:wrap;width:auto;max-width:100%;overflow:visible;border-radius:24px;box-sizing:border-box}
 .pd-search-chart .search-controls [data-search-group],.pd-search-chart .search-controls [data-search-group-style]{min-height:44px;padding:8px 8px}
 .pd-search-chart [data-depth-chart] .chart-options{position:static;flex-basis:100%;justify-content:flex-end;margin:8px 0 12px;order:0}
 .pd-search-chart [data-search-chart] .search-controls{flex-wrap:wrap;width:100%;gap:8px}
}

@media(max-width:767px){.pd-search-chart .depth-source-controls:empty{display:none}}

/* Depth controls use the live Build button's colour-only feedback. */
@layer payday-focus{
@media(hover:hover) and (pointer:fine){
 html body:not(.pd-oauth) :is(.depth-page,.trend-prototype) :is(.chart-options summary,.chart-options label,.search-group-tabs label,.search-group-tabs button,.cp button:not(:disabled),.partof-card,.partof-links a):hover{background:#e6ecfa!important;color:#254fc8!important;border-color:#426bdd!important;transform:none!important;translate:none!important;box-shadow:none!important}
}
}
@layer payday-focus{
 html body:not(.pd-oauth) :is(.depth-page,.trend-prototype) :is(.chart-options summary,.chart-options label,.search-group-tabs label,.search-group-tabs button,.cp button:not(:disabled),.partof-card,.partof-links a):active{background:#e6ecfa!important;color:#254fc8!important;border-color:#426bdd!important;outline:none!important;box-shadow:none!important;transform:none!important;translate:none!important}
 html:not([data-pd-input=pointer]) body:not(.pd-oauth) :is(.depth-page,.trend-prototype) :is(.chart-options summary,.chart-options label:has(input:focus-visible),.search-group-tabs label:has(input:focus-visible),.search-group-tabs button,.cp button,.partof-card,.partof-links a):is(:focus-visible,:has(input:focus-visible)){outline:2px solid #254fc8!important;outline-offset:2px!important}
}
/* Visitors get a short membership prompt, with no chart frame or grid. */
.prototype-family .member-chart-notice,.member-chart-notice{display:flex;align-items:center;justify-content:space-between;gap:8px 16px;flex-wrap:wrap;min-height:0;height:auto;padding:12px 0;margin:12px 0 24px;background:none;border:0;border-radius:0;position:static}
.member-chart-notice p{margin:0;font:400 13px/1.4 var(--pd-font-body);color:var(--pd-muted)}
.member-chart-notice .pd-button,.member-chart-notice .upgrade-cta{min-height:36px;height:36px;padding:0 16px;margin:0;display:inline-flex;align-items:center;font-size:13px}
.member-on .member-chart-notice{display:none}
.prototype-family .member-chart-notice{padding-block:4px}
.prototype-family .member-chart-notice p{margin:0;font:400 13px/1.4 var(--pd-font-body)}
.prototype-family .member-chart-notice .pd-button,.prototype-family .member-chart-notice .upgrade-cta.upgrade-cta.upgrade-cta{min-height:36px;height:36px;padding:0 16px;font-size:13px}

/* Pair names and figures share a row-spanning action target at every width. */
html body .depth-pair-legend li{grid-template-columns:8px minmax(0,1fr) 44px}
html body .depth-pair-legend .pair-figures{grid-column:2;grid-row:2}
html body .depth-pair-legend .tt-actions{grid-column:3;grid-row:1 / 3;align-self:center;justify-self:end}
html body .depth-pair-legend .tt-dots.tt-dots.tt-dots{width:44px;height:44px;min-width:44px;min-height:44px;justify-content:center}

.depth-pair [data-pair-plot]{position:relative}
