/* file: css/sources-page.css */
/* sources-page.css: "Sources and credits" (#/sources, js/sources-page.js) and the provenance block in the "Where this number comes from"
   sheet (js/books-deep.js), v38 part 04 (BB-405). Same look as How our numbers work (css/numbers-page.css): the page is drawn in
   #bbsrc-root over the app with the bbn-* header and card classes. Tokens only (--bb-*, --pk-*, which flip for Night by themselves);
   sizes in rem; tap targets at least 2.75rem (44px). */

/* ---------- the page (mirrors #bbn-root; body.bbn-on hides the app's main and keeps the banner and tab bar) ---------- */
#bbsrc-root[hidden]{ display:none }
#bbsrc-root{ box-sizing:border-box; max-width:40rem; min-height:100vh; margin:0 auto; padding:0 1rem 6rem; background:var(--bb-paper); color:var(--bb-ink);
  font:400 var(--bb-fs-callout)/1.5 var(--bb-font-body); -webkit-text-size-adjust:100% }
html[data-subpage] #bbsrc-root{ padding-bottom:calc(var(--bb-tabbar-h,4rem) + 3rem + env(safe-area-inset-bottom,0px)); min-height:0 }
#bbsrc-root *, #bbsrc-root *::before, #bbsrc-root *::after{ box-sizing:border-box }
#bbsrc-root :focus-visible{ outline:3px solid var(--bb-gold); outline-offset:2px; border-radius:var(--bb-radius-button) }
#bbsrc-root .bbn-head{ container-type:inline-size; position:sticky; top:0; z-index:2; margin:0 -1rem; padding:.5rem 1rem; background:var(--bb-paper); border-bottom:1px solid var(--bb-rule) }
/* the way back is a long name ("‹ How BuckBallot works"), so the title sits on its own line under it, never on top of it */
#bbsrc-root .bbn-head__in{ display:grid; grid-template-columns:1fr; row-gap:.125rem; align-items:center; min-height:2.5rem }
#bbsrc-root .bbn-head__in > span:last-child{ display:none }
/* the back link has its own row here, so its name is never cut short when there is room */
#bbsrc-root .bbn-head .pk-back{ max-width:100% }
#bbsrc-root .bbn-back{ justify-self:start; display:inline-flex; align-items:center; gap:.3rem; min-height:2.75rem; min-width:2.75rem; color:var(--bb-muted);
  font:500 var(--bb-fs-callout)/1.2 var(--bb-font-body); text-decoration:none }
#bbsrc-root .bbn-title{ margin:0 0 .25rem; font:600 var(--bb-fs-title2)/1.15 var(--bb-font-display); letter-spacing:-.01em; color:var(--bb-ink); text-align:left; overflow-wrap:break-word }
#bbsrc-root .bbn-title:focus, #bbsrc-root .bbn-title:focus-visible{ outline:none }
#bbsrc-root .bbs-body{ padding-top:1rem }
#bbsrc-root .bbn h2{ margin:2rem 0 .5rem; font:600 var(--bb-fs-title2)/1.2 var(--bb-font-display); letter-spacing:-.01em; color:var(--bb-ink) }
#bbsrc-root .bbn p{ margin:.5rem 0 }
#bbsrc-root .bbn .lede{ font-size:var(--bb-fs-body); margin-top:0 }
#bbsrc-root .bbn a{ color:var(--pk-link, var(--bb-ink)); text-underline-offset:.15em; overflow-wrap:anywhere }

/* one card per source */
#bbsrc-root .bbs-src .bbs-name{ margin:0 0 .5rem; color:var(--bb-muted); font-size:var(--bb-fs-subhead) }
#bbsrc-root .bbs-dl{ margin:0; display:grid; gap:.375rem }
#bbsrc-root .bbs-dl > div{ display:grid; grid-template-columns:6.5rem minmax(0,1fr); gap:.5rem; align-items:baseline }
#bbsrc-root .bbs-dl dt{ margin:0; color:var(--bb-muted); font:600 var(--bb-fs-footnote)/1.35 var(--bb-font-body) }
#bbsrc-root .bbs-dl dd{ margin:0; font-size:var(--bb-fs-subhead); line-height:1.4; min-width:0 }
#bbsrc-root .bbs-host{ color:var(--bb-muted) }
/* the terms link is a 44px tap target */
#bbsrc-root .bbs-dl dd a{ display:inline-flex; align-items:center; min-height:2.75rem; padding:.25rem 0 }
#bbsrc-root .bbs-rejected{ padding-left:1.25rem; margin:.5rem 0 }
#bbsrc-root .bbs-rejected li{ margin:.5rem 0; font-size:var(--bb-fs-subhead) }
#bbsrc-root .bbn a.bbn-row{ display:flex; align-items:center; justify-content:space-between; gap:1rem; min-height:var(--pk-tap, 2.75rem);
  margin:.75rem 0; padding:.625rem 0; border-top:1px solid var(--bb-rule); border-bottom:1px solid var(--bb-rule); color:var(--bb-ink); text-decoration:none; cursor:pointer }
