/* Page-specific rules that sit on top of the design system (design-system/components.css),
   which is a copy of the external artifact and is not where page layout belongs. */

/* #28 (EV-PAGE-60): components.css sets .ap's line-height to 26px (1.625); reading text sits
   easier at 1.375 (22px on 16px). Overriding here rather than hand-editing the copied artifact. */
.ap { line-height: 22px; }
/* The card-page source quote is reading prose, not a label, so it meets the 16px floor too;
   components.css sets it at 14px/21px. */
.ap-quote { font-size: 16px; line-height: 22px; }
/* The map's own caption explaining how to read it is reading prose, not a data readout, so it
   gets its own class instead of reusing .ap-readout-s (13px, correct for the scores, dates, and
   source counts that do use it elsewhere). */
.ap-caption { display: block; font-family: var(--font-sans); font-size: 16px; line-height: 22px; color: var(--ink-muted); }

/* #155: one content width and side margin for every page, Predictions' own (#50), the site bar's
   .ap-nav-inner below included, so the left edge of the header mark and of the page heading line
   up on every page instead of each page picking its own margin. */
.ap-page { padding: var(--space-8) var(--space-4); display: grid; gap: var(--space-flow); max-width: 1100px; margin: 0 auto; }
/* #170: one rhythm for every page. Blocks in the flow sit space-flow apart (under one line), with
   no browser margins on top; a group heading gets space-group more above it, so it has 3 times
   the space above it that it has below and belongs to what follows, not to what came before. */
.ap-page > :is(p, ul, ol, table), .ap-prediction-group > p { margin-block: 0; }
.ap-page > h2:not(:first-child) { margin-top: var(--space-group); }
.ap-page > p.ap-lede { max-width: 65ch; color: var(--ink-muted); }

/* #118: a keyboard or screen reader visitor otherwise has to tab through the site bar's six
   links on every single page before reaching anything page-specific; this link jumps straight
   to <main>. Off-screen until it is the focused element, same technique as the visually-hidden
   utility classes most design systems ship (components.css does not have one). */
.ap-skip-link { position: absolute; left: -9999px; top: 0; z-index: 10; padding: var(--space-2) var(--space-4); background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); }
.ap-skip-link:focus { left: var(--space-4); top: var(--space-2); }

/* The site bar spans the full width for its background and border, but its content (mark, links)
   aligns to the same box .ap-page uses, not the window edge. */
/* The browser's own 8px body margin left the site bar's rule short of both window edges. */
body { margin: 0; }
.ap-nav { padding-inline: 0; }
.ap-nav-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: 56px; width: 100%; max-width: 1100px; margin: 0 auto; padding-inline: var(--space-4); }

/* The phone list view: real 44px tap rows, since the map's own points are too small to tap. */
.ap-maplist-count { margin: 0 0 var(--space-2); }
.ap-maplist { list-style: none; margin: 0; padding: 0; display: grid; }
.ap-maplist li { border-top: 1px solid var(--line); padding-bottom: var(--space-2); }
.ap-maplist a { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); min-height: 44px; padding: var(--space-2) 0; color: var(--ink); text-decoration: none; }
.ap-maplist a:hover, .ap-maplist a:focus-visible { color: var(--signal); }
.ap-maplist-n { display: inline-block; min-width: 1.5em; color: var(--ink-muted); font-family: var(--font-mono); }
/* #30: the spread (the map's leader lines) and the cluster (the map's colour and shape) named in
   words, so neither depends on the map's own graphics to be understood (EV-PAGE-122, EV-PAGE-123). */
.ap-maplist-detail { margin: 0; }
/* #164: a seer page's rows put every stance in one column and every outlook in another, however
   long the claim; on a phone both drop under it. A mixed card's reason reads under its claim. */
.ap-maplist .ap-stance-row a { display: grid; grid-template-columns: minmax(0, 1fr) 9rem 7.5rem; }
.ap-stance-row .ap-outlook { margin-left: 0; }
.ap-stance-row-claim .ap-outlook-why { display: block; margin: var(--space-1) 0 0; }
@media (max-width: 600px) {
  .ap-maplist .ap-stance-row a { grid-template-columns: minmax(0, 1fr) 7.5rem; row-gap: var(--space-1); }
  .ap-stance-row-claim { grid-column: 1 / -1; }
}

.ap-map a { cursor: pointer; }

/* #52: the gauge label now carries the dimension's two ends in words too, under its name. The
   design system's 4.5em label column and all-caps mono type were sized for a short axis name
   (components.css .ap-gauge, .ap-label); this much longer label needs its own room to read. */
