/* chart-post.css — one stylesheet for all 39 Chart Insights posts.
   Type and spacing are McKinsey's own, measured off the 241 reference exhibits
   in docs/specs (their Illustrator template ships a guide layer that names the
   vertical rhythm outright) and off the live article shell:

     exhibit title (Glance)      23px / 700
     unit of measure (caption)   17px / 400
     everything inside a chart   14.5px          <- the floor; nothing smaller
     called-out figures          20px
     footnote + source           15px  (the site's label/meta tier)
     Glance -> unit 35   unit -> exhibit 25   exhibit -> footnote 25

   Figures are set in Medium (500), which is what makes McKinsey's numbers read
   heavier than the words around them. */

.siPost{
  --col: 1022px;            /* reading column */
  --exhibit: 1072px;        /* the column. Text and exhibit share one width, so
                               every left AND right edge on the page lines up */
  --measure: 1072px;        /* one measure for the whole post */
  --navy: #051C2C;
  --ink: #051C2C;
  --body: #333333;
  --note: #656565;
  --rule: #D6DBDE;
  --sans: 'McKinsey Sans','Inter','Helvetica Neue',Arial,'Noto Sans SC','Noto Sans CJK SC','PingFang SC','Microsoft YaHei',sans-serif;
  --serif: 'Spectral','Noto Serif SC',Georgia,'Songti SC',serif;
  /* the whole post wraps greedily; see docs/specs/换行修正.html */
  word-break: normal; overflow-wrap: normal;
  /* the post sits in the site's own container, so its left edge is the one the
     main website, the white papers and the annual reports all stand on */
  width: 100%;
  max-width: var(--max, 1200px);
  margin: 0 auto;
  padding: 0 var(--gutter, clamp(20px, 5vw, 64px)) 8px;
  box-sizing: border-box;
  font-family: var(--sans);
  color: var(--body);
  -webkit-font-smoothing: antialiased;
}
.siPost *{ box-sizing: border-box; }

/* ---- cover -------------------------------------------------------------
   Lifted from the white papers and annual reports so a chart post opens the
   same way: navy ground, a blue glow off the top-right and a cyan one off the
   bottom-left, serif headline. The one thing that differs from those documents
   is that every chart cover is the SAME height — their covers vary because the
   text inside them does, and across a run of chart posts that reads as sloppy.
   The description that used to sit here now opens the white body below. */
.postHead{
  position: relative; overflow: hidden;
  margin: 0 calc(50% - 50vw) clamp(40px, 5vw, 64px);
  padding: 0 calc(50vw - 50%);
  background: var(--navy);
  /* 540px is the white papers' own cover height, and it is the smallest value
     that still holds the longest headline in either language at 78px, so all
     39 covers come out the same height rather than following their text */
  min-height: 540px;
  display: flex; align-items: center;
  color: #fff;
}
/* The glows are contained by the cover and fade out BEFORE its top edge.
   They used to be oversized boxes hung off the corners (top:-25%, height:130%),
   so `overflow:hidden` cut the gradient mid-slope at y=0 — and because the
   sticky header directly above is opaque navy, that cut printed as a hard
   horizontal line from about two-thirds across to the right edge, with a
   visible corner where it began. Measured, the step was 32 levels with no
   transition at all. Anchoring each gradient inside the box and letting it
   reach zero before the top edge removes the seam without moving the light.
   `rgba(colour,0)` rather than `transparent`, so the fade cannot run through
   grey on the way out. */
.coverGlow{
  position: absolute; inset: 0;
  background: radial-gradient(58% 82% at 84% 52%, rgba(34,81,255,.28), rgba(34,81,255,0) 60%);
  z-index: 1; pointer-events: none;
}
.coverGlow.cy{
  background: radial-gradient(50% 76% at 4% 98%, rgba(0,169,244,.16), rgba(0,169,244,0) 64%);
}
.coverInner{ position: relative; z-index: 2; width: 100%; padding: 48px 0; }
.eyebrow{
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0 0 22px; font-family: 'Inter', var(--sans);
  font-size: 15px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: #00A9F4;
}
.eyebrow::before{
  content: ""; display: inline-block; width: 28px; height: 1px; background: #00A9F4;
}
.siPost h1{
  margin: 0;
  font-family: var(--serif);
  /* The white papers' and annual reports' cover headline, value for value —
     all three families were taken down together on 2026-09-17 from
     clamp(44px, 6.8vw, 78px) to McKinsey's own ceiling, measured off their
     pages. Raised on 2026-09-17 from McKinsey's own 52px ceiling to 64 so the
     page title clears the 44px section headings — the hierarchy step McKinsey
     gets from its narrower column. 40px on a phone, 51 at 1024, 64 at 1440. */
  font-size: clamp(40px, calc(3.6vw + 14px), 64px); line-height: .98; font-weight: 600;
  letter-spacing: 0; color: #fff;
  /* docs/specs/换行修正.html: greedy wrapping, not keep-all. keep-all treats a
     run of Chinese as one unbreakable token, so the line can only break at
     punctuation and wraps long before the box is full. Headings also drop their
     text measure and use the column they sit in. */
  max-width: none; max-inline-size: none;
  white-space: normal; text-wrap: wrap;
  word-break: normal; overflow-wrap: normal; line-break: strict;
}
.siPost:lang(en) h1{ letter-spacing: -.02em; }

