/* Styles for the demographics plugin. Every selector is prefixed with .p-demographics */

/* A measure name that carries its definition as a tooltip. */
.p-demographics .pd-def { text-decoration: underline dotted var(--ink-3); text-underline-offset: 3px; cursor: help; }
.p-demographics .pd-def:focus-visible { outline-offset: 1px; }
.p-demographics summary { cursor: pointer; font-weight: 700; font-size: 15px; padding: 8px 0; width: fit-content; }
.p-demographics summary:hover { background: var(--mark); }

/* 1. Explorer */
.p-demographics .pd-controls { margin: 0 0 10px; }
.p-demographics .pd-controls .select { white-space: nowrap; }
.p-demographics .pd-controls select { max-width: min(320px, 78vw); }
.p-demographics .pd-find input { font: 400 15px var(--display); padding: 8px 10px; border: 1px solid var(--ink); border-radius: 2px; background: var(--paper); color: var(--ink); width: 170px; }
.p-demographics .pd-picks { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 16px; }
.p-demographics .pd-picks-lab { font: 400 13px var(--mono); color: var(--ink-2); margin-right: 4px; }
.p-demographics .pd-picks button { display: inline-flex; align-items: center; gap: 6px; font: 500 14px var(--display); padding: 7px 10px; border: 1px solid var(--ink); border-radius: 2px; background: var(--paper); color: var(--ink); cursor: pointer; }
.p-demographics .pd-picks button:hover { background: var(--wash); }
.p-demographics .pd-picks button[aria-pressed="true"] { background: var(--mark); }
.p-demographics .pd-ylab, .p-demographics .pd-xlab { font: 400 13px/1.4 var(--mono); color: var(--ink); margin: 0 0 6px; }
.p-demographics .pd-xlab { margin: 4px 0 0; text-align: right; }
.p-demographics .pd-ylab b, .p-demographics .pd-xlab b { font-weight: 500; color: var(--ink-2); }
.p-demographics .pd-scatter a { cursor: pointer; outline: none; }
.p-demographics .pd-scatter a:hover { background: none; }
.p-demographics .pd-dot { stroke: #fff; stroke-width: 1.2; }
.p-demographics .pd-scatter a:hover .pd-dot, .p-demographics .pd-scatter a:focus-visible .pd-dot { stroke: var(--ink); stroke-width: 2.5; }
.p-demographics .pd-dot.sel { stroke: var(--ink); stroke-width: 3; }
.p-demographics .pd-step { stroke: var(--ink); stroke-width: 2.5; }
.p-demographics .pd-step-halo { stroke: #fff; stroke-width: 5.5; pointer-events: none; }
.p-demographics .pd-halo { paint-order: stroke; stroke: #fff; stroke-width: 4px; stroke-linejoin: round; font-weight: 500; font-size: 13px; }
.p-demographics .pd-legend { margin-top: 10px; }
.p-demographics .pd-swatch-fade { width: 26px; height: 11px; border-radius: 6px; background: linear-gradient(90deg, var(--ink-2) 0 33%, color-mix(in srgb, var(--ink-2) 60%, white) 33% 66%, color-mix(in srgb, var(--ink-2) 30%, white) 66%); display: inline-block; }
.p-demographics .pd-swatch-step { width: 22px; height: 0; border-top: 2.5px solid var(--ink); display: inline-block; }
.p-demographics .pd-readout { font-size: 15px; background: var(--wash); padding: 10px 12px; margin: 14px 0 0; max-width: 46em; min-height: 2.9em; }
.p-demographics .pd-verdict { margin-top: 18px; max-width: 44em; }
.p-demographics .pd-verdict p { margin: 0 0 10px; }
.p-demographics .pd-verdict .fine { margin: 0 0 12px; }
.p-demographics .pd-caveat { border-left: 4px solid var(--ink); padding: 2px 0 2px 12px; font-size: 15px; }
.p-demographics .pd-tablewrap { margin-top: 10px; }
.p-demographics .pd-table { max-height: 420px; overflow-y: auto; border-top: 1px solid var(--ink); max-width: 640px; }
.p-demographics .pd-table table { width: 100%; border-collapse: collapse; min-width: 420px; }
.p-demographics .pd-table th { position: sticky; top: 0; background: var(--paper); font: 400 12px var(--mono); color: var(--ink-2); text-align: left; padding: 8px 10px 8px 0; border-bottom: 1px solid var(--ink); }
.p-demographics .pd-table td { padding: 6px 10px 6px 0; border-bottom: 1px solid var(--rule); font-size: 15px; white-space: nowrap; }
.p-demographics .pd-table .n { text-align: right; font-family: var(--mono); font-size: 13px; }
.p-demographics .pd-table td .sw { margin-right: 6px; }
.p-demographics .pd-table tr.sel td { background: var(--mark); }

/* 2. What each side's seats look like */
.p-demographics .pd-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px 24px; margin: 6px 4px 0 0; }
.p-demographics .pd-card { border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); padding: 14px 14px 12px; }
.p-demographics .pd-card h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 2px; font-size: 21px; }
.p-demographics .pd-card h3 .sw { width: 13px; height: 13px; transform: none; }
.p-demographics .pd-count { font: 400 13px var(--mono); color: var(--ink-2); margin: 0 0 8px; }
.p-demographics .pd-sum { font-size: 15px; line-height: 1.4; margin: 0 0 12px; min-height: 4.2em; }
.p-demographics .pd-scale { display: flex; justify-content: space-between; font: 400 11px var(--mono); color: var(--ink-2); margin: 0 0 4px 52%; }
.p-demographics .pd-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 48%; align-items: center; gap: 0 8px; padding: 3px 0; border-top: 1px solid var(--rule); font-size: 14px; }
.p-demographics .pd-row:focus-visible { outline-offset: 0; }
.p-demographics .pd-row .pd-lab { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-demographics .pd-row .pd-val { font: 400 12.5px var(--mono); text-align: right; }
.p-demographics .pd-bar { position: relative; height: 12px; background: var(--wash); border-radius: 2px; }
.p-demographics .pd-bar i { position: absolute; top: 0; bottom: 0; border-radius: 2px; }
.p-demographics .pd-bar b { position: absolute; left: 50%; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--ink); }
.p-demographics .pd-side { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.p-demographics .pd-blocs-note { margin-top: 20px; }
.p-demographics .pd-more > summary { font-size: 14px; font-weight: 500; padding: 6px 0; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
@media (min-width: 641px) { .p-demographics .pd-more > summary { display: none; } }

/* 3. One seat's profile (this block is also embedded on other pages) */
.p-demographics.pd-profile, .p-demographics .pd-profile { max-width: 860px; }
.p-demographics .pd-phead h3, .p-demographics .pd-phead h4 { font-size: 24px; margin: 0 0 2px; }
.p-demographics .pd-phead p { margin: 0 0 12px; font-size: 15px; }
.p-demographics .pd-phead .sw { margin-right: 6px; }
.p-demographics .pd-key { display: flex; flex-wrap: wrap; gap: 4px 18px; font: 400 12px var(--mono); color: var(--ink-2); margin: 0 0 6px; }
.p-demographics .pd-key span { display: inline-flex; align-items: center; gap: 6px; }
.p-demographics .pd-key b, .p-demographics .pd-key i { display: inline-block; height: 14px; }
.p-demographics .pd-key i { width: 1px; background: var(--ink-3); }
.p-demographics .pd-key .mid, .p-demographics .pd-strip .mid { width: 2px; background: var(--ink); }
.p-demographics .pd-key .me, .p-demographics .pd-strip .me { width: 8px; background: var(--mark); border: 2px solid var(--ink); border-radius: 1px; }
.p-demographics .pd-line { display: grid; grid-template-columns: minmax(150px, 1.25fr) 70px minmax(120px, 1.5fr) minmax(170px, 1fr); align-items: center; gap: 2px 14px; padding: 8px 0; border-top: 1px solid var(--rule); font-size: 15px; }
.p-demographics .pd-line .pd-val { font: 500 14px var(--mono); text-align: right; }
.p-demographics .pd-strip { position: relative; height: 20px; margin: 0 5px; border-bottom: 1px solid var(--rule); }
.p-demographics .pd-strip i { position: absolute; top: 5px; bottom: 0; width: 1px; background: var(--ink-3); opacity: .55; }
.p-demographics .pd-strip b { position: absolute; }
.p-demographics .pd-strip .mid { top: 1px; bottom: -3px; margin-left: -1px; }
.p-demographics .pd-strip .me { top: -2px; bottom: -4px; margin-left: -4px; }
.p-demographics .pd-rank { font: 400 12.5px/1.35 var(--mono); }

/* 4. Notes */
.p-demographics .pd-list { margin: 6px 0 14px; padding-left: 20px; max-width: 46em; }
.p-demographics .pd-list li { margin: 0 0 10px; font-size: 16px; }
.p-demographics .pd-defs dl { margin: 4px 0 16px; max-width: 46em; }
.p-demographics .pd-defs dt { font-weight: 700; font-size: 15px; margin-top: 10px; }
.p-demographics .pd-defs dd { margin: 0; font-size: 15px; color: var(--ink-2); }

@media (max-width: 640px) {
  .p-demographics .pd-controls { gap: 8px 12px; }
  .p-demographics .pd-controls .select { width: 100%; justify-content: space-between; }
  .p-demographics .pd-controls select, .p-demographics .pd-find input { flex: 1; min-width: 0; max-width: 78%; width: auto; }
  .p-demographics .pd-xlab { text-align: left; }
  .p-demographics .pd-cards { grid-template-columns: minmax(0, 1fr); }
  .p-demographics .pd-sum { min-height: 0; margin-bottom: 4px; }
  .p-demographics .pd-more[open] > summary { margin-bottom: 6px; }
  .p-demographics .pd-line { grid-template-columns: minmax(0, 1fr) auto; }
  .p-demographics .pd-line .pd-strip { grid-column: 1 / -1; order: 3; }
  .p-demographics .pd-line .pd-rank { grid-column: 1 / -1; order: 4; color: var(--ink-2); }
}