.ap-card-appendix .ap-gauge { grid-template-columns: minmax(11em, 16em) minmax(0, 1fr) 3em; }
.ap-card-appendix .ap-gauge > .ap-label { text-transform: none; letter-spacing: 0; font-size: 13px; line-height: 1.3; }
.ap-gauge-ends { display: block; color: var(--ink-muted); font-weight: 400; letter-spacing: 0; text-transform: none; font-size: 11px; }

.ap-related { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.ap-related a { color: var(--ink); }
.ap-related a:hover, .ap-related a:focus-visible { color: var(--signal); }
/* #124: a result's context (topic/cluster, source count, affiliation, outlet and date) reads
   under its own link rather than crowding the same line. */
.ap-related li { display: grid; gap: 2px; }
/* #124: group headings sat flush against the previous group's list, with no visible break
   between "Predictions" ending and "Predictors" starting. */
#search-results h2 { margin-top: calc(var(--space-flow) + var(--space-group)); }
#search-results h2:first-child { margin-top: 0; }

/* #136: outlook, at a glance wherever a card's label shows. Mirrors the design system's own
   .ap-stance (components.css): a glyph plus a word, colour never alone. #150: a widened rich-poor
   gap already counts as concerned or mixed here; it gets no marker of its own. */
.ap-outlook { display: inline-flex; align-items: center; gap: var(--space-1); margin-left: var(--space-1); font-family: var(--font-mono); font-size: 11px; line-height: 16px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; }
.ap-outlook::before { content: ""; width: 9px; height: 9px; background: currentColor; }
.ap-outlook.hopeful { color: var(--outlook-hopeful); }
.ap-outlook.hopeful::before { clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.ap-outlook.mixed { color: var(--outlook-mixed); }
.ap-outlook.mixed::before { clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.ap-outlook.concerned { color: var(--outlook-concerned); }
.ap-outlook.concerned::before { clip-path: polygon(0 0, 100% 0, 50% 100%); }
/* #167: a stance mark must not borrow an outlook's shape: a ▲ "supports" tally beside a ▲ Hopeful
   tag read as more hope. This overrides the design system's triangles and diamond (components.css,
   StanceBadge): + supports, ◐ partly agrees, × disagrees; "reports only" keeps its square. */
.ap-stance.supports::before, .ap-stance.contradicts::before {
  clip-path: polygon(33% 0, 67% 0, 67% 33%, 100% 33%, 100% 67%, 67% 67%, 67% 100%, 33% 100%, 33% 67%, 0 67%, 0 33%, 33% 33%); }
.ap-stance.contradicts::before { transform: rotate(45deg) scale(1.15); }
.ap-stance.qualifies::before { clip-path: none; border-radius: 50%; background: linear-gradient(to right, currentColor 50%, transparent 50%); box-shadow: inset 0 0 0 1.5px currentColor; }
.ap-outlook-why { color: var(--ink-muted); margin-left: var(--space-1); }
.ap-card-top { flex-wrap: wrap; row-gap: var(--space-1); }
/* #214: a prediction's page plate is washed in its outlook's colour, as a Maps tile is in its
   lean's, and the outlook stands large beside the claim on a plain ground, its word and mark.
   Every prediction card in a list carries the same bordered tag, scaled to the card. */
.ap-kind-page[data-outlook="hopeful"] { --outlook: var(--outlook-hopeful); }
.ap-kind-page[data-outlook="mixed"] { --outlook: var(--outlook-mixed); }
.ap-kind-page[data-outlook="concerned"] { --outlook: var(--outlook-concerned); }
.ap-kind-page.ap-plate[data-outlook], .ap-kind-page.ap-plate[data-outlook]:is(:hover, :focus-within) { background: color-mix(in srgb, var(--outlook) 70%, var(--line)); }
.ap-kind-page.ap-plate[data-outlook] > .ap-plate-in { background: color-mix(in srgb, var(--outlook) 18%, var(--surface)); }
.ap-claim-row { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--space-2) var(--space-4); }
.ap-claim-row > h1 { flex: 1 1 20rem; min-width: 0; margin: 0; }
.ap-outlook-big, .ap-outlook-tag { flex: none; margin-left: 0; border: 2px solid currentColor; background: var(--surface); letter-spacing: .1em; }
.ap-outlook-big { gap: var(--space-2); padding: var(--space-1) var(--space-3); font-size: 20px; line-height: 28px; }
.ap-outlook-big::before { width: 16px; height: 16px; }
.ap-outlook-tag { padding: 2px var(--space-2); font-size: 14px; line-height: 20px; }
.ap-outlook-tag::before { width: 12px; height: 12px; }
.ap-commitment { font-family: var(--font-mono); font-size: 12px; line-height: 16px; letter-spacing: .04em; color: var(--ink-muted); }

/* #173, the owner's "Tiles, net lean". Three levels, one shown at a time once the script runs
   (data-js); without it they stack as plain content. A tile's tint is its net lean's colour at a
   strength the build works out (--tint, 0 to 1: lean strength times evidence). Real tints run about
   0.05 to 0.4, so the wash is 90% of the tint, capped at 50% for text to stay readable: a clear,
   well-backed lean is vivid and a close or thin one pale; the headline always says it in words. */
.ap-tiles { display: grid; }
.ap-tiles[data-js] .ap-tiles-view:not(.is-current) { display: none; }
.ap-tiles:not([data-js]) .ap-tiles-view + .ap-tiles-view { margin-top: calc(var(--space-flow) + var(--space-group)); }
.ap-tiles-view { display: grid; gap: var(--space-flow); align-content: start; scroll-margin-top: var(--space-4); }
.ap-tiles-view p, .ap-tiles-how p, .ap-tiles-how ul { margin: 0; }
.ap-tile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--space-3); }
.ap-tile { margin-bottom: var(--space-3); }
/* Each tile spans five rows of the grid as a subgrid, so names, headlines and bars line up across a
   row even when one name wraps. */
