/* Survey turnout (turnout-survey.php): the Census Bureau's reported voting and registration. An answer-sheet look on the paper canvas:
   a stamped label on every figure, numbered view tabs, square ruled tables, dashed rules for "survey, not counted". Tokens only (css/vf-tokens.css).
   Loads after css/archive-charts.css, which supplies the .ac-* chart pieces and colour classes. */

.ts-main { padding-bottom: 96px; }
.ts-lead { max-width: 46rem; margin: 0 0 16px; color: var(--vf-ink); font: 600 1.3rem/1.38 var(--vf-font-head); }
.ts-lead2 { max-width: 56rem; margin: 0 0 14px; color: var(--vf-ink); font: 400 1.12rem/1.5 var(--vf-font-head); }
.ts-h2 { margin: 0 0 12px; padding-top: 10px; border-top: 2px solid var(--vf-ink); color: var(--vf-ink); font: 700 1.35rem/1.2 var(--vf-font-head); }
.ts-h3 { margin: 28px 0 8px; color: var(--vf-ink); font: 700 1.1rem/1.25 var(--vf-font-head); }
.ts-fact { max-width: 62ch; margin: 0 0 12px; color: var(--vf-ink-2); font-size: .98rem; line-height: 1.5; }
.ts-note { max-width: 72ch; margin: 8px 0 0; color: var(--vf-mute); font-size: .84rem; line-height: 1.5; }
.ts-callout { max-width: 64ch; margin: 0 0 16px; padding: 10px 14px; background: var(--vf-surface); color: var(--vf-ink); font-size: .98rem; line-height: 1.5; }
.ts-actions { margin: 14px 0 6px; font-size: .95rem; }
.ts-actions a { display: inline-block; padding: 6px 0; color: var(--vf-blue-text); }
.ts-source { max-width: 72ch; margin: 8px 0 0; color: var(--vf-mute); font-size: .8rem; line-height: 1.45; overflow-wrap: anywhere; }
.ts-source a { color: var(--vf-blue-text); }
.ts-gap { color: var(--vf-ink-2); font-style: italic; }
.ts-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* the stamp: the plain label that says these are survey answers */
.ts-stamp { display: inline-block; padding: 0 0 0 8px; border: 0; color: var(--vf-ink); font: 800 .72rem/1.3 var(--vf-font-body); letter-spacing: .1em; text-transform: uppercase; }
.ts-label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 0 4px; padding: 6px 0 8px; border-bottom: 1px dashed var(--vf-rule-strong); }
.ts-label-text { color: var(--vf-ink-2); font-size: .86rem; line-height: 1.4; }
.ts-label-text a { color: var(--vf-blue-text); }
.ts-sheet { margin: 0 0 30px; padding-left: 14px; max-width: 836px; }
.ts-sheet .ac-fig { margin-bottom: 0; padding-top: 8px; border-top: 0; }

/* what this page is and is not: two ruled columns, not cards */
.ts-notice { display: grid; grid-template-columns: 1fr; max-width: 62rem; margin: 0 0 6px; border-bottom: 1px solid var(--vf-rule-strong); }
.ts-notice p { margin: 0; padding: 12px 0; color: var(--vf-ink); font-size: .98rem; line-height: 1.5; }
.ts-notice-b { border-top: 1px solid var(--vf-rule-strong); }
.ts-notice .ts-stamp { display: block; margin: 0 0 6px; }
.ts-sheet .ac-kicker { display: none; } /* the sheet already carries the same label above the chart */
.ts-notice a { color: var(--vf-blue-text); }
@media (min-width: 820px) {
  .ts-notice { grid-template-columns: 1.15fr 1fr; }
  .ts-notice p { padding: 14px 20px 14px 0; }
  .ts-notice-b { padding-left: 20px; border-top: 0; border-left: 1px solid var(--vf-rule-strong); }
}

/* views: one pattern on every archive page, a ruled underline 44px tall */
.ts-tabs { margin: 18px 0 18px; border-bottom: 1px solid var(--vf-rule-strong); }
.ts-tabs ul, .ts-tabs ol { display: flex; flex-wrap: wrap; gap: 0 22px; margin: 0; padding: 0; list-style: none; }
.ts-tabs a { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: -1px; padding: 0 0 2px; border-bottom: 3px solid transparent; color: var(--vf-ink-2); font: 700 .98rem/1.2 var(--vf-font-body); text-decoration: none; }
.ts-tabs a:hover { color: var(--vf-ink); border-bottom-color: var(--vf-rule-strong); }
.ts-tabs a[aria-current="page"] { color: var(--vf-ink); border-bottom-color: var(--vf-ink); }
.ts-tabs a:focus-visible { outline: 3px solid var(--vf-blue); outline-offset: 2px; }
.ts-tabno { display: none; }

/* controls */
.ts-pick { max-width: 860px; }
.ts-pick label { flex: 0 0 auto; }
.ts-pick select { flex: 0 1 220px; min-width: 0; }
.ts-switch { display: flex; flex-wrap: wrap; align-items: center; gap: 0 22px; margin: 0 0 16px; border-bottom: 1px solid var(--vf-rule-strong); }
.ts-switch-l { color: var(--vf-mute); font: 800 .6875rem/1.2 var(--vf-font-body); letter-spacing: .1em; text-transform: uppercase; }
.ts-switch a { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: -1px; border-bottom: 3px solid transparent; color: var(--vf-ink-2); font: 700 .95rem/1.2 var(--vf-font-body); text-decoration: none; }
.ts-switch a:hover { color: var(--vf-ink); border-bottom-color: var(--vf-rule-strong); }
.ts-switch a[aria-current="true"] { color: var(--vf-ink); border-bottom-color: var(--vf-ink); }
.ts-switch a:focus-visible { outline: 3px solid var(--vf-blue); outline-offset: 2px; }