/* ---- opening paragraph, on white ---------------------------------------
   Set in the site sans at a flat 20px/1.6 — McKinsey's own chart-page body
   setting, measured off mckinsey.com/featured-insights/charts, where the
   paragraph holds 20px at every width rather than scaling with the window
   (Steven, 2026-09-17). It used to run in the white papers' serif at
   clamp(19px, 1.85vw, 25px), which made a multi-sentence paragraph read as an
   oversized pull statement and sat above every other paragraph role on the
   site: service pages and white-paper section leads are clamp(17,1.5vw,21). */
.postLead{ margin: 0 0 clamp(38px, 4.5vw, 56px); max-width: none; }
.postLead p{
  margin: 0 0 16px; font-family: var(--sans);
  font-size: 20px; line-height: 1.6; font-weight: 400;
  color: var(--ink); letter-spacing: -.005em;
  /* prose: greedy too, with an emergency break for genuinely long tokens */
  white-space: normal; text-wrap: wrap;
  word-break: normal; overflow-wrap: break-word; line-break: strict;
}
.postLead p:last-child{ margin-bottom: 0; }
.postLead em{ font-style: normal; color: #5C6B74; }

/* ---- exhibit ------------------------------------------------------------ */
.exhibit{ margin: 0; padding: 0; }
/* Sizes follow docs/specs/修改字号.html, the project's own font-size rule:
   .exTitle clamp(20,2.3vw,29) · .exUnit 15 · source and signature 15, and
   nothing anywhere is allowed below 14px; the label tier was lifted to the
   site's 15px on 2026-09-17 so notes, sources and eyebrows match the white
   papers, the annual reports and the service pages. */
.exTitle{
  margin: 0; max-width: none; max-inline-size: none;
  font-size: clamp(20px, 2.3vw, 29px); line-height: 1.32; font-weight: 700; color: var(--ink);
  white-space: normal; text-wrap: wrap;
  word-break: normal; overflow-wrap: normal; line-break: strict;
}
.exUnit{
  margin: 18px 0 0; max-width: none; max-inline-size: none;
  font-size: 15px; line-height: 1.5; font-weight: 400; color: var(--body);
  white-space: normal; text-wrap: wrap;
  word-break: normal; overflow-wrap: break-word; line-break: strict;
}
/* The graphic takes exactly the column, like everything else on the page: it
   used to break out to 1172px, which put its rules ~100px past the right margin
   the notes, source and signature stop at. Below the column it scrolls rather
   than shrinking, so the 14.5px floor inside the chart survives a narrow window
   instead of collapsing to unreadable. */
.exArt{ margin: 14px 0 0; width: 100%; overflow-x: auto; }
.exArt svg{ min-width: min(var(--exw, 1072px), 900px); }
.exArt svg{ display: block; width: 100%; height: auto; overflow: visible;
  font-family: var(--sans); }
.exFoot{ margin: 25px 0 0; max-width: var(--exhibit); }
.exNote,.exSource{
  margin: 0 0 6px; font-size: 15px; line-height: 1.62; font-weight: 400; color: var(--note);
  white-space: normal; text-wrap: wrap;
  word-break: normal; overflow-wrap: break-word; line-break: strict;
}
.exSource{ margin-bottom: 0; }
.exFoot :last-child{ margin-bottom: 0; }

/* ---- signature ---------------------------------------------------------- */
.exSign{
  display: flex; align-items: center; gap: 9px; max-width: var(--exhibit);
  margin: 22px 0 0; padding: 14px 0 0; border-top: 1px solid var(--rule);
}
.exSign img{ width: 22px; height: 22px; object-fit: contain; flex: none; }
.exSign span{ font-size: 15px; font-weight: 600; letter-spacing: .01em; color: var(--ink); }

@media (max-width: 900px){
  .exArt{ width: 100%; }
}
@media (max-width: 760px){
  .postHead{ min-height: 320px; }
  .coverInner{ padding: 34px 0; }
  .siPost h1{ font-size: 40px; }
  .exTitle{ font-size: 20px; }
  .intro p{ font-size: 18px; line-height: 1.62; }

}
@media print{
  .siPost{ padding: 0; }
  .postHead{ color: #000; background: none; min-height: 0; margin: 0 0 24px; padding: 0; }
  .coverGlow{ display: none; }
  .coverInner{ padding: 0; }
  .siPost h1{ color: #000; }
}


/* ---------------------------------------------------------------------------
   Phone: the chart scales down instead of scrolling sideways.
   The exhibit SVG used to keep a 900px floor and scroll, which meant a reader
   on a phone saw a third of the chart at a time and had to swipe for the rest.
   Letting it take the column shows the whole chart at once; it is vector, so
   pinching in restores every label at full sharpness.
   --------------------------------------------------------------------------- */
@media (max-width:760px){
  .exArt{ overflow-x:visible; }
  .exArt svg{ min-width:0; }
}