.ap-tile { --lean: var(--line-strong); display: grid; grid-row: span 5; grid-template-rows: subgrid; row-gap: var(--space-2); align-content: start; min-width: 0; padding: var(--space-3);
  border: 1px solid color-mix(in srgb, var(--lean) min(100%, calc(30% + var(--tint) * 175%)), var(--line));
  background: color-mix(in srgb, var(--lean) min(50%, calc(var(--tint) * 90%)), var(--surface));
  color: var(--ink); text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.ap a.ap-tile { color: var(--ink); text-decoration: none; }
a.ap-tile:hover { border-color: var(--signal); box-shadow: 0 0 0 1px var(--signal); }
a.ap-tile:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
a.ap-tile:hover .ap-tile-name { color: var(--signal); }
.ap-tile.lean-hopeful { --lean: var(--outlook-hopeful); }
.ap-tile.lean-concerned { --lean: var(--outlook-concerned); }
.ap-tile-name { font-family: var(--font-heading); font-weight: 600; font-size: 17px; line-height: 21px; overflow-wrap: anywhere; }
.ap-tile-badge { display: inline-block; margin-left: var(--space-1); padding: 0 var(--space-1); border: 1px solid var(--line-strong); font-family: var(--font-mono); font-size: 10px; line-height: 16px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-muted); vertical-align: 2px; }
.ap-tile-lean { font-family: var(--font-mono); font-size: 14px; line-height: 18px; color: var(--ink-muted); }
.ap-tile-lean.ap-outlook { display: flex; align-items: baseline; margin-left: 0; font-size: 14px; letter-spacing: .02em; text-transform: none; font-weight: 400; }
.ap-tile-lean.ap-outlook::before { flex: none; width: 10px; height: 10px; align-self: flex-start; margin-top: 4px; }
/* #181: a filtered drill-down adds "· N sources" to its counts; at 390 they wrap below the lean
   rather than squeezing it onto two lines. Tiles keep nowrap: their glyph must stay beside the text.
   #200: the dot that joins the two fills the gap between them; when the counts wrap it hangs off
   the start of their line, where the line clips it, so no line opens with it. */
.ap-tiles-head .ap-tile-lean { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: var(--space-1); overflow: hidden; }
.ap-tiles-head .ap-tile-lean > :first-child { margin-right: calc(var(--space-6) - var(--space-1)); }
.ap-tile-sep { display: inline-block; width: var(--space-6); margin-left: calc(-1 * var(--space-6)); text-align: center; }
.ap-tile-count { align-self: end; }
.ap-tiles-how-ex > .ap-tile { grid-template-rows: none; grid-row: auto; }
/* The three weighted shares: hopeful from the left. Mixed is hatched as well as coloured, and each
   share's number sits under the bar beside its outlook's shape. */
