/* public-mobile.css -- phone overflow fixes for public pages (ORDER MOB-08).
   Linked last in web/public_base.html <head>, so it follows every page sheet.
   No colour values; desktop untouched: every rule sits inside max-width:560px.
   Each rule is scoped to one page's own container, never to bare tags site-wide.
   Measured 2026-09-23 at 390px: /partners 666, /contributors 703, and two
   articles 617 (unbreakable URLs) and 731 (wide table). */
@media (max-width:560px) {
  /* web/learning_article.html -- .la-body wraps the rendered article HTML */
  .la-body { overflow-wrap:anywhere; }
  .la-body table { display:block; max-width:100%; overflow-x:auto; }
  /* fix pass 1: cells inherit anywhere and shrink to split words mid-letter;
     normal keeps the table at natural width and the block above scrolls it */
  .la-body table { overflow-wrap:normal; }
  .la-body img, .la-body video, .la-body iframe { max-width:100%; height:auto; }

  /* web/stub_partners.html -- the grid sets repeat(3, 1fr) inline */
  .zone-cards { grid-template-columns:minmax(0,1fr) !important; }
  .zone-cards > * { min-width:0; }

  /* web/stub_contributors.html -- value.css .contrib-who sets 6 columns with no
     phone override, and outranks the 2-column phone rule in researchers.css */
  .contrib-who .res-profiles-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .contrib-who .res-profiles-grid > * { min-width:0; }
}

/* MOB-12 -- nested-box fix, /value + contributor pages */
/* Measured 2026-09-23 at 390px: median paragraph 244 (/value), 247 (/contributors).
   Cause: .public-main 32px + page container 24px + card 24-37px, stacked.
   Target: page edge 16px, each card 14px, wrappers 0. Borders and fills kept. */
@media (max-width:560px) {
  /* page containers: pull back half of .public-main's 32px, drop their own pad */
  .value-page, .contrib-page { margin-left:-16px; margin-right:-16px; padding-left:0; padding-right:0; }

  /* web/stub_value.html -- cards */
  .value-page .value-hero-stage, .value-page .value-tiers-cta, .value-page .value-panel,
  .value-page .readout, .value-page .value-quad { padding-left:14px; padding-right:14px; }
  .value-page .tier-card { padding-left:14px; padding-right:14px; }
  .value-page .tier-card-face { margin-left:-14px; margin-right:-14px; padding-left:14px; padding-right:14px; }
  .value-page .tier-card-band { margin-left:-14px; margin-right:-14px; padding-left:14px; padding-right:14px; }

  /* /value steps 1-6: one column; connector line and chevron hidden, circles kept */
  .value-page .dossier-chain { grid-template-columns:1fr; }
  .value-page .dossier-chain { row-gap:22px; }
  .value-page .chain-link, .value-page .chain-link + .chain-link { padding-left:0; padding-right:0; }
  .value-page .chain-link::before, .value-page .chain-link::after { display:none; }

  /* /value confidence ring: .readout-gauge also holds the label, so the svg is the ring box */
  .value-page .readout-gauge svg { width:min(220px,100%); max-width:100%; aspect-ratio:1/1; height:auto; }

  /* web/stub_contributors.html -- cards */
  .contrib-page .value-hero-stage, .contrib-page .contrib-ask-inner, .contrib-page .contrib-q,
  .contrib-page > section.contrib-apply-sec,
  .contrib-page .contrib-apply-form .contributor-signup { padding-left:14px; padding-right:14px; }
  .contrib-page .contrib-col-settled { padding-left:14px; }

  /* pillar checkboxes: the grid is 2 columns inline; items may shrink */
  #contributor-pillars-group { grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
  #contributor-pillars-group > label { min-width:0; overflow-wrap:anywhere; }

  /* fix pass 1: .value-hero-fig is width:100% + 10px pad + border (content-box), 22px
     past its column; the old 24px stage pad hid it, the 14px pad clips it. auto fits. */
  .value-page .value-hero-fig, .contrib-page .value-hero-fig { width:auto; }
}
