/* INS-116 (v0.28.0): the global shell. One header and one footer, identical on every page.
   Load after /css/tokens_v2.css. Selectors are classes only (no ids, no element-only rules) so a page sheet
   cannot restyle the shell by accident, and the landing page's #mm-b3 scope never reaches it.
   Option B, two tiers: a 64px global bar, then on Insights a 44px sub-nav and the cut read-out.
   The lockup is the production file, referenced, never redrawn. Its colours are brand, not tokens. */

.mn-gbar, .mn-subnav, .mn-cut, .mn-cutpanel, .mn-foot { font-family: var(--f-body), Arial, sans-serif; color: var(--ink); }
.mn-gbar *, .mn-subnav *, .mn-cut *, .mn-cutpanel *, .mn-foot * { box-sizing: border-box; }
.mn-gbar a, .mn-subnav a, .mn-foot a { text-decoration: none; }
.mn-shell-in { max-width: var(--content-max); margin: 0 auto; padding: 0 clamp(16px, 3vw, 30px); }

/* ---------- tier 1: global bar, 64px ---------- */
.mn-gbar { position: relative; z-index: 40; height: 64px; margin: 0; background: var(--page); border-bottom: 1px solid var(--line); }
.mn-gbar .mn-shell-in { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.mn-lockup { display: inline-flex; align-items: center; flex: none; }
.mn-lockup img { display: block; height: 26px; width: auto; max-width: none; }
.mn-gnav { display: flex; align-items: center; gap: 22px; font-size: 13px; font-weight: 600; }
.mn-gnav > a { color: var(--muted); white-space: nowrap; }
.mn-gnav > a:hover, .mn-gnav > a[aria-current="page"] { color: var(--ink); }
.mn-gnav > a[aria-current="page"] { font-weight: 700; }
.mn-gcta { display: inline-flex; align-items: center; gap: 8px; padding: 11px 16px; border-radius: var(--r-btn); background: var(--raccoon); font: 700 13px/1.2 var(--f-body), Arial, sans-serif; white-space: nowrap; }
.mn-gnav > a.mn-gcta, .mn-gnav > a.mn-gcta:hover { color: var(--page); }
.mn-gcta .arr { font-size: 15px; margin: 0; }

/* Signed-in: avatar and its menu. The menu hangs from the bar, so nothing clips it. */
.mn-who { position: relative; }
.mn-avatar { width: 36px; height: 36px; border: 0; border-radius: 50%; padding: 0; background: var(--afftile); color: var(--affglyph);
  display: flex; align-items: center; justify-content: center; font: 700 12px var(--f-body), Arial, sans-serif; cursor: pointer; }
.mn-who-menu { position: absolute; right: 0; top: calc(100% + 10px); z-index: 50; min-width: 240px; display: grid; gap: 6px; padding: 14px 16px;
  background: var(--page); border: 1px solid var(--line); border-radius: var(--r-panel); box-shadow: 0 8px 24px color-mix(in srgb, var(--ink) 8%, transparent); font-size: 14px; font-weight: 400; }
.mn-who-menu .who-label { font-size: 12px; font-weight: 600; color: var(--muted); }
.mn-who-menu .who-org { font-weight: 600; color: var(--ink); }
.mn-who-menu .who-out { color: var(--ink); font-weight: 600; }
/* INS-100: the organization id, copied out of this menu and pasted into the workbook. */
.mn-who-menu .who-id { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-nav); padding: 7px 10px; cursor: pointer; text-align: left; }
.mn-who-menu .who-id:hover { border-color: var(--inputline); }
.mn-who-menu .who-id code { font-weight: 600; font-size: 13px; font-family: var(--f-data), Arial, sans-serif; }
.mn-who-menu .who-id span { font-size: 12px; color: var(--muted); }
.mn-who-menu .who-hint { font-size: 12px; color: var(--muted); line-height: 1.35; }

/* ---------- tier 2: Insights sub-nav, 44px ---------- */
/* Active is bold only: no underline, no border, no fill. The hidden ::after reserves the bold width so
   switching views does not shift the row. */
.mn-subnav { position: sticky; top: 0; z-index: 30; height: 44px; background: var(--page); border-bottom: 1px solid var(--line); }
.mn-subnav .mn-shell-in { height: 100%; display: flex; align-items: center; gap: 26px; overflow-x: auto; scrollbar-width: none; }
.mn-subnav .mn-shell-in::-webkit-scrollbar { display: none; }
.mn-subnav a { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; font-size: 14px; font-weight: 500; color: var(--muted); white-space: nowrap; flex: none; }
.mn-subnav a::after { content: attr(data-label); height: 0; overflow: hidden; visibility: hidden; font-weight: 700; user-select: none; pointer-events: none; }
.mn-subnav a:hover { color: var(--ink); }
.mn-subnav a[aria-current="page"] { font-weight: 700; color: var(--ink); }

