/* ============================================================
   McKinsey-MX — the house style for the Mexico project
   White paper, black ink, McKinsey exhibit discipline,
   Mexican flag green + red as the only accents.
   Clean sans everywhere (Inter), including bold headlines,
   exactly like McKinsey — built for maximum readability.
   The one tweak vs. McKinsey: a hairline green section rule.

   For the hosted site this loads real webfonts; inside a
   Claude Artifact (which blocks font CDNs) the system-font
   fallbacks in the stacks take over automatically.
   ============================================================ */

/* Webfonts — hosted site only (Artifacts fall back to system stacks).
   One clean sans (Inter) for body and headlines, McKinsey-style. */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root{
  /* ground + ink — McKinsey-exact */
  --bg:#ffffff;            /* white page (Alan's call) */
  --paper:#ffffff;
  --paper-2:#f5f4ef;       /* faint warm gray — table headers, strips */
  --paper-3:#eceae4;
  --ink:#141414;           /* headings */
  --ink-2:#2f2f2f;         /* body */
  --mut:#4d4d4d;           /* captions, labels — darkened so the mono layer is readable, not decorative */

  /* Mexican flag accents — the only color on the page */
  --green:#0a7d4d;         /* primary accent: links, exhibit numbers, positive */
  --green-d:#075b38;
  --green-bg:#e7f2ec;
  --red:#c8102e;           /* emphasis, negative, alert */
  --red-bg:#f8e8ea;
  --amber:#a6791a;         /* neutral / watch (use sparingly) */
  --amber-bg:#f5eeda;

  /* rules */
  --line:#e6e6e2;
  --line-2:#ccccc6;

  /* type — one clean sans, McKinsey-style. --serif is kept as the "display"
     token so every heading flips in one place; it now resolves to Inter. */
  --serif:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",system-ui,sans-serif;
  --sans:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",system-ui,sans-serif;
  --mono:"IBM Plex Mono","SF Mono",ui-monospace,Menlo,Consolas,monospace;

  --measure:66ch;
  --maxw:1120px;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;background:var(--bg);color:var(--ink-2);
  font-family:var(--sans);font-size:18px;line-height:1.62;
  -webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;
}
h1,h2,h3,h4{font-family:var(--serif);color:var(--ink);font-weight:700;line-height:1.16;margin:0;text-wrap:balance;letter-spacing:-.014em}
p{margin:0}
a{color:var(--green);text-decoration:none}
a:hover{text-decoration:underline;text-underline-offset:2px}
a:focus-visible,button:focus-visible{outline:2.5px solid var(--green);outline-offset:2px}
::selection{background:var(--green);color:#fff}

.wrap{max-width:var(--maxw);margin:0 auto;padding:0 clamp(18px,4vw,44px)}
.col{max-width:var(--measure)}
.mono{font-family:var(--mono)} .tnum{font-variant-numeric:tabular-nums}
.eyebrow{font-family:var(--mono);font-size:12px;letter-spacing:.09em;text-transform:uppercase;color:var(--mut)}

/* section head — the signature hairline green rule is the tweak */
.section-head{border-top:2px solid var(--green);padding-top:14px;margin-bottom:14px}
.section-head .no{font-family:var(--mono);font-size:12px;color:var(--green);font-weight:600;letter-spacing:.04em}
.section-head h2{font-size:clamp(22px,3.2vw,32px);margin-top:6px}
.section-head .dek{color:var(--ink-2);font-size:16px;margin-top:8px;max-width:66ch}

/* THE EXHIBIT — copied from McKinsey, kept exactly: numbered,
   conclusion-title, units, footnotes, Source line with links. */
.exhibit{border:1px solid var(--line-2);background:var(--paper);border-radius:4px;overflow:hidden}
.exhibit .ex-head{padding:16px 22px 2px}
.exhibit .ex-no{font-family:var(--mono);font-size:10.5px;letter-spacing:.1em;text-transform:uppercase;color:var(--green);font-weight:600}
.exhibit .ex-title{font-family:var(--serif);font-weight:700;font-size:19px;line-height:1.25;margin-top:5px;color:var(--ink);max-width:80ch}
.exhibit .ex-units{font-family:var(--mono);font-size:11.5px;color:var(--mut);margin-top:6px}
.exhibit .ex-body{padding:10px 22px 6px}
.exhibit .ex-foot{border-top:1px solid var(--line);margin-top:8px;padding:11px 22px 15px}
.exhibit .ex-fn{font-size:11.5px;color:var(--mut);line-height:1.5}
.exhibit .ex-src{font-family:var(--mono);font-size:10.5px;color:var(--mut);margin-top:7px}
.exhibit .ex-src a{color:var(--green)}

/* verdict / status chips — green good, red concern, amber neutral */
.chip{display:inline-block;font-family:var(--mono);font-size:10px;letter-spacing:.05em;text-transform:uppercase;padding:2px 8px;border-radius:3px;font-weight:600;white-space:nowrap}
.chip.g{background:var(--green-bg);color:var(--green-d)}
.chip.r{background:var(--red-bg);color:var(--red)}
.chip.a{background:var(--amber-bg);color:var(--amber)}

/* tables — McKinsey clean: hairline rules, mono header */
table.mck{border-collapse:collapse;width:100%;font-size:14px}
table.mck th,table.mck td{text-align:left;padding:10px 14px;border-bottom:1px solid var(--line);vertical-align:top}
table.mck thead th{font-family:var(--mono);font-size:10px;letter-spacing:.06em;text-transform:uppercase;color:var(--mut);background:var(--paper-2)}
table.mck td.k{font-weight:600;color:var(--ink);white-space:nowrap}

.tblwrap{overflow-x:auto}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}}

