/* wall.css: the discovery pages (WP13A): home, hubs, search, day, errors. Tokens and components come from
   parrot.css; this file only lays them out. No inline styles; no Coral. */

/* ---------- home hero ---------- */
.hero { max-width: 860px; margin: 28px auto 8px; text-align: center; }
.hero h1 { font-size: clamp(28px, 4.2vw, 44px); letter-spacing: -.02em; line-height: 1.1; }
.hero .lede { margin: 12px auto 22px; max-width: 640px; font-size: 17px; line-height: 1.5; color: var(--ink-2); }
.hero .search.big { text-align: left; }
.hero .examples { justify-content: center; }
.hub-strip { margin-top: 18px; }
.hub-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.hub-chips .pill { min-height: 32px; }
.facts { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 14px; margin: 16px 0 0;
  font-size: 13px; color: var(--muted); }
@media (min-width: 721px) {                     /* on phones the line wraps: no dot may lead a line */
  .facts { gap: 4px 10px; }
  .facts > span + span::before { content: "·"; margin-right: 10px; color: var(--muted); }
}

/* ---------- the wall ---------- */
.wall-h { align-items: center; }
.wall-h h2 { font-size: 22px; }
.wall-tools { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.mkt-bar { display: flex; align-items: center; gap: 10px; }
.mkt-note { margin: 0; font-size: 12px; color: var(--muted); max-width: 300px; }
.week { margin: 4px 0 10px; }
.week ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.week a { display: inline-flex; align-items: baseline; gap: 6px; min-height: 32px; padding: 6px 10px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); text-decoration: none; font-size: 13px; }
.week a:hover { border-color: var(--focus); color: var(--ink); }
.week a[aria-current] { border-color: var(--focus); box-shadow: inset 0 -2px 0 var(--bar); color: var(--ink); }
.week b { font-weight: 650; color: var(--ink); }
.week .n { font-size: 12px; color: var(--muted); }
.hub-filter { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 6px; padding: 0; list-style: none; }
.hub-filter .pill { min-height: 30px; font-size: 13px; }
.hub-filter .pill .n { margin-left: 6px; font-size: 12px; color: var(--muted); }
.key { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 8px 0 4px; padding: 0; list-style: none; font-size: 12.5px; color: var(--muted); }
.key li { display: inline-flex; align-items: center; gap: 6px; }
.day { margin-top: 22px; scroll-margin-top: 80px; }
.day-h { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin: 0 0 10px; padding-bottom: 6px;
  border-bottom: 1px solid var(--line); }
.day-h h2, .day-h h3 { font-size: 17px; }
.day-h .rel { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--link); }
.day-h .sub { font-size: 13px; color: var(--muted); }
.tile .lt { font-size: 12.5px; }
.day-more { margin: 10px 0 0; }
.tile .tile-f { justify-content: flex-start; }
.tile .tile-f .btn.sm { margin-left: auto; }
.is-filtered .tile[hidden], .is-filtered .st-c[hidden] { display: none; }