.ap-share-bar { display: flex; height: 10px; background: var(--line); overflow: hidden; }
.ap-share { box-sizing: border-box; height: 100%; }
.ap-share + .ap-share { border-left: 2px solid var(--surface); }
.ap-share.hopeful { background: var(--outlook-hopeful); }
.ap-share.mixed { background: repeating-linear-gradient(135deg, var(--outlook-mixed) 0 3px, color-mix(in srgb, var(--outlook-mixed) 45%, transparent) 3px 5px); }
.ap-share.concerned { background: var(--outlook-concerned); }
.ap-share-nums { display: flex; justify-content: space-between; gap: var(--space-1); }
.ap-share-nums .ap-outlook { margin-left: 0; letter-spacing: 0; font-size: 12px; }
.ap-share-nums .ap-outlook::before { width: 8px; height: 8px; }
.ap-tiles-head { display: grid; gap: var(--space-2); max-width: 640px; }
.ap-tiles-head .ap-h2 { overflow-wrap: anywhere; }
.ap-tiles-sub { color: var(--ink-muted); max-width: 65ch; }
.ap-crumbs { display: flex; flex-wrap: wrap; align-items: center; column-gap: var(--space-1); font-family: var(--font-mono); font-size: 13px; color: var(--ink-muted); }
.ap-crumbs a { display: inline-flex; align-items: center; min-height: 44px; }
.ap-tile-cols { display: grid; gap: var(--space-6); }
.ap-tile-col :is(h4, h5) { margin: 0 0 var(--space-2); }
/* #217: a list read from some seers splits into What they back, then What they doubt, each headed
   in the heading face above its outlooks, the two a section's space apart. */
.ap-tile-sides { display: grid; gap: var(--space-8); }
.ap-tile-side { display: grid; gap: var(--space-3); }
.ap-tile-col ul { list-style: none; margin: 0; padding: 0; display: grid; }
.ap-tile-col li { border-top: 1px solid var(--line); }
.ap-tile-col li a { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); min-height: 44px; padding: var(--space-1) 0; color: var(--ink); text-decoration: none; }
.ap-tile-col li a:hover, .ap-tile-col li a:focus-visible { color: var(--signal); }
/* #207: a group's stance after a prediction's name, in brackets: muted, at the name's own size. */
.ap-tile-stance { color: var(--ink-muted); }
/* #192: a guild's drill-down links to its seers on the Seers page. */
.ap-guild-seers { margin: 0; }
.ap-guild-seers a { display: inline-flex; align-items: center; min-height: 44px; }
.ap-tile-none { display: flex; align-items: center; min-height: 44px; color: var(--ink-muted); }
.ap-more > summary { display: flex; align-items: center; min-height: 44px; border-top: 1px solid var(--line); cursor: pointer; list-style: none; font-family: var(--font-mono); font-size: 13px; color: var(--signal); }
.ap-more > summary::-webkit-details-marker { display: none; }
.ap-more[open] > summary { display: none; }
.ap-tiles-how { display: grid; gap: var(--space-flow); margin-top: var(--space-group); padding-top: var(--space-6); border-top: 1px solid var(--line); max-width: 860px; }
.ap-tiles-how ul { padding-left: var(--space-6); display: grid; gap: var(--space-1); }
.ap-tiles-how-ex { display: grid; gap: var(--space-4); }
.ap-tiles-how-ex > .ap-tile { max-width: 260px; }
.ap-tiles-how-ex > div { display: grid; gap: var(--space-2); }
@media (min-width: 720px) {
  .ap-tile-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); column-gap: var(--space-4); }
  .ap-tile { margin-bottom: var(--space-4); }
  .ap-tile { padding: var(--space-4); }
  .ap-tile-name { font-size: 19px; line-height: 24px; }
  .ap-tile-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); }
  .ap-tiles-how-ex { grid-template-columns: 260px minmax(0, 1fr); align-items: start; }
}
@media (prefers-reduced-motion: reduce) { .ap-tile { transition: none; } }
/* #181: a set read from fewer than 3 sources says so in words, with no tint and an empty bar, and
   a dashed edge so it reads as unfinished at a glance. */
.ap-tile.lean-few { border-style: dashed; }
.ap-tile.lean-few .ap-tile-lean { color: var(--ink-muted); }
.ap-tiles[aria-busy="true"] { opacity: .35; }
/* #192: the Maps tabs under the page's intro, Guilds then Topics: one map shows at a time once
   site-src/home-maps.js runs; without it both maps stack, a group's space apart. */