#bbsrc-root .bbn a.bbn-row .pk-setrow__txt{ display:flex; flex-direction:column; gap:.125rem; min-width:0 }
#bbsrc-root .bbn a.bbn-row .pk-setrow__t{ font:600 var(--bb-fs-headline)/1.3 var(--bb-font-body); color:var(--bb-ink) }
#bbsrc-root .bbn a.bbn-row .pk-setrow__l{ font:400 var(--bb-fs-subhead)/1.35 var(--bb-font-body); color:var(--bb-muted) }
#bbsrc-root .bbn a.bbn-row .you-chevrow__chev{ flex:none; color:var(--bb-muted); font:400 var(--bb-fs-title1)/1 var(--bb-font-body) }

/* ---------- "How BuckBallot sources" on How BuckBallot works (#about, js/social.js) ---------- */
.you-sourcing{ margin:1rem 0; padding:1rem 1rem .75rem }
.you-sourcing .bb-h2{ margin:0 0 .5rem; font-size:var(--bb-fs-title3) }
.you-sourcing__list{ margin:0; padding-left:1.25rem }
.you-sourcing__list li{ margin:.375rem 0; line-height:1.45 }

/* ---------- the provenance block in "Where this number comes from" (js/books-deep.js) ---------- */
.bd-prov{ margin:.75rem 0 0; padding:.75rem 0 0; border-top:1px solid var(--bb-rule) }
.bd-prov__dl{ margin:0; display:grid; gap:.375rem }
.bd-prov__dl > div{ display:grid; grid-template-columns:6.5rem minmax(0,1fr); gap:.5rem; align-items:baseline }
.bd-prov__dl dt{ margin:0; color:var(--bb-muted); font:600 var(--bb-fs-footnote)/1.35 var(--bb-font-body) }
.bd-prov__dl dd{ margin:0; font-size:var(--bb-fs-subhead); line-height:1.4; min-width:0; overflow-wrap:anywhere }
.bd-prov__hist{ margin:.75rem 0 0 }
.bd-prov__hist h3{ margin:0 0 .25rem; font:600 var(--bb-fs-subhead)/1.3 var(--bb-font-body); color:var(--bb-ink) }
.bd-prov__hist ul{ margin:0; padding-left:1.25rem }
.bd-prov__hist li{ margin:.375rem 0; font-size:var(--bb-fs-subhead); line-height:1.4 }
a.bd-srcrow.bd-credits{ text-decoration:none; color:inherit }
/* v38 part 07 (BB-408): a late or paused source, and a revision the daily source check found (js/books-deep.js provBlock,
   js/sources-page.js). Calm, not an error: the gold rule marks it, the words say what happened. */
.bd-prov__note, .bbs-note{ margin:0 0 .75rem; padding:.5rem .75rem; border-left:3px solid var(--bb-gold); background:var(--bb-card); border-radius:0 8px 8px 0;
  color:var(--bb-ink); font-size:var(--bb-fs-subhead); line-height:1.4 }
.bd-prov__was{ margin:0 0 .75rem; color:var(--bb-ink); font:600 var(--bb-fs-subhead)/1.4 var(--bb-font-body); overflow-wrap:anywhere }
/* v38 part 09 (BB-410): How BuckBallot picks news sources / polls */
.bbs-rule{ margin:0 0 1rem; padding-left:1.25rem; line-height:1.45 } .bbs-rule li{ margin:0 0 .5rem }
.bbs-outlets{ list-style:none; margin:0 0 1rem; padding:0 } .bbs-outlets li{ padding:.5rem 0; border-bottom:1px solid var(--bb-line, rgba(127,127,127,.25)); line-height:1.45; overflow-wrap:anywhere }
.bbs-outlets a{ display:inline-block; min-height:44px; line-height:44px }
.bbs-why, .bbs-reviewed, .bbs-foot{ color:var(--bb-muted) }
.bbs-coming{ margin:.25rem 0 0; color:var(--bb-muted); font-style:italic }