/* ============================================================
   SITE CHROME — masthead, nav, footer. ONE source of truth;
   the header/footer components render these and pages no longer
   hand-copy them (which is how the nav ended up in 7 versions
   and two footers dropped Economy + About). The masthead + footer
   share the page's .wrap width, so the header finally aligns with
   the body on every page.
   ============================================================ */
/* masthead — identical on every page; solid white, fixed height, nothing animated */
header.mast{position:sticky;top:0;z-index:50;background:#fff;border-bottom:1px solid var(--line)}
header.mast .wrap{display:flex;align-items:center;justify-content:space-between;gap:12px;height:52px;padding-top:0;padding-bottom:0;max-width:1180px}
.brand{font-family:var(--serif);font-weight:600;font-size:17px;color:var(--ink);letter-spacing:-.01em;white-space:nowrap;text-decoration:none}
.brand:hover{text-decoration:none}
.brand .u{border-bottom:2px solid var(--green);padding-bottom:1px}
.mnav{display:flex;align-items:center;gap:22px;font-family:var(--mono);font-size:12px}
.mnav a{color:var(--mut);text-decoration:none;text-transform:uppercase;letter-spacing:.05em;white-space:nowrap}
.mnav a:hover{color:var(--ink)}
.mnav a.here{color:var(--ink);font-weight:600;text-decoration:underline;text-decoration-color:var(--green);text-decoration-thickness:2px;text-underline-offset:7px}
.mnav a.cta{color:var(--green-d);border:1px solid var(--green-d);border-radius:2px;padding:5px 10px}
.mnav a.cta:hover{background:var(--green-d);color:#fff}
.mnav a.cta.here{background:var(--green-d);color:#fff;text-decoration:none}
/* menu button — shown only on narrow screens, where the links collapse into a drop panel */
.navtoggle{display:none;flex-direction:column;justify-content:center;gap:4px;width:34px;height:30px;padding:0;background:none;border:0;cursor:pointer}
.navtoggle span{display:block;width:20px;height:2px;background:var(--ink);border-radius:2px}
@media(max-width:1000px){
  .navtoggle{display:flex}
  .mnav{display:none;position:absolute;top:100%;left:0;right:0;flex-direction:column;align-items:stretch;gap:0;background:#fff;border-bottom:1px solid var(--line);padding:2px clamp(18px,4vw,44px) 10px;box-shadow:0 12px 30px rgba(20,20,20,.09)}
  .navtoggle[aria-expanded="true"] ~ .mnav{display:flex}
  .mnav a{padding:12px 2px;font-size:13px;border-bottom:1px solid var(--line)}
  .mnav a:last-child{border-bottom:0}
  .mnav a.here{text-decoration:none;color:var(--green-d)}
  .mnav a.cta{border:0;border-radius:0;padding:12px 2px;color:var(--green-d);font-weight:600}
  .mnav a.cta:hover,.mnav a.cta.here{background:none;color:var(--green-d)}
}
/* the live "dateline" — the freshness stamp, now homepage CONTENT (a hero element),
   never chrome. Chrome never animates; the pulse lives on the page. */
.dateline{display:inline-flex;align-items:center;gap:7px;font-family:var(--mono);font-size:11px;text-transform:uppercase;letter-spacing:.05em;color:var(--mut);text-decoration:none}
.dateline:hover{color:var(--green-d)}
.dateline .dot{width:6px;height:6px;border-radius:50%;background:var(--green);animation:lp 2.4s ease-in-out infinite}
@keyframes lp{0%,100%{opacity:1}50%{opacity:.3}}
@media(prefers-reduced-motion:reduce){.dateline .dot{animation:none}}

/* narrow reading pages (about, model prose) share one width token */
.reading .wrap{max-width:820px}

/* footer — one component, same nav as the header */
footer.foot{border-top:1px solid var(--line);margin-top:56px}
footer.foot .wrap{padding-top:18px;padding-bottom:54px}
.foot .fnav{display:flex;flex-wrap:wrap;gap:6px 18px;margin-bottom:12px}
.foot .fnav a{font-family:var(--mono);font-size:11px;text-transform:uppercase;letter-spacing:.03em;color:var(--green)}
.foot .fblurb{font-family:var(--mono);font-size:11px;color:var(--mut);line-height:1.7;max-width:66ch;margin:0}