.ap-map-tabs { display: flex; gap: var(--space-1); border-bottom: 1px solid var(--line); }
.ap-map-tabs[hidden], .ap-map-panel[hidden] { display: none; }
.ap-map-tab { min-height: 44px; margin-bottom: -1px; padding: 0 var(--space-4); cursor: pointer;
  font-family: var(--font-mono); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-muted);
  background: none; border: 0; border-bottom: 2px solid transparent; }
.ap-map-tab:hover { color: var(--ink); }
.ap-map-tab[aria-selected="true"] { color: var(--signal); border-bottom-color: var(--signal); }
.ap-map-tab:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.ap-map-panel { display: grid; gap: var(--space-flow); align-content: start; min-width: 0; scroll-margin-top: var(--space-4); }
.ap-maps { display: grid; gap: var(--space-flow); }
.ap-maps:not([data-js]) .ap-map-panel + .ap-map-panel { margin-top: var(--space-group); }
.ap-map-how { margin: 0; }
/* #181: a map's picker at the top right of its heading (#192), and for the Topics map whose view is
   showing under them. Its panel drops under the button from 720px, and the full width of the bar
   on a phone. */
.ap-tiles-bar { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-4); }
.ap-tiles-bar .ap-h2 { overflow-wrap: anywhere; }
.ap-who[hidden], .ap-who-panel[hidden] { display: none; }
.ap-tiles-bar .ap-who-showing { flex-basis: 100%; margin: 0; }

.ap-who { margin-left: auto; }
.ap-who-btn {
  display: inline-flex; align-items: center; gap: var(--space-2); min-height: 44px; padding: 0 var(--space-3); cursor: pointer;
  font-family: var(--font-mono); font-size: 13px; letter-spacing: .08em; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-strong);
}
.ap-who-btn:hover, .ap-who-btn:focus-visible, .ap-who-btn[aria-expanded="true"] { color: var(--signal); border-color: var(--signal); }
.ap-who-btn[aria-expanded="true"] .ap-chevron { transform: rotate(180deg); }
.ap-who-panel {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 10; display: grid; gap: var(--space-4);
  padding: var(--space-3) var(--space-4); background: var(--raised, var(--surface)); border: 1px solid var(--line-strong);
  box-shadow: 0 12px 32px rgb(0 0 0 / .35);
}
/* #204: rows keep 44px from the top, so the two lists line up and the shorter one ends early. */
.ap-who-set { display: grid; align-content: start; min-width: 0; margin: 0; padding: 0; border: 0; }
.ap-who-set legend { padding: 0; font-family: var(--font-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-muted); }
.ap-who-acts { display: flex; gap: var(--space-4); }
.ap-who-act { min-height: 44px; padding: 0; background: none; border: 0; cursor: pointer; font-family: var(--font-mono); font-size: 13px; color: var(--signal); }
.ap-who-act:hover { text-decoration: underline; }
.ap-who-opt { display: flex; align-items: center; gap: var(--space-2); min-height: 44px; cursor: pointer; }
.ap-who-opt input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--signal); }
@media (min-width: 720px) {
  .ap-who { position: relative; }
  .ap-who-panel { left: auto; width: 540px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ap-who-panel-one { width: 360px; grid-template-columns: minmax(0, 1fr); }
}

/* A grid item's default min-width is auto (its content's intrinsic width), which let a long claim
   push the card wider than its track instead of wrapping. min-width: 0 lets it shrink to the track
   and wrap normally. components.css's .ap-h3 also sets text-wrap: balance, which (combined with an
   auto-fill grid track) measures the heading at its unbalanced max-content width instead of the
   track's width; text-wrap: wrap here is what actually constrains it. */
/* #164: every card in a row stretches to the row's height, so their cut and folded corners sit
   level; the plate is a grid so its inside fills it, and the card's rows stay at the top. */
.ap-card-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--space-4); align-items: stretch; }
.ap-card-list > .ap-plate { min-width: 0; display: grid; }
.ap-card-list > .ap-plate[hidden] { display: none; }
/* #205: a long list's "Show 24 more", centred under its cards. */
.ap-show-more { margin: 0; display: flex; justify-content: center; }
.ap-show-more[hidden] { display: none; }
/* components.css's .ap-card has no grid-template-columns, so its one implicit column defaults to
   auto (content's max-content width) instead of the available track width: inside an auto-fill
   grid this measures the claim's un-wrapped width and overflows the card. minmax(0, 1fr) pins it
   to the track instead. */