/* ---------- recently settled ---------- */
.settled { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.st-c { padding: 12px 14px; min-width: 0; }
.st-h { display: flex; align-items: center; gap: 10px; }
.st-t { min-width: 0; }
.st-n { font: 600 15px/1.25 var(--font-head); margin: 0; }
.st-n a { color: var(--ink); text-decoration: none; }
.st-n a:hover { text-decoration: underline; }
.st-s { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
.st-r { margin: 10px 0 4px; font-size: 14px; color: var(--ink-2); }
.st-r b { font-size: 18px; color: var(--ink); }
.ag { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; }
.ag.ok { color: var(--pos); }
.ag.off { color: var(--b-warn-fg); }
.ag.muted { font-weight: 400; }
.st-w { display: grid; gap: 2px; margin: 8px 0 0; padding: 0; list-style: none; font-size: 13px; }
.st-w li { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; border-top: 1px solid var(--line); }
.st-w .rw { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.st-w .rr { font-family: var(--font-mono); font-size: 12px; white-space: nowrap; }
.st-w .r-yes .rr { color: var(--pos); font-weight: 650; }
.st-w .r-no .rr { color: var(--muted); }

.agents { padding: 16px 18px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.agents h2 { font-size: 16px; margin-bottom: 6px; }
.agents p { margin: 0; font-size: 14px; color: var(--ink-2); }
.agents code { padding: 1px 5px; border-radius: 5px; background: var(--surface-3); color: var(--ink); word-break: break-word; }

/* ---------- hub pages ---------- */
.hub-head { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px 24px; margin: 6px 0 18px; }
.hub-head .t { flex: 1; min-width: 260px; }
.hub-head h1 { font-size: 30px; }
.hub-head .desc { margin: 6px 0 8px; font-size: 15px; color: var(--ink-2); max-width: 720px; }
.hub-head .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 13px; color: var(--muted); }
.hub-head .acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.subs { margin: 0 0 6px; }
.ents { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.ents li { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px 12px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line); }
.ents li:hover { border-color: var(--line-2); }
.ents .en { min-width: 0; flex: 1; }
.ents .en a { display: block; font-weight: 600; font-size: 14px; color: var(--ink); text-decoration: none; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.ents .en a:hover { text-decoration: underline; }
.ents .es { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ents .eo { font-size: 11.5px; font-weight: 650; color: var(--link); white-space: nowrap; }
.more-ents { margin-top: 10px; }
.more-ents > summary { list-style: none; cursor: pointer; }
.more-ents > summary::-webkit-details-marker { display: none; }
.more-ents[open] > summary { margin-bottom: 10px; }
.lb { width: 100%; border-collapse: collapse; font-size: 14px; }
.lb th, .lb td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.lb thead th { position: sticky; top: var(--head-h); z-index: 2; background: var(--surface); font-size: 11px; font-weight: 650;
  letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.lb tbody tr:last-child td, .lb tbody tr:last-child th { border-bottom: 0; }
.lb .ra { text-align: right; }
.lb .wn { font-weight: 600; overflow-wrap: anywhere; }
.lb .who-sm { display: none; }
.lb .who { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); text-decoration: none; }
.lb .who:hover { text-decoration: underline; }
.lb-wrap { border-radius: var(--r-lg); }
.state-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.state-row > * { max-width: 100%; white-space: normal; }
.subs-n { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.hub-head h1 .rel { margin-left: 6px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--link); vertical-align: middle; }

/* ---------- search ---------- */
.s-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin: 8px 0 18px; }   /* never wider than the screen */
.s-filters { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; }
.s-filters label { display: grid; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.s-filters select, .s-filters input { min-height: 36px; padding: 0 10px; border-radius: var(--r); border: 1px solid var(--control-line);
  background: var(--surface); color: var(--ink); font-size: 14px; max-width: 100%; min-width: 0; }
.s-filters input[type="date"] { min-width: 150px; }
.s-summary { font-size: 14px; color: var(--ink-2); margin: 0 0 10px; }
.s-sec { margin-top: 26px; }
.results { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.rs { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: var(--r); background: var(--surface);
  border: 1px solid var(--line); }
.rs-t { flex: 1; min-width: 0; }
.rs-n { font: 600 15px/1.3 var(--font-body); margin: 0; }
.rs-m { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
.rs-q { margin: 6px 0 0; font-size: 14px; color: var(--ink-2); line-height: 1.5; }
mark { background: var(--b-teal-bg); color: var(--b-teal-fg); border-radius: 3px; padding: 0 2px; }
.wres { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.wres li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.wres .wt-n { min-width: 0; }
.wres .wt-n a { font-weight: 600; color: var(--ink); text-decoration: none; }
.wres .wt-n a:hover { text-decoration: underline; }
.wres .ws { display: flex; gap: 6px; font-size: 12px; color: var(--muted); min-width: 0; }
.wres .we { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }   /* only the name truncates */
.wres .wy { flex: none; white-space: nowrap; font-family: var(--font-mono); }
.pager { display: flex; gap: 8px; margin-top: 14px; }

/* ---------- errors ---------- */
.err { max-width: 560px; margin: 48px auto; text-align: center; }
.err .code { margin: 8px 0 0; font: 700 13px/1 var(--font-mono); letter-spacing: .1em; color: var(--muted); }
.err h1 { margin: 6px 0 10px; }
.err-search { max-width: 560px; margin: 0 auto 24px; }

@media (max-width: 720px) {
  .hero { margin-top: 14px; }
  .hero .examples { display: none; }                    /* the lede and the example stay: they say what this is */
  .hero .lede { margin: 8px auto 10px; font-size: 15px; }
  .agent-strip code { font-size: 11.5px; }
  /* the day jumps and the hub filter are one swipeable row each on phones (pills, not data tables) */
  .week ol, .hub-filter { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: calc(-1 * var(--gutter));
    margin-right: calc(-1 * var(--gutter)); padding: 2px var(--gutter); scroll-padding: 0 var(--gutter); }
  .week ol::-webkit-scrollbar, .hub-filter::-webkit-scrollbar { display: none; }
  .week li, .hub-filter li { flex: none; }
  .wall .key { font-size: 12px; gap: 2px 12px; }
  .facts { margin-top: 10px; gap: 2px 12px; }
  .wall-tools { margin-left: 0; width: 100%; }
  .mkt-note { max-width: none; }
  .settled { grid-template-columns: minmax(0, 1fr); }
  .ents { grid-template-columns: minmax(0, 1fr); }
  /* the leaderboard fits a 320 px screen: who spoke moves under the word, the Who and Last-10 columns go */
  .lb .hide-sm { display: none; }
  .lb .who-sm { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; color: var(--muted); }
  .lb th, .lb td { padding: 8px 6px; }
  .lb th:first-child { padding-left: 10px; }
  .s-filters label { flex: 1 1 140px; min-width: 0; }
  .s-filters input[type="date"] { min-width: 0; width: 100%; }
  .s-filters select, .s-filters input { width: 100%; }
  .subs .seg { display: flex; }
  .subs .seg a { white-space: normal; }
  .day-h h2, .day-h h3 { font-size: 16px; }
}
@media (max-width: 560px) {
  .lb .prob .pb { display: none; }                      /* the % and n stay; the bar is decoration */
}

/* ---------- launch review pass (lr/pages) ---------- */
.hero .lede a { color: inherit; text-decoration-color: var(--line-2); }
.hero-ex { margin: -8px auto 18px; font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; justify-content: center;
  align-items: baseline; gap: 4px 14px; }
.hero-ex .ex { display: inline-flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 2px 6px;
  padding: 6px 12px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2);
  text-decoration: none; }
.hero-ex .ex:hover { border-color: var(--focus); color: var(--ink); }
.hero-ex .ex-p { color: var(--muted); font-size: 13px; }       /* history first; p small (never a tip) */
.hero-ex .ex-h { color: var(--ink-2); }
.hero-ex .ex svg { align-self: center; }
.hero-ex .ex-what { color: var(--muted); }
.agent-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 12px; margin: 14px 0 0;
  font-size: 13px; color: var(--muted); }
.agent-strip .as-l { font-weight: 650; color: var(--ink-2); }
.agent-strip code { min-width: 0; max-width: 100%; padding: 3px 8px; border-radius: 6px; background: var(--surface-3);
  color: var(--ink); white-space: normal; overflow-wrap: anywhere; word-break: break-word; }
.hero-ex .ex { max-width: 100%; }
.agent-strip a { color: var(--muted); }
.later { margin-top: 26px; }
.later-h { font-size: 17px; margin: 0 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.later-l { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ld-r { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; padding: 10px 14px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line); scroll-margin-top: 80px; }
.ld-d { display: inline-flex; align-items: baseline; gap: 10px; text-decoration: none; color: var(--ink); }
.ld-d b { font: 600 15px/1.2 var(--font-head); }
.ld-d .n { font-size: 13px; color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
.ld-w { font-size: 13px; color: var(--muted); min-width: 0; overflow-wrap: anywhere; }
.is-filtered .later { display: none; }

/* search (DES-20, FV-06): whole names, the speaker's mark on word cards, the asked word page first */
.searchpage .ents .en a, .searchpage .ents .es { white-space: normal; overflow: visible; }
.wres li > .ei { flex: none; align-self: flex-start; margin-top: 2px; }
.wres .wt-n { flex: 1; }
.wres .ws { flex-wrap: wrap; gap: 0 8px; }
.wres .we { white-space: normal; overflow: visible; }
.ask-card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r-lg); background: var(--surface);
  border: 1px solid var(--focus); color: var(--ink); text-decoration: none; font: 600 16px/1.3 var(--font-head); }
.ask-card:hover { box-shadow: var(--shadow); }
.ask-card svg:last-child { margin-left: auto; color: var(--link); }

/* ---------- T3: the hero's proof line, 'Recently settled' after today's tiles ---------- */
.hero-ex.proof .ex { text-align: center; }
.hero-ex .ex-a { color: var(--ink); font-weight: 700; }
.hero-ex .ex-e { display: inline-flex; align-items: center; gap: 4px; color: var(--pos); font-weight: 600; }
.hero-ex .ex-clip { align-self: center; }
.st-day .day-h { align-items: center; }
.st-day .day-h .btn.sm { margin-left: auto; }
.st-day .settled { margin-top: 2px; }

/* ---------- T10: 'Show N more today' (details/summary, no JS). Wide screens show every tile in the grid ---------- */
/* details.fold, never the cards' tr.fold rows (components.event_tile: phones fold a card after 3 words) */
details.fold > summary { list-style: none; cursor: pointer; justify-self: start; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold[open] > summary { display: none; }
details.fold > .tile + .tile, details.fold > summary + .tile { margin-top: 16px; }
@media (min-width: 601px) {               /* without ::details-content the button stays, across the row (H4) */
  details.fold { grid-column: 1 / -1; }
}
/* only browsers that can lay a details' content out in the parent grid unfold it (Chrome 131+, Safari 18.4+,
   Firefox 143+); older ones keep 'Show N more today', which works without JS */
@supports selector(::details-content) {
  @media (min-width: 601px) {
    details.fold { display: contents; }
    details.fold > summary { display: none; }
    details.fold::details-content { display: contents; content-visibility: visible; }
    details.fold > .tile + .tile, details.fold > summary + .tile { margin-top: 0; }
  }
  /* a hub filter (wall.js) shows every matching tile, folded or not */
  .is-filtered details.fold { display: contents; }
  .is-filtered details.fold > summary { display: none; }
  .is-filtered details.fold::details-content { display: contents; content-visibility: visible; }
  .is-filtered details.fold > .tile + .tile, .is-filtered details.fold > summary + .tile { margin-top: 0; }
}

/* ---------- T10: the home under 600 px ---------- */
.agent-strip .as-mcp, .agent-strip .as-go, .key-phone { display: none; }
.agent-strip .as-go svg { vertical-align: -1px; margin-left: 3px; }
@media (max-width: 720px) {
  .hero .examples { display: flex; justify-content: center; margin-top: 6px; }     /* two Try chips (T10) */
  .hero .examples .pill:nth-of-type(n+3) { display: none; }
}
@media (max-width: 600px) {
  .home .key-wide { display: none; }
  .home .key-phone { display: block; margin: 12px 0 0; }
  .home .section.wall { margin-top: 16px; }
  .home .wall .section-h { margin-bottom: 8px; }
  .home .wall .week { margin: 0 0 6px; }             /* one swipeable row of day jumps */
  .home .wall .hub-filter { margin-top: 0; }
  .home .wall .day:first-of-type { margin-top: 8px; }
  .hero { margin-top: 10px; }
  .hero h1 { font-size: 24px; letter-spacing: -.025em; }
  .hero .search.big { min-height: 48px; }
  .hero .search.big input { height: 46px; font-size: 17px; }
  .hero .lede { margin: 6px auto 10px; font-size: 14.5px; line-height: 1.45; }
  .hero-ex { margin: 0 auto 10px; gap: 4px 12px; font-size: 13px; }
  .hero-ex .ex { padding: 6px 10px; border-radius: var(--r-lg); column-gap: 5px; }
  .hero-ex .ex > svg:last-child { display: none; }                  /* the whole pill is the link */
  /* the proof line flows as one text, the chip right after it: a long question shares its last line with the
     answer, and the explainer moves to the lede's 'mention markets' link (H5: the first tile stays above 600 px) */
  .hero-ex.proof { display: block; line-height: 1.6; }
  .hero-ex.proof .ex { display: inline; padding: 0; border: 0; border-radius: 0; background: none; }
  .hero-ex.proof .ex-q { color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line-2);
    text-underline-offset: 3px; }
  .hero-ex.proof .ex-a { white-space: nowrap; }
  .hero-ex.proof .ex-e { display: inline; }
  .hero-ex.proof .ex-e svg { vertical-align: -2px; margin-right: 3px; }
  .hero-ex.proof .ex-clip { min-height: 26px; margin-left: 4px; vertical-align: middle; }
  .hero-ex.proof .ex-what { display: none; }
  .agent-strip { flex-wrap: nowrap; gap: 0; margin-top: 8px; white-space: nowrap; }
  .agent-strip code, .agent-strip .btn, .agent-strip .as-guide { display: none !important; }
  .agent-strip .as-l::after { content: ":"; }
  .agent-strip .as-mcp { display: inline; margin-left: 6px; }
  .agent-strip a + a::before { content: "·"; display: inline-block; margin: 0 7px; color: var(--muted); text-decoration: none; }
  .agent-strip .as-go { display: inline; }
  .facts { flex-wrap: nowrap; gap: 0; margin-top: 6px; }
  .facts .f-x { display: none; }
  .facts .f-ev::before { content: "·"; margin: 0 8px; color: var(--muted); }
  .home .wall-h { row-gap: 6px; }
  /* the title, the Markets toggle and Export share one row: the 'All N' pill carries the count and the toggle
     reads 'Show prices' (room for the day jumps with the first tile above 600 px) */
  .home .wall-h .sub[data-count], .home .mkt-w { display: none; }
  .home .wall-h h2 { font-size: 20px; margin-right: auto; }
  .home .wall-tools, .home .wall-tools .mkt-bar { display: contents; }
  .home .wall-tools .mkt-note { order: 3; flex-basis: 100%; }      /* prices on: the note is the next row */
}
@media (max-width: 400px) {
  .hero .lede { margin: 4px auto 8px; }
  .hero-ex { margin-bottom: 8px; }
}
@media (max-width: 360px) {
  .hero h1 { font-size: 20px; }                           /* one line at 320 px */
  .hero-ex { font-size: 12.5px; }
  .home .wall .week { display: none; }   /* the day headers and 'Later this week' carry the days: first tile <= 600 px */
}