/* file: css/search.css */
/* ==========================================================================
   Search (#search), Stage 3: brand/reference/brand/ui-screens/search-{light,dark}.jpg (iPhone @3x: mock px / 3 = CSS px)
   A rounded field on the cream fill, the chips (selected = green, others cream), gold eyebrow group heads, rows with a 52px
   rounded picture, a 600 title and a muted line, divided by 1px rules running to the screen edge. Tokens only.
   ========================================================================== */
html.puck body #ssearch{display:flex;flex-direction:column;gap:0;padding-top:4px}
.sr-form{margin:0}
.sr-field{position:relative;display:flex;align-items:center;min-height:max(3.5rem,56px);border-radius:var(--bb-radius-card);background:var(--bb-paper-edge);transform-origin:100% 50%}
html[data-theme="dark"] .sr-field{background:var(--bb-rule)}
.sr-mag{flex:none;position:relative;width:1.25rem;height:1.25rem;margin:0 12px 0 18px;border:2px solid var(--bb-ink);border-radius:var(--bb-radius-pill)}
.sr-mag::after{content:"";position:absolute;right:-6px;bottom:-4px;width:8px;height:2px;border-radius:var(--bb-radius-pill);background:var(--bb-ink);transform:rotate(45deg)}
html.puck body #ssearch .sr-input{flex:1 1 auto;width:auto;min-width:0;min-height:44px;margin:0;padding:0;border:0 !important;border-radius:0;box-shadow:none !important;background:none !important;color:var(--bb-ink);font:400 var(--bb-fs-title3)/1.3 var(--bb-font-body);outline:none;-webkit-appearance:none;appearance:none}
html.puck body #ssearch .sr-input:focus,html.puck body #ssearch .sr-input:focus-visible{outline:none;border:0 !important;box-shadow:none !important}
.sr-input::placeholder{color:var(--bb-muted);opacity:1}
.sr-input::-webkit-search-cancel-button{display:none}
.sr-field:focus-within{outline:none}
/* R1: the field is focused on arrival; its ring shows only for keyboard use (html[data-input], js/pk-ui.js) */
html[data-input="key"] .sr-field:focus-within{outline:var(--bb-focus-ring,2px solid var(--bb-green));outline-offset:var(--bb-focus-off,2px)}
html:not([data-input]) .sr-field:has(.sr-input:focus-visible){outline:var(--bb-focus-ring,2px solid var(--bb-green));outline-offset:var(--bb-focus-off,2px)}
.sr-x{flex:none;display:grid;place-items:center;width:44px;height:44px;margin-right:6px;border:0;border-radius:var(--bb-radius-pill);background:none;color:var(--bb-muted);font:500 var(--bb-fs-title2)/1 var(--bb-font-body);cursor:pointer}
.sr-input:placeholder-shown + .sr-x{visibility:hidden}
.sr-chips{display:flex;gap:8px;margin:12px -16px 4px;padding:0 16px 4px;overflow-x:auto;scrollbar-width:none}
.sr-chips::-webkit-scrollbar{display:none}
.sr-chip{flex:none;display:inline-flex;align-items:center;justify-content:center;min-height:44px;min-width:44px;padding:0 11px;border:0;border-radius:var(--bb-radius-card);background:var(--bb-paper-edge);
  color:var(--bb-ink);font:600 var(--bb-fs-subhead)/1 var(--bb-font-body);white-space:nowrap;cursor:pointer}