.ap-card-list .ap-card { grid-template-columns: minmax(0, 1fr); align-content: start; }
.ap-sort { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; margin-bottom: var(--space-2); }
.ap-sort select { min-height: 44px; background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); padding: 0 var(--space-2); }
/* #122: the "Find a predictor" text box matches the picker's own height and border rather than
   the browser's default search-input chrome. */
.ap-sort input[type="search"] {
  min-height: 44px; min-width: 0; flex: 1 1 160px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong);
  padding: 0 var(--space-3); font-family: var(--font-sans); font-size: 15px;
}
/* #165: one search panel on every list page (Predictions, Predictors, Articles): the search box,
   that page's filters, and the counts line, the same look and spacing everywhere. */
.ap-search-panel { display: grid; gap: var(--space-3); margin-block: var(--space-4); padding: var(--space-4);
  border: 1px solid var(--line-strong); background: color-mix(in srgb, var(--signal) 4%, var(--surface)); }
.ap-search-box { display: flex; align-items: center; gap: var(--space-3); }
.ap-search-box input[type="search"] { flex: 1 1 auto; min-width: 0; min-height: 44px;
  background: var(--bg); color: var(--ink); border: 1px solid var(--line-strong);
  padding: 0 var(--space-3); font-family: var(--font-sans); font-size: 16px; }
.ap-search-filters { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.ap-search-filters > [hidden] { display: none; }
.ap-search-count { margin: 0; }
/* #165: on a phone the pickers wrapped into ragged rows, each its own width. Two equal columns
   instead, and each list opens the width of its own picker, so one in the right column stays on
   screen. */
@media (max-width: 600px) {
  .ap-search-filters { display: grid; grid-template-columns: 1fr 1fr; }
  .ap-search-filters > * { min-width: 0; }
  .ap-search-filters .ap-axis-title { width: 100%; }
  .ap-search-filters .ap-chevron { margin-left: auto; }
  /* #210: "SUBTOPIC ALL SUBTOPICS" is wider than half a phone's row, so on a phone each picker
     names itself on one line and its choice on the next. */
  .ap-search-filters .ap-axis-title { flex-wrap: wrap; row-gap: 0; padding-block: var(--space-1); }
  .ap-search-filters .ap-axis-title .ap-label { flex-basis: 100%; }
  .ap-search-filters .ap-axis-title .axis-name { flex: 1 1 0; min-width: 0; }
  .ap-search-filters .ap-axis-popover { min-width: 0; right: 0; }
}
/* #197: an article's lean, as a tile shows its own: the word beside its outlook mark, the tile's
   share bar and numbers (.ap-share-bar), and how many predictions it backs in small print. */
.ap-article-lean { display: grid; gap: var(--space-1); max-width: 420px; }
.ap-article-lean-word { font-family: var(--font-mono); font-size: 14px; line-height: 18px; color: var(--ink-muted); }
.ap-article-lean-word.ap-outlook { display: flex; align-items: baseline; margin-left: 0; letter-spacing: .02em; text-transform: none; font-weight: 400; }
.ap-article-lean-word.ap-outlook::before { flex: none; width: 10px; height: 10px; align-self: flex-start; margin-top: 4px; }
.ap-article-lean .ap-readout-s { margin-top: var(--space-1); }
/* Long lists (Articles' outlets) scroll inside the picker instead of running off the page. */
.ap-axis-popover { max-height: min(60vh, 420px); overflow-y: auto; }
.ap-link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--signal); text-decoration: underline; cursor: pointer; }
/* #121: "Hide possibilities only" was a raw checkbox that wrapped its label onto three lines on a
   phone; a button styled like the picker reads its state from aria-pressed instead. */
.ap-toggle {
  display: inline-flex; align-items: center; min-height: 44px; white-space: nowrap;
  padding: 0 var(--space-3); cursor: pointer;
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.08em; color: var(--ink-muted);
  background: var(--surface); border: 1px solid var(--line-strong);
}
.ap-toggle[aria-pressed="true"] { color: var(--signal); border-color: var(--signal); }
.ap-prediction-group[hidden] { display: none; }
.ap-prediction-group { display: grid; gap: var(--space-flow); }
.ap-prediction-group + .ap-prediction-group { margin-top: calc(var(--space-flow) + var(--space-group)); }
/* #55: the "Hide possibilities only" checkbox hides a considered-only card wherever it currently
   sits (grouped or the flat sorted view share the same data-hollow marker), rather than needing
   to re-query elements each time the sort control swaps which container is visible. */
.ap-hollow-marker { color: var(--ink-muted); }

