/* Pingen pages: shared styles (search page and entity page). */
:root {
  --bg: #f7f6f3; --panel: #ffffff; --fg: #1d1c1a; --muted: #6f6b64; --line: #e4e1db;
  --accent: #2f5bd3; --sup: #1f7a4d; --sup-bg: #e6f3ec; --opp: #b23b2e; --opp-bg: #f8e9e6;
  --mark-sup: #cdeedb; --mark-opp: #f6d5cf;
  /* chart series (dataviz reference palette, categorical slots 1-2) */
  --series-1: #2a78d6; --series-2: #eb6834;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161614; --panel: #201f1d; --fg: #ecebe7; --muted: #a29e96; --line: #36342f;
    --accent: #7ea0ff; --sup: #63c995; --sup-bg: #1d2f25; --opp: #ef8a7c; --opp-bg: #352220;
    --mark-sup: #234d36; --mark-opp: #5a2c26;
    --series-1: #3987e5; --series-2: #d95926;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.5 system-ui, sans-serif;
       /* No sideways page scroll on phones (the header then stops short of the right edge).
          clip, not hidden: hidden makes body a scroll box and breaks the sticky header. */
       overflow-x: clip; }
header { padding: 14px 20px; border-bottom: 1px solid var(--line); background: var(--panel);
         display: flex; gap: 14px; align-items: center; flex-wrap: wrap; position: sticky; top: 0; z-index: 5; }
header .brand { font-weight: 700; letter-spacing: .02em; color: inherit; text-decoration: none; }
form.search { display: flex; gap: 8px; flex: 1; flex-wrap: wrap; align-items: center; }
form.search input[name=claim] { flex: 1; min-width: 280px; font: inherit; padding: 8px 12px;
         border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--fg); }
form.search input, form.search button { font: inherit; }
form.search .small { width: 9.5em; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px;
         background: var(--bg); color: var(--fg); }