html[data-theme="dark"] .sr-chip:not([aria-pressed="true"]){background:var(--bb-rule)}
.sr-chip[aria-pressed="true"]{background:var(--bb-green);color:var(--bb-on-green)}
.sr-chip:focus-visible,.sr-row:focus-visible,.sr-more:focus-visible,.sr-clear:focus-visible{outline:var(--bb-focus-ring,2px solid var(--bb-green));outline-offset:var(--bb-focus-off,2px)}
.sr-results{display:flex;flex-direction:column}
.sr-group{display:flex;flex-direction:column;margin:0}
html.puck body #ssearch .sr-group__h{margin:16px 0 4px;font:600 var(--bb-text-label)/1.35 var(--bb-font-body);letter-spacing:.3em;text-transform:uppercase;color:var(--bb-gold-text)}
html.puck.eyebrow-sentence body #ssearch .sr-group__h{text-transform:none;letter-spacing:.02em}
.sr-list{list-style:none;margin:0 -16px;padding:0}
.sr-list > li{border-bottom:1px solid var(--bb-rule)}
.sr-row{display:flex;align-items:center;gap:12px;width:100%;min-height:max(4.5rem,72px);padding:10px 16px;box-sizing:border-box;border:0;background:none;color:var(--bb-ink);text-align:left;text-decoration:none;font:inherit;cursor:pointer}
.sr-row:hover{background:color-mix(in srgb,var(--bb-paper-edge) 50%,transparent)}
.sr-thumb,.sr-row .sr-av,.sr-row .bb-avatar,.sr-row .off-av{flex:none;width:3.25rem;height:3.25rem;max-width:56px;max-height:56px;border-radius:var(--bb-radius-button);overflow:hidden;background:var(--bb-paper-edge)}
.sr-thumb img{display:block;width:100%;height:100%;object-fit:cover}
.sr-thumb:not(.sr-thumb--icon):not(.sr-thumb--round) img{object-fit:contain;transform:scale(1.35);transform-origin:50% 10%}
.sr-thumb--round,.sr-row .sr-av,.sr-row .bb-avatar,.sr-row .off-av{border-radius:var(--bb-radius-pill)}
.sr-row .bb-avatar,.sr-row .off-av{display:grid;place-items:center;font-size:var(--bb-fs-body)}
.sr-row__txt{display:flex;flex-direction:column;gap:2px;min-width:0}
.sr-row__t{font:600 var(--bb-text-body)/1.3 var(--bb-font-body);color:var(--bb-ink);overflow-wrap:anywhere}
.sr-row__m{font:400 var(--pk-fs-small,.9375rem)/1.35 var(--bb-font-body);color:var(--bb-muted);overflow-wrap:anywhere}
.sr-more{align-self:flex-start;display:inline-flex;align-items:center;min-height:44px;padding:0;border:0;background:none;color:var(--bb-green);font:600 var(--bb-text-body)/1.3 var(--bb-font-body);cursor:pointer}
.sr-more:disabled{color:var(--bb-muted);font-weight:400;cursor:default}
.sr-note{margin:8px 0;color:var(--bb-muted);font:400 var(--pk-fs-small,.9375rem)/1.45 var(--bb-font-body)}
.sr-recent__head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.sr-clear{display:inline-flex;align-items:center;min-height:44px;min-width:44px;padding:0 4px;margin-top:8px;border:0;background:none;color:var(--bb-muted);font:500 var(--pk-fs-small,.9375rem)/1 var(--bb-font-body);cursor:pointer}
.sr-row--recent{min-height:max(3.5rem,56px)}
.sr-clock{flex:none;position:relative;width:1.125rem;height:1.125rem;margin:0 6px;border:2px solid var(--bb-muted);border-radius:var(--bb-radius-pill)}
.sr-clock::before{content:"";position:absolute;left:50%;top:18%;width:2px;height:38%;margin-left:-1px;background:var(--bb-muted)}
.sr-clock::after{content:"";position:absolute;left:50%;top:50%;width:30%;height:2px;margin-top:-1px;background:var(--bb-muted)}
.sr-try__chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:4px}
.sr-chip--try{font-weight:500}
.sr-empty{margin-top:16px}
/* the header: "‹ Feed" and the centred title (the same back control as the Feed's deeper pages, css/feedb.css) */
html.puck body[data-screen="search"] .pk-pagetitle:not([hidden]){font:600 var(--bb-fs-title2)/1.2 var(--bb-font-display);color:var(--bb-ink)}
@media (max-width:960px){
  html.puck body[data-screen="search"] .pk-masthead{position:relative}
  html.puck body[data-screen="search"] .pk-masthead .pk-pagetitle:not([hidden]){position:absolute;left:50%;transform:translateX(-50%);text-align:center}
}
@media (min-width:961px){ .sr-list{margin:0} }