/* ---------- the cut: a read-out, then one trigger ---------- */
.mn-cut { background: var(--surface); border-bottom: 1px solid var(--line); }
.mn-cut .mn-shell-in { min-height: 52px; display: flex; align-items: center; gap: 10px 18px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.mn-cut-k { font: 800 10px/1.5 var(--f-display), Arial, sans-serif; letter-spacing: .115em; text-transform: uppercase; color: var(--soft); flex: none; }
.mn-cut-read { flex: 1 1 320px; min-width: 0; margin: 0; font-size: 14px; line-height: 1.45; color: var(--ink); }
.mn-cut-read .sep { color: var(--soft); margin: 0 .45em; }
.mn-cut-read .n { font-family: var(--f-data), Arial, sans-serif; font-weight: 600; white-space: nowrap; }
.mn-cut-read .low { color: var(--alertink); }
.mn-cut-btn { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border: 1px solid var(--inputline); border-radius: var(--r-btn);
  background: var(--page); color: var(--ink); font: 600 13px var(--f-body), Arial, sans-serif; cursor: pointer; flex: none; }
.mn-cut-btn:hover { border-color: var(--ink); }
.mn-cut-btn .ic { width: 14px; height: 14px; transition: transform .15s; }
.mn-cut-btn[aria-expanded="true"] .ic { transform: rotate(180deg); }

.mn-cutpanel { background: var(--page); border-bottom: 1px solid var(--line); }
.mn-cutpanel[hidden] { display: none; }
.mn-cutpanel .mn-shell-in { padding-top: 18px; padding-bottom: 20px; display: grid; gap: 16px; }
.mn-cutgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px 16px; margin: 0; padding: 0; border: 0; min-width: 0; }
.mn-cutgrid legend { padding: 0; margin-bottom: 8px; font-size: 12px; font-weight: 700; color: var(--ink); }
.mn-field { display: grid; gap: 5px; min-width: 0; font-size: 12px; font-weight: 600; color: var(--muted); }
.mn-sel { position: relative; display: block; }
.mn-sel .ic { position: absolute; right: 12px; top: 50%; width: 12px; height: 12px; margin-top: -6px; color: var(--muted); pointer-events: none; }
.mn-field select { appearance: none; -webkit-appearance: none; width: 100%; height: 38px; padding: 0 32px 0 12px; border: 1px solid var(--inputline); border-radius: var(--r-btn);
  background: var(--page); font: 500 14px var(--f-body), Arial, sans-serif; color: var(--ink); cursor: pointer; }
.mn-field select:disabled { color: var(--soft); background-color: var(--surface); cursor: not-allowed; }
.mn-cutfoot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.mn-cutlock { margin: 0; font-size: 13px; color: var(--vanillaink); background: var(--vanilla); border: 1px solid var(--vanillaline); padding: 8px 12px; border-radius: var(--r-btn); }
.mn-cutreset { background: none; border: 0; padding: 4px 0; font: 600 13px var(--f-body), Arial, sans-serif; color: var(--ink); cursor: pointer; }
.mn-cutreset:hover { color: var(--muted); }

/* ---------- footer: one footer, every page ---------- */
/* Fixes from the live footer: legal links had no gap ("PrivacyTermsCreative Commons"); the logo stretched to
   its column (flex column + stretch); the grid was 1.3fr / 1fr (599 / 461). Now four equal columns. */
.mn-foot { background: var(--page); border-top: 1px solid var(--line); }
.mn-foot .mn-shell-in { padding-top: 40px; padding-bottom: 24px; }
.mn-foot-main { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.mn-foot-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; min-width: 0; }
.mn-foot-brand img { display: block; height: 22px; width: auto; max-width: 100%; }
.mn-foot-brand p { margin: 0; font-size: 13px; line-height: 1.55; color: var(--muted); max-width: 260px; }
.mn-foot-col { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; font-size: 13px; }
.mn-foot-col h2 { margin: 0 0 4px; font: 700 13px/1.3 var(--f-display), Arial, sans-serif; letter-spacing: -.01em; color: var(--ink); }
.mn-foot-col a { color: var(--muted); }
.mn-foot-col a:hover { color: var(--ink); }
.mn-foot-bottom { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; font-size: 12px; color: var(--soft); }

@media (max-width: 900px) {
  .mn-foot-main { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mn-foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 740px) {
  .mn-gnav { gap: 14px; }
  .mn-gnav > a.mn-gtext { display: none; }
  .mn-gcta { padding: 9px 12px; font-size: 12px; }
  .mn-lockup img { height: 22px; }
  .mn-subnav .mn-shell-in { gap: 20px; }
}
@media (max-width: 560px) {
  .mn-foot-main { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
}
@media (max-width: 400px) {
  .mn-lockup img { height: 18px; }
  .mn-gcta { padding: 8px 10px; }
}