/* #121 (EV-PAGE-123): the stance shapes have no key elsewhere on this page, so it is named once
   near the top rather than on every card. */
.ap-stance-key { margin: 0; color: var(--ink-muted); }
.ap-stance-key .ap-stance { margin-right: var(--space-1); }
/* #167: a mark never ends a line with its word on the next. */
.ap-stance-key-item { white-space: nowrap; }
/* #167: a prediction's topic and subtopic are tag bubbles, never scale bars: rounded, unlike the
   chamfered chips, and with no shape marker (▲ ◆ ▼ are outlooks). The link itself is the full 44px
   touch target; the pill drawn inside it (::before) stays slim at 26px. A long name keeps to one
   line and ends in an ellipsis; the link's title holds the whole name. */
.ap-tags { display: flex; flex-wrap: wrap; column-gap: var(--space-2); }
.ap .ap-tag { position: relative; isolation: isolate; display: inline-flex; align-items: center; max-width: 100%; min-height: 44px; padding: 0 var(--space-3);
  font-family: var(--font-mono); font-size: 12px; line-height: 16px; letter-spacing: .04em; color: var(--ink); text-decoration: none; }
.ap-tag::before { content: ""; position: absolute; inset: 9px 0; z-index: -1; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--raised); }
.ap-tag > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap .ap-tag-topic { color: var(--ink-muted); }
.ap .ap-tag:is(:hover, :focus-visible) { color: var(--signal); outline: none; }
.ap-tag:is(:hover, :focus-visible)::before { border-color: var(--signal); }
.ap-tag:focus-visible::before { outline: 2px solid var(--focus); outline-offset: 2px; }
/* #167 point 5, #210: Predictions hides a bubble that repeats the page. Grouped by topic, the
   heading names the topic, so only the subtopic bubble shows; grouped by subtopic, or one subtopic
   on show, the heading and the pickers name both, so a card has no bubble row at all. A card's
   own page shows both. */
#predictions-list[data-group-by="topic"] .ap-tag-topic, #predictions-list:not([data-group-by="topic"]) .ap-tags { display: none; }
/* #210: a group's heading counts the cards it shows, quieter than its name. */
.ap-group-count { color: var(--ink-muted); }
/* #219: a topic group's outlook bar under its heading, the Maps tile's own (.ap-share-bar). */
.ap-group-lean { display: grid; gap: var(--space-1); max-width: 420px; }

/* #48: the axis picker is now a title button per axis that opens a popover listing every
   dimension, instead of a row of buttons for each one. */
.ap-axis { display: flex; gap: var(--space-4); flex-wrap: wrap; }
.ap-axis-control { position: relative; }
.ap-axis-title {
  display: inline-flex; align-items: center; gap: var(--space-2); min-height: 44px;
  padding: 0 var(--space-3); white-space: normal; text-align: left; cursor: pointer;
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.08em; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-strong);
}
.ap-axis-title:hover, .ap-axis-title:focus-visible, .ap-axis-title[aria-expanded="true"] {
  color: var(--signal); border-color: var(--signal);
}
.ap-chevron { width: 10px; height: 6px; flex-shrink: 0; }
.ap-axis-popover {
  position: absolute; top: calc(100% + 4px); left: 0; z-index: 10; min-width: 220px;
  margin: 0; padding: var(--space-2) 0; list-style: none;
  background: var(--raised, var(--surface)); border: 1px solid var(--line-strong);
}
.ap-axis-popover li {
  display: flex; align-items: center; gap: var(--space-2); min-height: 44px;
  padding: 0 var(--space-3); color: var(--ink); cursor: pointer;
}
.ap-axis-popover li[aria-selected="true"] { color: var(--signal); }
.ap-axis-popover li:hover, .ap-axis-popover li:focus { background: var(--surface); outline: none; color: var(--signal); }

/* #85: the X and Y pickers sit on the plot itself, as the axis titles, rather than in a row above
   it that pushed the map below the fold on a phone. Y reads above the plot (its text stays
   horizontal; a sideways label would need more room than a phone has) and X reads under it. */
.ap-axis-on-plot { display: flex; }
.ap-axis-on-plot-x { justify-content: flex-end; margin-top: var(--space-2); }
.ap-axis-on-plot-y { margin-bottom: var(--space-2); }
/* design-system/components.css's .ap-map svg stretches every svg inside the map to the container's
   width, meant for the plot itself; now that the axis title buttons (and their small chevron icon)
   sit inside the map too, that rule would blow the 10x6 chevron up to the full plot width. */
