:root {
  --pulse-navy: #082b4e;
  --pulse-red: #df1b2b;
  --pulse-muted: #50677f;
  --pulse-line: #d9e3eb;
  --pulse-paper: #fff;
  --pulse-wash: #f4f8fb;
}

/* Privacy and analytics consent */
.pulse-consent-banner{position:fixed;z-index:6000;right:24px;bottom:24px;left:184px;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:24px;align-items:center;width:min(860px,calc(100vw - 208px));padding:20px 22px;border:1px solid #9fb3c4;border-left:5px solid #c83335;border-radius:15px;color:#0b2d50;background:#fff;box-shadow:0 18px 50px rgba(7,35,62,.2);font-family:Arial,Helvetica,sans-serif}
.pulse-consent-banner[hidden]{display:none}
.pulse-consent-copy{display:grid;grid-template-columns:34px minmax(0,1fr);gap:13px;align-items:start}
.pulse-consent-icon{width:31px;height:31px;fill:none;stroke:#1768aa;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.pulse-consent-copy strong{display:block;font:700 22px/1.05 Georgia,"Times New Roman",serif;outline:none}
.pulse-consent-copy p{max-width:580px;margin:6px 0 5px;color:#52677d;font-size:13px;line-height:1.45}
.pulse-consent-copy a{color:#075da8;font-size:12px;font-weight:800;text-underline-offset:3px}
.pulse-consent-actions{display:flex;gap:9px;align-items:center}
.pulse-consent-actions button{min-height:42px;padding:10px 14px;border:1px solid #9fb3c4;border-radius:8px;color:#0b2d50;background:#fff;font:800 12px/1 Arial,Helvetica,sans-serif;cursor:pointer;white-space:nowrap}
.pulse-consent-actions button:hover,.pulse-consent-actions button:focus-visible{border-color:#1768aa;outline:3px solid rgba(29,110,181,.16);outline-offset:2px}
.pulse-consent-actions button.primary{border-color:#c83335;color:#fff;background:#c83335}
.pulse-footer-menu button[data-open-cookie-settings]{width:max-content;margin:0;padding:0;border:0;color:#53687c;background:transparent;font:inherit;text-align:left;cursor:pointer}
.pulse-footer-menu button[data-open-cookie-settings]:hover{text-decoration:underline;text-underline-offset:3px}

@media (max-width: 900px) {
  .pulse-consent-banner{right:10px;bottom:78px;left:10px;grid-template-columns:1fr;gap:14px;width:auto;padding:17px 16px;border-radius:13px}
  .pulse-consent-copy{grid-template-columns:29px minmax(0,1fr);gap:10px}
  .pulse-consent-icon{width:27px;height:27px}
  .pulse-consent-copy strong{font-size:20px}
  .pulse-consent-copy p{font-size:12px}
  .pulse-consent-actions{display:grid;grid-template-columns:1fr 1fr}
  .pulse-consent-actions button{white-space:normal}
}
@media (max-width: 380px) {
  .pulse-consent-banner{bottom:74px;padding:14px 13px}
  .pulse-consent-copy{grid-template-columns:1fr}
  .pulse-consent-icon{display:none}
}
.pulse-staging-banner {
  position: sticky;
  top: 0;
  z-index: 6000;
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 7px 18px;
  color: #fff;
  background: #8b2e85;
  font: 12px/1.25 Arial, Helvetica, sans-serif;
  text-align: center;
}
.pulse-staging-banner strong { letter-spacing: .5px; text-transform: uppercase; }
.pulse-staging .pulse-header { top: 34px; }
.pulse-header {
  position: sticky;
  top: 0;
  z-index: 5000;
  display: grid;
  grid-template-columns: 330px 1fr 190px;
  align-items: center;
  min-height: 70px;
  padding: 8px max(24px, calc((100vw - 1430px) / 2));
  border-bottom: 1px solid var(--pulse-line);
  color: var(--pulse-navy);
  background: linear-gradient(90deg, #fff 64%, #f3f8fb);
  font-family: Arial, Helvetica, sans-serif;
}
.pulse-brand {
  display: flex;
  gap: 10px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}
.pulse-brand-mark {
  display: flex;
  width: 42px;
  height: 38px;
  flex: 0 0 42px;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  padding: 6px 7px;
  border-radius: 6px;
  background: var(--pulse-navy);
}
.pulse-brand-mark i,
.pulse-footer-mark i {
  display: block;
  width: 6px;
  border-radius: 4px 4px 1px 1px;
  background: #fff;
}
.pulse-brand-mark i:first-child,
.pulse-footer-mark i:first-child { height: 11px; }
.pulse-brand-mark i:nth-child(2),
.pulse-footer-mark i:nth-child(2) { height: 25px; background: var(--pulse-red); }
.pulse-brand-mark i:last-child,
.pulse-footer-mark i:last-child { height: 17px; }
.pulse-brand b,
.pulse-brand small {
  display: block;
}
.pulse-brand b {
  font-size: 17px;
  line-height: 1.05;
}
.pulse-brand b > span {
  display: block;
  color: var(--pulse-red);
  font-size: 14px;
  letter-spacing: .15px;
}
.pulse-brand small {
  margin-top: 2px;
  color: var(--pulse-muted);
  font-size: 9px;
}
.pulse-desktop-nav {
  display: flex;
  justify-content: center;
  gap: 20px;
}
.pulse-desktop-nav a {
  position: relative;
  padding: 25px 0;
  color: inherit;
  font-size: 12px;
  text-decoration: none;
}
.pulse-desktop-nav a[aria-current="page"] {
  font-weight: 900;
}
.pulse-desktop-nav a[aria-current="page"]:after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 12px;
  left: 0;
  height: 3px;
  background: var(--pulse-red);
}
.pulse-tagline {
  justify-self: end;
  margin: 0;
  font:
    12px/1.35 Georgia,
    "Times New Roman",
    serif;
}
.pulse-trust-strip {
  position: sticky;
  top: 70px;
  z-index: 4999;
  display: flex;
  justify-content: center;
  gap: 22px;
  min-height: 30px;
  padding: 7px 18px;
  border-bottom: 1px solid #c9d9e5;
  color: #29445e;
  background: #edf5fa;
  font:
    700 11px/1.35 Arial,
    Helvetica,
    sans-serif;
  text-align: center;
}
.pulse-trust-strip span + span:before,
.pulse-trust-strip strong:before {
  content: "\2022";
  margin-right: 22px;
  color: #7890a5;
}
.pulse-trust-strip strong {
  color: #9f2028;
}
.pulse-menu-button,
.pulse-mobile-panel {
  display: none;
}
.pulse-overlay {
  display: none;
}
.pulse-shell-open {
  overflow: hidden;
}
.pulse-page {
  --pulse-content-width: 1430px;
}
.pulse-page > .mobile-nav {
  display: none !important;
}
.pulse-page :where(button, a, select, input):focus-visible {
  outline: 3px solid #7db7e8;
  outline-offset: 2px;
}
.pulse-global-footer {
  display: grid;
  grid-template-columns: minmax(270px, .8fr) minmax(600px, 1.7fr);
  gap: 70px;
  width: min(1430px, calc(100% - 56px));
  margin: 0 auto;
  padding: 54px 16px 60px;
  border-top: 1px solid var(--pulse-line);
  color: var(--pulse-navy);
  background: #fff;
  font-family: Arial, Helvetica, sans-serif;
}
.pulse-footer-brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.pulse-footer-brand b, .pulse-footer-brand small { display: block; }
.pulse-footer-brand b { font-size: 20px; }
.pulse-footer-brand small { margin-top: 3px; color: var(--pulse-muted); font-size: 10px; }
.pulse-footer-mark { display: flex; width: 46px; height: 38px; flex: 0 0 46px; align-items: flex-end; justify-content: center; gap: 4px; padding: 6px 8px; border-radius: 6px; background: var(--pulse-navy); }
.pulse-footer-identity p { margin: 24px 0 0; color: var(--pulse-muted); font-size: 11px; line-height: 1.55; }
.pulse-footer-identity strong { color: #243b56; }
.pulse-footer-menu { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.pulse-footer-menu section { display: grid; align-content: start; gap: 10px; }
.pulse-footer-menu h2 { margin: 0 0 8px; font-size: 12px; line-height: 1.2; letter-spacing: 1px; text-transform: uppercase; }
.pulse-footer-menu a { color: var(--pulse-muted); font-size: 12px; text-decoration: none; }
.pulse-footer-menu a:hover { color: var(--pulse-red); text-decoration: underline; text-underline-offset: 4px; }
.footer-lab-signin { grid-column: 1 / -1; display: inline-flex; width: 100%; align-items: center; justify-content: flex-end; gap: 9px; margin-top: 4px; padding-top: 18px; border-top: 1px solid var(--pulse-line); color: #52647a; font-size: 11px; font-weight: 750; text-decoration: none; }
.footer-lab-signin:hover { color: var(--pulse-red); text-decoration: underline; text-underline-offset: 4px; }
.footer-lock-icon { position: relative; display: inline-block; width: 12px; height: 10px; border: 2px solid currentColor; border-radius: 2px; }
.footer-lock-icon::before { position: absolute; bottom: 7px; left: 1px; width: 6px; height: 6px; border: 2px solid currentColor; border-bottom: 0; border-radius: 6px 6px 0 0; content: ""; }
@media (max-width: 900px) {
  .pulse-staging-banner { align-items: flex-start; flex-direction: column; gap: 1px; padding: 7px 14px; text-align: left; }
  .pulse-staging .pulse-header { top: 48px; }
  .pulse-header {
    position: sticky;
    top: 0;
    grid-template-columns: 1fr auto;
    min-height: 62px;
    padding: 8px 14px;
    background: #fff;
    box-shadow: 0 2px 12px #15334d12;
  }
  .pulse-brand-mark {
    width: 34px;
    height: 34px;
  }
  .pulse-brand b {
    font-size: 14px;
  }
  .pulse-brand b > span {
    font-size: 12px;
  }
  .pulse-brand small {
    font-size: 8px;
  }
  .pulse-desktop-nav,
  .pulse-tagline {
    display: none;
  }
  .pulse-trust-strip {
    top: 62px;
    gap: 6px;
    min-height: 28px;
    padding: 6px 10px;
    font-size: 9px;
  }
  .pulse-trust-strip span:nth-child(2) {
    display: none;
  }
  .pulse-trust-strip strong:before {
    margin-right: 6px;
  }
  .pulse-menu-button {
    display: grid;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
  }
  .pulse-menu-button i {
    display: block;
    height: 2px;
    background: var(--pulse-navy);
    transition: 0.2s;
  }
  .pulse-menu-button[aria-expanded="true"] i:first-child {
    transform: translateY(7px) rotate(45deg);
  }
  .pulse-menu-button[aria-expanded="true"] i:nth-child(2) {
    opacity: 0;
  }
  .pulse-menu-button[aria-expanded="true"] i:last-child {
    transform: translateY(-7px) rotate(-45deg);
  }
  .pulse-overlay {
    position: fixed;
    z-index: 4990;
    inset: 90px 0 0;
    display: block;
    visibility: hidden;
    background: #082b4e55;
    opacity: 0;
    transition: 0.2s;
  }
  .pulse-overlay.open {
    visibility: visible;
    opacity: 1;
  }
  .pulse-mobile-panel {
    position: fixed;
    z-index: 4995;
    top: 90px;
    right: 0;
    display: flex;
    flex-direction: column;
    width: min(86vw, 360px);
    height: calc(100dvh - 90px);
    padding: 18px;
    background: #fff;
    box-shadow: -12px 15px 35px #082b4e2b;
    transform: translateX(105%);
    transition: transform 0.22s ease;
  }
  .pulse-mobile-panel.open {
    transform: translateX(0);
  }
  .pulse-mobile-panel nav {
    display: grid;
  }
  .pulse-mobile-panel nav a {
    display: flex;
    justify-content: space-between;
    padding: 15px 8px;
    border-bottom: 1px solid var(--pulse-line);
    color: var(--pulse-navy);
    font-size: 15px;
    font-weight: 750;
    text-decoration: none;
  }
  .pulse-mobile-panel nav a:after {
    content: "→";
  }
  .pulse-mobile-panel nav a[aria-current="page"] {
    color: var(--pulse-red);
  }
  .pulse-mobile-panel footer {
    margin-top: auto;
    padding: 15px 8px;
    color: var(--pulse-muted);
    font-size: 10px;
    line-height: 1.5;
  }
  .pulse-global-footer { display: block; width: 100%; padding: 42px 20px 90px; }
  .pulse-footer-identity p { margin: 20px 0 34px; }
  .pulse-footer-menu { grid-template-columns: 1fr 1fr; gap: 34px 24px; }
  .pulse-footer-menu a { font-size: 13px; }
  .footer-lab-signin { margin-top: 34px; padding-top: 20px; justify-content: flex-start; font-size: 12px; }
}

/* Civic app shell */
.pulse-page {
  min-height: 100vh;
  padding-left: 160px;
  color: var(--pulse-navy);
  background: #f4f7fa;
}
.pulse-header {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 5000;
  display: flex;
  width: 160px;
  min-height: 0;
  padding: 24px 14px 20px;
  border: 0;
  border-right: 1px solid #153e622b;
  color: #fff;
  background: #082b4e;
  box-shadow: 8px 0 28px #082b4e12;
  flex-direction: column;
  align-items: stretch;
}
.pulse-staging .pulse-header { top: 34px; }
.pulse-brand {
  align-items: flex-start;
  gap: 10px;
  color: #fff;
}
.pulse-brand-mark {
  width: 38px;
  height: 38px;
  flex-basis: 38px;
  padding: 7px 6px;
  border: 1px solid #ffffff3d;
  background: #fff;
}
.pulse-brand-mark i { background: var(--pulse-navy); }
.pulse-brand-mark i:nth-child(2) { background: var(--pulse-red); }
.pulse-brand b { font-size: 14px; line-height: 1.14; }
.pulse-brand b > span { margin-top: 2px; color: #f8a9b1; font-size: 12px; }
.pulse-brand small { margin-top: 5px; color: #c4d4e2; font-size: 8px; line-height: 1.3; }
.pulse-desktop-nav {
  display: grid;
  gap: 5px;
  margin-top: 34px;
}
.pulse-desktop-nav a {
  display: grid;
  grid-template-columns: 24px 1fr;
  min-height: 46px;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #dbe7f1;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}
.pulse-desktop-nav a:hover { color: #fff; background: #ffffff12; }
.pulse-desktop-nav a[aria-current="page"] {
  border-color: #2e8bdb;
  color: #fff;
  background: #126bc5;
  box-shadow: 0 8px 18px #001b3499;
}
.pulse-desktop-nav a[aria-current="page"]:after { content: none; }
.pulse-nav-icon,
.pulse-context-icon,
.pulse-menu-icon {
  display: block;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pulse-tagline {
  margin-top: auto;
  padding: 18px 8px 0;
  border-top: 1px solid #ffffff26;
  color: #b9cde0;
  font: 12px/1.45 Georgia, "Times New Roman", serif;
}
.pulse-contextbar {
  position: sticky;
  top: 0;
  z-index: 4800;
  display: flex;
  min-height: 52px;
  align-items: center;
  gap: 24px;
  padding: 8px max(24px, calc((100vw - 160px - 1420px) / 2));
  border-bottom: 1px solid var(--pulse-line);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(14px);
  font: 12px/1.3 Arial, Helvetica, sans-serif;
}
.pulse-staging .pulse-contextbar { top: 34px; }
.pulse-context-place,
.pulse-context-status,
.pulse-contextbar > a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.pulse-context-place { padding-right: 22px; border-right: 1px solid var(--pulse-line); }
.pulse-context-icon { width: 18px; height: 18px; }
.pulse-context-status i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #34a966;
  box-shadow: 0 0 0 4px #e3f5e9;
}
.pulse-context-status span { color: var(--pulse-muted); }
.pulse-contextbar > a {
  margin-left: auto;
  color: #245b93;
  font-weight: 800;
  text-decoration: none;
}
.pulse-trust-strip { display: none; }
.pulse-global-footer {
  width: min(1430px, calc(100% - 48px));
  border-top: 1px solid var(--pulse-line);
  background: transparent;
}
.pulse-bottom-nav { display: none; }

@media (max-width: 900px) {
  .pulse-page { padding-right: 0; padding-bottom: 68px; padding-left: 0; }
  .pulse-desktop-nav,
  .pulse-tagline { display: none; }
  .pulse-header,
  .pulse-staging .pulse-header {
    position: sticky;
    top: 0;
    bottom: auto;
    display: grid;
    width: auto;
    min-height: 66px;
    padding: 8px 14px;
    border-right: 0;
    border-bottom: 1px solid var(--pulse-line);
    color: var(--pulse-navy);
    background: #fff;
    box-shadow: 0 3px 18px #082b4e14;
    grid-template-columns: 1fr auto;
  }
  .pulse-brand { align-items: center; color: var(--pulse-navy); }
  .pulse-brand-mark { width: 38px; height: 38px; flex-basis: 38px; border-color: #d6e2ec; background: var(--pulse-navy); }
  .pulse-brand-mark i { background: #fff; }
  .pulse-brand-mark i:nth-child(2) { background: var(--pulse-red); }
  .pulse-brand b { font-size: 14px; }
  .pulse-brand b > span { color: var(--pulse-red); font-size: 12px; }
  .pulse-brand small { margin-top: 2px; color: var(--pulse-muted); font-size: 8px; }
  .pulse-menu-button {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 10px;
    color: var(--pulse-navy);
    background: #f1f6fa;
  }
  .pulse-menu-icon { width: 25px; height: 25px; }
  .pulse-contextbar {
    top: 66px;
    min-height: 38px;
    gap: 8px;
    padding: 6px 16px;
    background: #edf5fb;
    font-size: 10px;
  }
  .pulse-staging .pulse-contextbar { top: 66px; }
  .pulse-context-place,
  .pulse-context-status span,
  .pulse-contextbar > a span { display: none; }
  .pulse-context-status { gap: 7px; }
  .pulse-contextbar > a { margin-left: auto; }
  .pulse-trust-strip {
    position: static;
    display: flex;
    min-height: 28px;
    gap: 6px;
    padding: 6px 12px;
    font-size: 9px;
  }
  .pulse-trust-strip span:nth-child(2) { display: none; }
  .pulse-overlay { inset: 104px 0 68px; }
  .pulse-mobile-panel {
    top: 104px;
    height: calc(100dvh - 172px);
    padding: 14px;
  }
  .pulse-mobile-panel nav a {
    display: grid;
    grid-template-columns: 28px 1fr auto;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 10px;
  }
  .pulse-mobile-panel nav a:after { content: ""; width: 8px; height: 8px; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: rotate(45deg); }
  .pulse-global-footer { width: 100%; padding-bottom: 96px; }
  .pulse-bottom-nav {
    position: fixed;
    z-index: 5200;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    min-height: 68px;
    padding: 5px max(4px, env(safe-area-inset-right)) max(5px, env(safe-area-inset-bottom)) max(4px, env(safe-area-inset-left));
    border-top: 1px solid var(--pulse-line);
    background: rgba(255,255,255,.97);
    box-shadow: 0 -8px 24px #082b4e1a;
    backdrop-filter: blur(16px);
  }
  .pulse-bottom-nav a,
  .pulse-bottom-nav button {
    display: grid;
    min-width: 0;
    place-items: center;
    gap: 1px;
    padding: 4px 2px;
    border: 0;
    border-radius: 9px;
    color: #264766;
    background: transparent;
    font: 700 9px/1.1 Arial, Helvetica, sans-serif;
    text-decoration: none;
  }
  .pulse-bottom-nav .pulse-nav-icon { width: 22px; height: 22px; }
  .pulse-bottom-nav [aria-current="page"] { color: var(--pulse-red); background: #fff1f2; }
}

/* Shared mobile type scale for public civic stories. Page styles can remain
   smaller, but display headings should not overwhelm the evidence on a phone. */
@media (max-width: 700px) {
  main h1 {
    font-size: clamp(2.3rem, 10.5vw, 2.7rem) !important;
    line-height: 1 !important;
    letter-spacing: -.04em !important;
  }

  .lab-experiments h2,
  .agent-day h2,
  .lab-directory h2,
  .method2-section h2,
  .method2-labels h2,
  .method2-deeper h2,
  .equity2-section-heading h2,
  .equity2-read h2,
  .supply4-section-heading h2,
  .supply4-uneven-intro h2,
  .supply4-reading-guide h2,
  .trends-question-intro h2,
  .trends-record-copy h2,
  .trends-method-note h2,
  .civic-section-heading h2,
  .route-feature-copy h2,
  .roadmap-section h2,
  .subway-home-band h2,
  .evidence-findings > header h2 {
    font-size: clamp(1.75rem, 8vw, 2rem) !important;
    line-height: 1.05 !important;
    letter-spacing: -.03em !important;
  }

  .lab-experiment-card h3,
  .themed-question-grid h2,
  .model-question-grid h2,
  .method2-question-heading h3 {
    font-size: clamp(1.35rem, 6.8vw, 1.7rem) !important;
    line-height: 1.08 !important;
    letter-spacing: -.02em !important;
  }
}