button { padding: 8px 14px; border-radius: 8px; border: 1px solid var(--accent); background: var(--accent);
         color: #fff; cursor: pointer; }
main { padding: 16px 20px; max-width: 1500px; margin: 0 auto; }
.meta { color: var(--muted); font-size: 13px; }
.error { background: var(--opp-bg); color: var(--opp); padding: 10px 14px; border-radius: 8px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.graphpanel { margin-bottom: 16px; }
.graph-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.graph-head .title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.controls { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.seg button { background: transparent; color: var(--muted); border: 1px solid var(--line); padding: 3px 10px; border-radius: 0; font-size: 13px; }
.seg button:first-child { border-radius: 6px 0 0 6px; } .seg button:last-child { border-radius: 0 6px 6px 0; border-left: 0; }
.seg button.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.graphpanel:not(.co) .co-only { display: none; }
.graphpanel:not(.rings) .rings-only { display: none; }
.graph-body { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 14px; margin-top: 8px; }
#graph { height: 460px; border-radius: 8px; background: var(--bg); }
#detail { height: 460px; overflow-y: auto; font-size: 14px; }
#detail h3 { margin: 0; font-size: 17px; }
#detail .desc { color: var(--muted); margin: 2px 0 8px; }
#detail .stats { margin: 6px 0 10px; }
#detail .stats b { font-weight: 600; }
#detail .rel { margin: 4px 0 10px; padding: 0; list-style: none; }
#detail .rel li { margin: 2px 0; }
#detail .rel a, #detail .actions a { color: var(--accent); text-decoration: none; cursor: pointer; }
#detail .actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 6px 0 10px; font-size: 13px; }
#detail .pass { border-left: 3px solid var(--line); padding: 3px 8px; margin: 6px 0; }
#detail .pass .where { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
mark.named { background: var(--mark-sup); color: inherit; padding: 0 1px; border-radius: 2px; font-weight: 600; }
mark.referred { background: transparent; color: inherit; border-bottom: 2px dotted var(--accent); }
.legend { margin-top: 6px; }
.legend span { display: inline-flex; align-items: center; gap: 4px; margin-right: 10px; font-size: 12px; color: var(--muted); }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.facets { margin: 0 0 12px; }
.facets a { display: inline-block; margin: 3px 4px 0 0; padding: 2px 8px; border: 1px solid var(--line);
            border-radius: 999px; font-size: 13px; color: var(--fg); text-decoration: none; background: var(--panel); }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.col h2 { font-size: 16px; margin: 0 0 8px; display: flex; gap: 8px; align-items: baseline; }
.col.sup h2 { color: var(--sup); } .col.opp h2 { color: var(--opp); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
        margin-bottom: 10px; cursor: pointer; }
.card.sel { outline: 2px solid var(--accent); }
.card .t { font-weight: 600; } .card .t a { color: inherit; text-decoration: none; }
.card .src { color: var(--muted); font-size: 12px; }
.card blockquote { margin: 6px 0 0; padding: 4px 8px; border-left: 3px solid var(--line); font-size: 14px; }
.card blockquote.supports { border-color: var(--sup); background: var(--sup-bg); }
.card blockquote.opposes { border-color: var(--opp); background: var(--opp-bg); }
details.neutral { margin-top: 12px; }
.close { display: none; }
@media (max-width: 900px) { .cols, .graph-body { grid-template-columns: 1fr; } #graph { height: 360px; } #detail { height: auto; } }
.facets .facet { display: inline-flex; margin: 3px 4px 0 0; }
.facets .facet a { margin: 0; }
.facets .facet a:first-child { border-radius: 999px 0 0 999px; }
.facets .facet a.go { border-left: 0; border-radius: 0 999px 999px 0; color: var(--accent); }
.judge { font-size: 11px; border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; margin-left: 4px; }
.judge.llm { color: var(--accent); border-color: currentColor; }
.refining { display: flex; align-items: center; gap: 8px; }
/* A fixed square that flex rows can't squeeze (a long line beside it made it an oval). */
.spinner { box-sizing: border-box; width: 14px; height: 14px; min-width: 14px; flex: none; aspect-ratio: 1;
           border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%;
           animation: spin .8s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
.legend-lines { font-size: 12px; color: var(--muted); margin: 0 0 8px; }
.tabbar { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.tab { background: none; color: var(--muted); border: 1px solid transparent; border-bottom: 0; border-radius: 8px 8px 0 0;
       padding: 6px 14px; font: inherit; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.tab.on { color: var(--fg); background: var(--panel); border-color: var(--line); margin-bottom: -1px; font-weight: 600; }
.tab .state { font-size: 12px; color: var(--muted); display: inline-flex; gap: 4px; align-items: center; font-weight: 400; }
.tab .state.ready { color: var(--sup); }
.start { max-width: 46em; }
.start p { margin: 0 0 12px; }
.start h2 { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin: 16px 0 8px; }
.examples { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.examples a { display: inline-block; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--accent); text-decoration: none; background: var(--panel); }
.examples a:hover { border-color: var(--accent); }
.popular { margin-top: 24px; }
.popular h2 { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin: 0 0 6px; }
.popular ul { list-style: none; padding: 0; margin: 0; }
.popular li { margin: 4px 0; }
.popular a { color: var(--accent); text-decoration: none; }

/* --- pinning (pins.js) ------------------------------------------------------------- */
button.pin { background: transparent; border: 1px solid transparent; color: var(--muted); padding: 0 4px;
         font-size: 13px; line-height: 1.4; border-radius: 6px; opacity: .55; vertical-align: baseline; }
button.pin:hover, button.pin:focus-visible { opacity: 1; border-color: var(--line); background: var(--bg); }
button.pin-line { font-size: 11px; }
blockquote button.pin-line { opacity: 0; }
blockquote:hover button.pin-line, blockquote button.pin-line:focus-visible { opacity: .8; }
button.pin-search { opacity: .8; margin: 2px 0 8px; font-size: 12px; }
button.linkish { background: transparent; border: none; color: var(--accent); padding: 6px 10px; }
.pin-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 50; display: flex;
         align-items: flex-start; justify-content: center; padding: 10vh 16px 16px; }
.pin-dialog { background: var(--panel); color: var(--fg); border: 1px solid var(--line); border-radius: 12px;
         width: min(460px, 100%); padding: 16px 18px; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.pin-dialog h3 { margin: 0 0 2px; font-size: 15px; }
.pin-title { font-weight: 400; }
.pin-boards { max-height: 40vh; overflow-y: auto; margin: 10px 0; display: flex; flex-direction: column; gap: 4px; }
.pin-boards label { display: flex; gap: 8px; align-items: baseline; padding: 4px 6px; border-radius: 6px; cursor: pointer; }
.pin-boards label:hover { background: var(--bg); }
.pin-boards label.locked { color: var(--muted); }
.pin-dialog input.pin-new, .pin-dialog textarea { width: 100%; font: inherit; padding: 7px 10px; margin-top: 6px;
         border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--fg); }
.pin-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.pin-error { margin: 10px 0 0; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translate(-50%, 20px); opacity: 0; z-index: 60;
         background: var(--fg); color: var(--bg); padding: 10px 16px; border-radius: 10px; transition: all .25s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast a { color: inherit; text-decoration: underline; margin-left: 4px; }

/* --- header navigation ------------------------------------------------------------- */
.nav { margin-left: auto; display: flex; gap: 12px; }
.nav a { color: var(--muted); text-decoration: none; font-size: 14px; }
.nav a:hover, .nav a.on { color: var(--accent); }
.restored { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 13px;
         display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.restored button { background: transparent; color: var(--accent); border: 1px solid var(--accent); padding: 1px 8px; font-size: 12px; }

/* a pinned thing, found again from a board's "↩ return" */
.flash { animation: flash 2.6s ease-out; }
@keyframes flash { 0%, 40% { box-shadow: 0 0 0 3px var(--accent); } 100% { box-shadow: 0 0 0 0 transparent; } }
#detail .pass .where button.pin-line { opacity: .5; }

/* Before the judges: the articles by relevance */
.pending-note { margin: 4px 0 12px; }
.pending-note .pending-status { color: var(--accent); }
.preview-list { max-width: 900px; }

/* Accounts: sign-in, invite, account page */
.login { max-width: 360px; margin: 12vh auto; }
.login h1 { font-size: 22px; margin: 0 0 2px; }
.login .tagline { color: var(--muted); font-style: italic; margin: 0 0 14px; }
.login input, .stack input { width: 100%; box-sizing: border-box; font: inherit; padding: 8px 12px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--fg); margin: 6px 0 12px; }
.login button { width: 100%; }
main.narrow { max-width: 640px; margin: 24px auto; padding: 0 16px; display: grid; gap: 16px; }
main.narrow h1 { font-size: 22px; margin: 0 0 10px; }
main.narrow h2 { font-size: 17px; margin: 0 0 10px; }
.kv { border-collapse: collapse; width: 100%; margin-bottom: 12px; }
.kv th, .kv td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.kv th { color: var(--muted); font-weight: 500; width: 40%; }
.ok { background: var(--sup-bg); color: var(--sup); padding: 10px 14px; border-radius: 8px; }
.plan-note { margin: 4px 0 10px; }
.offers { display: grid; gap: 8px; margin-bottom: 10px; }
.offer { display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }

/* Footer and the legal pages */
.site-foot { text-align: center; padding: 18px 16px 24px; }
.site-foot a { color: var(--muted); }
.legal h2 { font-size: 16px; margin: 18px 0 6px; }
.legal p, .legal li { line-height: 1.55; }
.check { display: flex; gap: 8px; align-items: center; margin: 4px 0; }
.stack select { width: 100%; font: inherit; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--fg); margin: 6px 0 10px; }
.follow { margin-top: 6px; } .alert-me { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 10px; }
.alert-me select { font: inherit; padding: 3px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--fg); }
.subs { padding-left: 18px; } .subs li { margin: 4px 0; }
.row-2 { display: flex; gap: 8px; align-items: center; } .row-2 select { flex: 1; }
.rate .rate-acts { display: flex; gap: 8px; margin-top: 6px; }
.rate.yes { border-color: var(--sup); } .rate.no { border-color: var(--opp); }

/* Search filters: inline on wide screens; behind a "Filters" button on phones */
.search-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters-toggle { display: none; }

/* Forms: checkboxes keep their size (the full-width input rule is for text fields) */
.stack input[type=checkbox], .login input[type=checkbox] { width: auto; margin: 0; }
.check { justify-content: flex-start; }

/* Phones */
@media (max-width: 760px) {
  header { padding: 10px 14px; gap: 8px 12px; position: static; }
  header .nav { order: 1; margin-left: auto; gap: 14px; }
  header .nav a { font-size: 15px; }
  header form.search { order: 2; flex-basis: 100%; }
  header > .meta { display: none; }
  form.search input[name=claim] { min-width: 0; flex: 1 1 100%; }
  .filters-toggle { display: inline-block; padding: 6px 4px; }
  .search-filters { display: none; flex-basis: 100%; }
  .search-filters.open { display: flex; }
  main { padding: 12px 14px; }
  /* Search results first on a phone; the entities and the article graph after them. */
  main:has(> #results) { display: flex; flex-direction: column; }
  main:has(> #results) > #results { order: 1; }
  main:has(> #results) > .facets { order: 2; margin-top: 14px; }
  main:has(> #results) > .graphpanel { order: 3; margin-top: 14px; }
  main:has(> #results) > #recbox { order: 4; }
  /* The article list in a box of its own (a long list hid the map below it); the bar
     above collapses it or jumps to the map. The tabs stay at the top of the box. */
  main:has(> #results) > .results-bar { order: 1; display: flex; justify-content: space-between; margin: 4px 0 2px; }
  .results-bar .linkish { padding: 6px 2px; font-size: 14px; }
  #results { max-height: 68vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; padding: 0 8px 8px; }
  #results.collapsed { display: none; }
  #results .tabbar { position: sticky; top: 0; z-index: 2; background: var(--bg); padding-top: 6px; }
  .facets:not(.all) .facet:nth-of-type(n+8) { display: none; } /* the label is a span too */
  .facets .facets-more { display: inline-block; float: right; padding: 2px 6px; }
  main.narrow { padding: 0 14px; margin: 14px auto; }
}
.facets-more { display: none; }
.results-bar { display: none; }
/* Official records on entity pages */
.recs { margin: 14px 0; }
.rec-list { list-style: none; padding: 0; margin: 6px 0 12px; }
.rec-list li { padding: 5px 0; border-bottom: 1px solid var(--line); }
.rec-list li:last-child { border-bottom: none; }
.rec-list .snip { margin-top: 2px; }

/* --- graph hover card (graphtip.js) ------------------------------------------------- */
.graph-tip { position: fixed; z-index: 1000; max-width: 300px; pointer-events: none;
  background: var(--panel); color: var(--fg); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .15); padding: 8px 10px; font-size: 13px; line-height: 1.4; }
.graph-tip .gt-title { font-weight: 600; }
.graph-tip .gt-kind { font-weight: 400; color: var(--muted); font-size: 12px; }
.graph-tip .gt-text { color: var(--muted); margin-top: 2px; }
.graph-tip .gt-line { margin-top: 2px; }

/* Guided tours (tour.js): the page dimmed but for the highlighted part, a card beside it;
   on phones the card is a sheet at the bottom of the screen. */
.tour { position: fixed; inset: 0; z-index: 1000; pointer-events: none; }
.tour-spot { position: fixed; border-radius: 10px; pointer-events: none;
             box-shadow: 0 0 0 9999px rgba(10, 12, 20, .55); outline: 2px solid var(--accent);
             transition: top .25s, left .25s, width .25s, height .25s; }
.tour-pop { position: fixed; pointer-events: auto; padding: 14px 16px; z-index: 1001;
            box-shadow: 0 12px 34px rgba(0, 0, 0, .28); max-width: calc(100vw - 24px); }
.tour-pop h3 { margin: 2px 0 6px; font-size: 17px; }
.tour-pop .tour-text { margin: 0 0 12px; line-height: 1.45; }
.tour-acts { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.tour-acts [data-back]:disabled { visibility: hidden; }
@media (max-width: 639px) {
  .tour-pop { left: 8px; right: 8px; bottom: 8px; top: auto; width: auto; }
}
.tour-help { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px;
             border-radius: 50%; border: 1px solid var(--line); color: var(--muted); font-weight: 700;
             font-size: 13px; text-decoration: none; }
.tour-help:hover { color: var(--accent); border-color: var(--accent); }

/* ⚑ Report a relationship (entity page): quiet until hovered; its form opens below. */
button.report { background: transparent; border: none; color: var(--muted); padding: 0 4px; font-size: 13px; cursor: pointer; opacity: .55; }
button.report:hover, button.report:focus { color: #c0392b; opacity: 1; }
button.report-label { opacity: .8; font-size: 13px; }
.report-form { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 8px; }
.report-form textarea { width: 100%; font: inherit; padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--fg); }
.report-done { margin: 4px 0 8px; }

/* Account page: the data section. */
a.button-link { display: inline-block; padding: 7px 14px; border-radius: 8px; border: 1px solid var(--accent); color: var(--accent); text-decoration: none; }
button.danger { background: #c0392b; border-color: #c0392b; }

/* Entity suggestions under a name box (entity page "Find a link", search filters). */
.sug-wrap { position: relative; display: inline-block; }
.sug { position: absolute; z-index: 50; top: calc(100% + 4px); left: 0; width: min(26em, 90vw); max-height: 360px; overflow-y: auto;
       background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.18); padding: 4px 0; text-align: left; }
.sug-item { padding: 6px 10px; cursor: pointer; line-height: 1.3; color: var(--fg); }
.sug-item .meta { display: block; font-size: 12px; }
.sug-item.on, .sug-item:hover { background: var(--hl, rgba(127,127,127,.14)); }
.sug-item.local b { font-weight: 500; }
.sug-none { padding: 6px 10px; color: var(--muted); }
/* The search filter's entities: chips, then a box to add another by name. */
.ent-filter { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.ent-chips { display: contents; }
.ent-chip { display: inline-flex; align-items: center; gap: 2px; background: var(--panel); border: 1px solid var(--line);
            border-radius: 999px; padding: 1px 4px 1px 10px; font-size: 13px; max-width: 18em; }
.ent-chip .x { background: none; border: 0; color: var(--muted); padding: 0 4px; font-size: 15px; line-height: 1; cursor: pointer; }
.ent-chip .x:hover { color: var(--fg); }
.ent-filter .ent-q { width: 11em; }

/* Search page: "From the official record" (P5.14). */
.rec { border: 1px solid var(--line); background: var(--panel); border-radius: 10px; padding: 10px 14px 8px; margin: 10px 0 14px; }
.rec h2 { font-size: 15px; margin: 0 0 2px; display: flex; gap: 4px 8px; align-items: baseline; flex-wrap: wrap; }
.rec h2 .meta { font-weight: 400; font-size: 13px; }
.rec ol { list-style: none; padding: 0; margin: 6px 0 4px; }
.rec li { display: grid; grid-template-columns: 7.5em 1fr auto; gap: 2px 10px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 14px; align-items: baseline; }
.rec li:first-child { border-top: 0; }
.rec .kind { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.rec .when { display: block; font-size: 12px; color: var(--muted); font-weight: 400; text-transform: none; letter-spacing: 0; }
.rec .t a { color: var(--fg); text-decoration: none; }
.rec .t a:hover { text-decoration: underline; }
.rec .src { font-size: 12px; color: var(--muted); white-space: nowrap; }
.rec .acts { white-space: nowrap; font-size: 13px; display: flex; gap: 2px; align-items: center; }
.rec .acts .pin { position: static; }
.rec .foot { font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; margin-top: 2px; }
.rec .foot a { color: var(--accent); }
.rec .more-recs { margin: 2px 0 6px; font-size: 13px; }
.rec li .report-form, .rec li .report-done { grid-column: 1 / -1; }
@media (max-width: 640px) {
  .rec li { grid-template-columns: 1fr auto; }
  .rec .kind { grid-column: 1 / -1; }
  .rec .when { display: inline; margin-left: 6px; }
  .rec li.extra { display: none; }
  .rec.open li.extra { display: grid; }
}
@media (min-width: 641px) { .rec .more-recs { display: none; } }

/* "Entities" in the header: a name box under the nav (static/entfind.js). */
.ent-find-pop { position: absolute; top: calc(100% + 6px); right: 20px; z-index: 40; background: var(--panel);
       border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 6px 20px rgba(0,0,0,.18); padding: 8px; width: min(28em, calc(100vw - 32px)); }
.ent-find-pop form { position: relative; margin: 0; }
.ent-find-pop input { width: 100%; box-sizing: border-box; font: inherit; padding: 8px 12px; border: 1px solid var(--line);
       border-radius: 8px; background: var(--bg); color: var(--fg); }
.ent-find-pop .sug { width: 100%; }
.ent-results { list-style: none; padding: 0; margin: 12px 0; }
.ent-results li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.ent-results a { color: var(--accent); text-decoration: none; font-weight: 600; }
@media (max-width: 760px) { header { position: relative; } .ent-find-pop { right: 16px; left: 16px; width: auto; } }

/* Phones: sections fold open and closed, and a bar jumps between them (sections.js). */
.sec-toggle, .sec-jump { display: none; }
@media (max-width: 760px) {
  .sec-jump { display: flex; gap: 6px; position: sticky; top: 0; z-index: 6; order: -1; overflow-x: auto;
              white-space: nowrap; background: var(--bg); padding: 8px 0; margin: -4px 0 6px;
              border-bottom: 1px solid var(--line); scrollbar-width: none; }
  .sec-jump a, .sec-jump button { flex: none; font: inherit; font-size: 13px; padding: 4px 10px; border-radius: 999px;
              border: 1px solid var(--line); background: var(--panel); color: var(--fg); text-decoration: none; }
  .sec-jump a.folded { color: var(--muted); border-style: dashed; }
  .sec-jump button { color: var(--accent); background: none; }
  [data-section] { scroll-margin-top: 52px; }
  .sec-toggle { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 8px;
              background: none; border: 0; padding: 4px 0 8px; margin: 0; font: inherit; font-weight: 600;
              font-size: 16px; color: var(--fg); text-align: left; cursor: pointer; }
  .sec-toggle .chev::before { content: "▴"; color: var(--muted); font-size: 14px; }
  .sec-folded > .sec-toggle { padding-bottom: 0; }
  .sec-folded > .sec-toggle .chev::before { content: "▾"; }
  .sec-folded > :not(.sec-toggle) { display: none !important; }
  /* The section's own static title: the toggle names it already. */
  [data-section] .sec-title { display: none; }
  /* Long bodies scroll in a box of their own, so the next section is a short scroll away. */
  #records-body, #votes-body { max-height: 60vh; overflow-y: auto; }
  #recbox ol { max-height: 55vh; overflow-y: auto; }
  #detail { max-height: 55vh; overflow-y: auto; }
}

/* The name as a mark: 📌gen (screen readers read "Pingen"). */
.brand-mark { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
           clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Financials on an entity page (P5.19) */
.fin-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.fin-scroll { overflow-x: auto; }
table.fin { border-collapse: collapse; width: 100%; font-size: 14px; }
table.fin th, table.fin td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.fin td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.fin th { font-weight: 600; white-space: nowrap; }
table.fin th:not(:first-child) { text-align: right; }