.ap-map .ap-chevron { width: 10px; height: 6px; max-width: 10px; }

/* #55: a card placed only by sources that consider it possible draws hollow — outline only, in
   its cluster's own colour and shape. design-system/components.css's .c1/.c2/.c3 rules fill
   solid; this layers on top rather than editing that copied artifact. */
.ap-map .hollow { fill: none; }

/* The display heading is fixed at 52px for desktop; a long word like "PREDICTIONS" is wider than
   a phone viewport at that size and gets clipped rather than wrapped. Shrink it below 480px so the
   widest word always fits. */
@media (max-width: 480px) {
  .ap-display { font-size: clamp(28px, 9vw, 52px); line-height: 1.15; }
}

/* .ap-nav-inner lays out the mark and the links in one unwrapped row; with five links that spills
   off a phone screen. Wrap both so every link stays reachable without a hidden hamburger. #155 put
   the mark and links inside .ap-nav-inner, so .ap-nav itself (now just that one flex item) has
   nothing left to wrap (#161). */
.ap-nav-inner { flex-wrap: wrap; row-gap: var(--space-2); }
.ap-nav { padding-block: var(--space-2); }
.ap-nav-links { flex-wrap: wrap; }
/* #155: at phone widths the mark takes the first row and all five links share one evenly spaced
   row under it, tracked tighter so 43 characters fit in 358px, instead of wrapping ragged. */
@media (max-width: 600px) {
  .ap-nav-inner { row-gap: 0; }
  .ap-mark { white-space: nowrap; min-height: 44px; }
  .ap-nav-links { flex: 1 0 100%; flex-wrap: nowrap; justify-content: space-between; gap: 0; }
  .ap-nav-links a { padding: 0 2px; font-size: 11px; letter-spacing: .04em; white-space: nowrap; }
}

/* #157: /about/scales/ and /about/rules/ fold each topic away, so a reader opens only the one they
   want. Same row look as the home page's topic bands; the chevron is the band's own. */
.ap-topic-folds { display: grid; gap: var(--space-2); }
.ap-topic-fold { border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 70%, transparent); }
.ap-topic-fold:hover, .ap-topic-fold[open] { border-color: var(--line-strong); }
.ap-topic-fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: 56px; padding: var(--space-3) var(--space-4); }
.ap-topic-fold > summary::-webkit-details-marker { display: none; }
.ap-topic-fold > summary:hover .ap-h3 { color: var(--signal); }
.ap-topic-fold > summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.ap-topic-fold[open] .ap-band-chev { transform: translateY(2px) rotate(225deg); border-color: var(--signal); }
.ap-topic-fold-in { display: grid; gap: var(--space-flow); padding: 0 var(--space-4) var(--space-4); }
.ap-topic-fold-in > .ap-plate { scroll-margin-top: var(--space-4); }
.ap-about ul { padding-left: var(--space-6); }
.ap-about-more { list-style: square; }
/* About and its detail pages are reading prose: lines near 65 characters (design-system README). */
.ap-about > :is(p, ul, ol) { max-width: 70ch; }

/* #168: a predictor's lean. The word carries the outlook mark (.ap-outlook); the bar splits the
   predictions they back into the home bands' three outlooks, in the same order and colours, each
   third also told by its pattern so greyscale still reads it; the counts follow in words. */
.ap-lean { display: grid; gap: var(--space-1); }
.ap-lean-word.ap-outlook { margin: 0; font-size: 12px; }
.ap-lean-bar { display: flex; height: 10px; border: 1px solid var(--line); background: var(--bg); overflow: hidden; }
.ap-lean-bar > span { flex-basis: 0; min-width: 0; }
.ap-lean-bar > .hopeful { background: var(--outlook-hopeful); }
.ap-lean-bar > .mixed { background: repeating-linear-gradient(135deg, var(--outlook-mixed) 0 3px, color-mix(in srgb, var(--outlook-mixed) 45%, transparent) 3px 6px); }
.ap-lean-bar > .concerned { background: repeating-linear-gradient(90deg, var(--outlook-concerned) 0 2px, color-mix(in srgb, var(--outlook-concerned) 55%, transparent) 2px 4px); }
.ap-lean-bar > span + span:not([style*="flex-grow:0"]) { border-left: 1px solid var(--bg); }
.ap-lean-empty { opacity: .5; }
.ap-page > .ap-lean { max-width: 420px; }
/* A card is a grid; its gap is the only space between lines, as on the page (#170). */
.ap-card > p { margin-block: 0; }