/* ranking marks */
.ts-whisker { stroke: var(--ac-fill); stroke-width: 2; stroke-linecap: butt; }
.ts-ring { fill: var(--vf-surface); stroke: var(--ac-fill); stroke-width: 2; }
.ts-val { fill: var(--vf-ink); font: 700 11.5px/1 var(--vf-font-body); font-variant-numeric: tabular-nums; }
.ts-rowname { font-weight: 600; }
.ts-mark:hover .ts-whisker { stroke-width: 3; }

/* tables: stacked rows on a phone, a ruled ledger from tablet up */
.ts-scroll { overflow-x: auto; margin: 0 0 6px; }
.ts-scroll:focus-visible { outline: 3px solid var(--vf-blue); outline-offset: 2px; }
.ts-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.ts-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ts-table tr { display: block; margin: 0 0 8px; padding: 10px 12px; border: 1px dashed var(--vf-rule-strong); background: var(--vf-surface); }
.ts-table tr.ts-here { background: var(--vf-surface-2); }
.ts-table tr.ts-groupline { padding: 6px 12px; border: 0; background: transparent; }
.ts-table th[scope="row"] { display: block; margin: 0 0 4px; color: var(--vf-ink); font: 700 1rem var(--vf-font-head); text-align: left; }
.ts-table th[scope="row"] a { color: inherit; text-decoration-color: var(--vf-rule-strong); text-underline-offset: 3px; }
.ts-table th[scope="rowgroup"] { display: block; color: var(--vf-gold-text); font: 800 .72rem/1.2 var(--vf-font-body); letter-spacing: .12em; text-transform: uppercase; text-align: left; }
.ts-table td { display: block; padding: 2px 0; color: var(--vf-ink); font-size: .95rem; overflow-wrap: anywhere; }
.ts-table td::before { content: attr(data-label) ": "; color: var(--vf-mute); font-size: .75rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.ts-table td:empty { display: none; }
.ts-table td.ts-gapcell::before { content: none; }
.ts-table a { color: var(--vf-blue-text); }
.ts-table code { font-size: .74rem; overflow-wrap: anywhere; }
.ts-yk { color: var(--vf-mute); font: 400 .8rem var(--vf-font-body); }
.ts-sources { margin: 18px 0 0; max-width: 72ch; }
.ts-sources summary { cursor: pointer; padding: 6px 0; color: var(--vf-blue-text); font-weight: 700; font-size: .9rem; }
.ts-sources summary:focus-visible { outline: 3px solid var(--vf-blue); outline-offset: 2px; }
.ts-sources .ts-scroll { max-width: 100%; }
.ts-sources code { overflow-wrap: anywhere; }

@media (min-width: 760px) {
  .ts-sources { max-width: none; }
  .ts-table thead { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  .ts-table tr { display: table-row; margin: 0; padding: 0; border: 0; background: transparent; }
  .ts-table tr.ts-here { background: var(--vf-surface-2); box-shadow: inset 4px 0 0 var(--vf-gold); }
  .ts-table th, .ts-table td { padding: 8px 10px; border-bottom: 1px solid var(--vf-rule); text-align: left; vertical-align: top; }
  .ts-table thead th { position: sticky; top: 0; background: var(--vf-surface); border-bottom: 2px solid var(--vf-ink); color: var(--vf-mute); font-size: .6875rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; vertical-align: bottom; }
  .ts-table thead th a { color: inherit; text-decoration: none; }
  .ts-table thead th a:hover { color: var(--vf-ink); text-decoration: underline; text-underline-offset: 3px; }
  .ts-table thead th[aria-sort] { color: var(--vf-ink); }
  .ts-table thead th[aria-sort="ascending"] a::after { content: " \2191"; }
  .ts-table thead th[aria-sort="descending"] a::after { content: " \2193"; }
  .ts-table th[scope="row"] { display: table-cell; margin: 0; font-size: .95rem; }
  .ts-table th[scope="rowgroup"] { display: table-cell; padding: 14px 10px 6px; border-bottom: 2px solid var(--vf-ink); }
  .ts-table tr.ts-groupline { padding: 0; }
  .ts-table td { display: table-cell; font-size: .95rem; }
  .ts-table td:empty { display: table-cell; }
  .ts-table td.ts-n, .ts-table th.ts-n { text-align: right; }
  .ts-table td::before { content: none; }
  .ts-table tr.ts-none th, .ts-table tr.ts-none td { color: var(--vf-mute); }
  .ts-table td.ts-gapcell { text-align: left; }
  .ts-split td.ts-gutter, .ts-split th.ts-gutter { background: var(--vf-surface-2); border-left: 1px solid var(--vf-rule-strong); border-right: 1px solid var(--vf-rule-strong); font-weight: 800; text-align: center; }
}
@media (max-width: 759px) { .ts-split td.ts-gutter { font-weight: 800; } }
@media print { .ts-tabs, .ts-pick, .ts-switch { display: none; } .ts-stamp { transform: none; } }

/* second paragraph under the title: body size, not a second headline */
body.newsroom-static main.nr-static-main > .section:first-child p.measure { max-width: 46rem; margin-top: 10px; color: var(--vf-ink-2) !important; font: 400 1.0625rem/1.55 var(--vf-font-body) !important; }
/* controls: square, ruled, 44px */
.ts-main .btn, .ts-main select, .ts-main input[type="search"], .ts-main input[type="number"], .ts-main input[type="text"] { border-radius: 0; min-height: 44px; }
