/* ==========================================================================
   Site chrome: skip link, masthead, main menu (with dropdowns), breadcrumbs,
   footer. Loaded on every page, including the commitments tracker, so the
   header and footer look the same everywhere. Fonts are set explicitly so
   page stylesheets can't change them.
   ========================================================================== */

:root {
	--cr-blue: #1601AE;
	--cr-ink: #16004C;
	--cr-gold: #FFBD4E;
	--cr-red: #F1140C;
	--cr-pale: #E8EFFF;
	--cr-sans: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--cr-wrap: 1200px;
	--cr-gut: 32px;
}
@media (max-width: 600px) { :root { --cr-gut: 16px; } }

.cr-skip { position: absolute; left: 12px; top: -60px; z-index: 200; padding: 10px 16px; background: var(--cr-gold); color: var(--cr-ink); font-family: var(--cr-sans); font-weight: 700; text-decoration: none; }
.cr-skip:focus { top: 12px; }

/* ---------- Masthead ---------- */
.cr-mast { position: relative; z-index: 50; max-width: var(--cr-wrap); margin: 0 auto; padding: 22px var(--cr-gut); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; font-family: var(--cr-sans); }
.cr-brand { display: inline-flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; font-family: var(--cr-sans); font-weight: 800; font-size: 18px; line-height: 1; letter-spacing: .01em; text-transform: uppercase; }
.cr-brand:hover, .cr-brand:focus { color: #fff; text-decoration: none; }
/* The name is stacked in two lines that together are exactly as tall as the NYC logo. */
.cr-brand img { display: block; width: auto; height: 36px; }
.cr-brand .name, .cr-brand .name span { display: block; line-height: 1; }

/* ---------- Main menu ---------- */
.cr-nav { font-family: var(--cr-sans); font-size: 14px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.cr-menu, .cr-sub { list-style: none; margin: 0; padding: 0; }
.cr-menu { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; }
.cr-menu > li { position: relative; display: flex; align-items: center; gap: 4px; }
.cr-nav a { display: inline-block; padding: 6px 0; color: #fff; text-decoration: none; font: inherit; letter-spacing: inherit; }
.cr-nav a:hover { color: var(--cr-gold); text-decoration: underline; text-underline-offset: 4px; }
.cr-nav a[aria-current="page"], .cr-nav .is-current > a, .cr-nav .is-ancestor > a { color: var(--cr-gold); }
.cr-sub-toggle { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; margin: 0; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #fff; cursor: pointer; }
.cr-sub-toggle:hover { background: rgba(255,255,255,.15); }
.cr-sub-toggle svg { transition: transform .15s ease; }
.cr-sub-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.is-ancestor > .cr-sub-toggle, .is-current > .cr-sub-toggle { color: var(--cr-gold); }

/* Dropdown panel */
.cr-sub { position: absolute; top: calc(100% + 10px); left: -16px; min-width: 240px; padding: 8px 0; background: #fff; border: 4px solid var(--cr-blue); box-shadow: 8px 8px 0 var(--cr-gold); text-transform: none; letter-spacing: 0; font-size: 16px; font-weight: 700; }
.cr-sub[hidden] { display: none; }
.cr-sub::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; } /* keeps hover alive across the gap */
.cr-sub a { display: block; padding: 10px 20px; color: var(--cr-ink); }
.cr-sub a:hover, .cr-sub a:focus { color: var(--cr-blue); background: var(--cr-pale); text-decoration: none; }
.cr-sub a[aria-current="page"] { color: var(--cr-blue); box-shadow: inset 4px 0 0 var(--cr-red); }
/* Hover opening is done in nav.js, so the button always reports the real state
   and Escape can close what the mouse opened. */
.cr-sub.is-flip { left: auto; right: -16px; }
.cr-menu > li > .cr-sub { overflow-y: auto; overscroll-behavior: contain; }

/* A heading item (URL "#"): the label is the button. */
.cr-sub-toggle.is-label { width: auto; height: auto; min-height: 28px; gap: 8px; padding: 6px 0; border-radius: 0; font: inherit; letter-spacing: inherit; text-transform: inherit; }
.cr-sub-toggle.is-label:hover { background: transparent; color: var(--cr-gold); }
.is-ancestor > .cr-sub-toggle.is-label { color: var(--cr-gold); }

/* Inside a dropdown: a group that opens in place, indented under its item. */
.cr-sub-row { display: flex; align-items: center; justify-content: space-between; gap: 4px; padding-right: 10px; }
.cr-sub-row > a { flex: 1 1 auto; min-width: 0; }
.cr-sub .cr-sub-toggle { flex: none; width: 32px; height: 32px; color: var(--cr-ink); }
.cr-sub .cr-sub-toggle:hover { background: var(--cr-pale); color: var(--cr-blue); }
.cr-sub .cr-sub-toggle.is-label { display: flex; width: 100%; justify-content: space-between; min-height: 0; padding: 10px 20px; color: var(--cr-ink); text-align: left; }
.cr-sub .cr-sub-toggle.is-label:hover { background: var(--cr-pale); color: var(--cr-blue); }
.cr-sub .is-ancestor > .cr-sub-row > a, .cr-sub .is-ancestor > .cr-sub-toggle.is-label { color: var(--cr-blue); }
.cr-sub-in { position: static; min-width: 0; margin: 0 0 6px 20px; padding: 0; border: 0; border-left: 3px solid var(--cr-gold); box-shadow: none; font-size: 15px; }
.cr-sub-in::before { display: none; }
.cr-sub-in a { padding: 8px 16px; }
.cr-nav .cr-sub-toggle:focus-visible { outline: 3px solid var(--cr-gold); outline-offset: 2px; }
.cr-sub a:focus-visible, .cr-sub .cr-sub-toggle:focus-visible { outline: 3px solid var(--cr-blue); outline-offset: -3px; box-shadow: none; }

/* Mobile: a Menu button opens the list as a full-screen layer. Without JS the list just shows. */
.cr-menu-toggle { display: none; align-items: center; gap: 10px; min-height: 44px; padding: 0 4px; border: 0; background: transparent; color: #fff; font: 800 15px/1 var(--cr-sans); letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.cr-menu-toggle[aria-expanded="true"] { color: var(--cr-gold); }
@media (max-width: 900px) {
	.cr-js .cr-menu-toggle { display: inline-flex; }
	.cr-js .cr-nav { flex-basis: 100%; }
	.cr-js .cr-nav[data-open="false"] { display: none; }
	/* Open: the masthead becomes a full-screen layer, so the page underneath does not move. */
	.cr-js .cr-mast.is-open { position: fixed; inset: 0; z-index: 300; max-width: none; margin: 0; align-content: flex-start; background: var(--cr-blue); overflow-y: auto; overscroll-behavior: contain; }
	.cr-menu-open, .cr-menu-open body { overflow: hidden; }
	.cr-menu { flex-direction: column; align-items: stretch; gap: 0; padding: 8px 0 4px; border-top: 1px solid rgba(255,255,255,.3); }
	.cr-menu > li { flex-wrap: wrap; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,.18); }
	.cr-nav a { padding: 14px 0; font-size: 16px; }
	.cr-sub-toggle { width: 44px; height: 44px; }
	.cr-sub { position: static; flex-basis: 100%; min-width: 0; margin: 0 0 12px; padding: 0 0 0 16px; background: transparent; border: 0; border-left: 3px solid var(--cr-gold); box-shadow: none; font-size: 15px; }
	.cr-sub::before { display: none; }
	.cr-sub a { padding: 10px 12px; color: #fff; }
	.cr-sub a:hover, .cr-sub a:focus { color: var(--cr-gold); background: transparent; }
	.cr-sub a[aria-current="page"] { color: var(--cr-gold); box-shadow: none; }
	.cr-menu > li > .cr-sub { max-height: none !important; overflow: visible; }
	.cr-sub.is-flip { right: auto; }
	.cr-sub-toggle.is-label { min-height: 44px; padding: 0; }
	.cr-menu > li.is-heading > .cr-sub-toggle.is-label { flex: 1 1 auto; justify-content: space-between; padding-right: 16px; }
	.cr-sub-row { padding-right: 0; }
	.cr-sub .cr-sub-toggle { width: 44px; height: 44px; color: #fff; }
	.cr-sub .cr-sub-toggle:hover { background: rgba(255,255,255,.15); color: #fff; }
	.cr-sub .cr-sub-toggle.is-label { width: 100%; padding: 0 16px 0 12px; color: #fff; }
	.cr-sub .cr-sub-toggle.is-label:hover { background: transparent; color: var(--cr-gold); }
	.cr-sub .is-ancestor > .cr-sub-row > a, .cr-sub .is-ancestor > .cr-sub-toggle.is-label { color: var(--cr-gold); }
	.cr-sub-in { margin: 0 0 8px 12px; padding-left: 12px; border-left-color: rgba(255,189,78,.7); font-size: 15px; }
	.cr-sub-in a { padding: 10px 12px; }
	.cr-sub a:focus-visible, .cr-sub .cr-sub-toggle:focus-visible { outline-color: var(--cr-gold); }
}
@media (max-width: 600px) {
	.cr-mast { gap: 12px; }
	.cr-brand { gap: 10px; font-size: 15px; }
	.cr-brand img { height: 30px; }
	.cr-menu-toggle { font-size: 14px; }
}

/* ---------- Breadcrumbs ---------- */
.cr-crumb { position: relative; max-width: var(--cr-wrap); margin: 0 auto; padding: 0 var(--cr-gut); font-family: var(--cr-sans); font-size: 14px; font-weight: 600; line-height: 1.5; letter-spacing: 0; color: #fff; }
.cr-crumb a, .cr-crumb span { font: inherit; color: #fff; }
.cr-crumb a:hover { color: var(--cr-gold); }
.cr-crumb .sep { padding: 0 8px; opacity: .7; }

/* ---------- Footer ---------- */
.cr-foot { margin-top: 104px; background: var(--cr-blue); color: #fff; font-family: 'IBM Plex Serif', Georgia, serif; }
.cr-foot .in { max-width: var(--cr-wrap); margin: 0 auto; padding: 64px var(--cr-gut) 48px; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; }
.cr-foot .about { margin: 20px 0 0; max-width: 260px; font-size: 15px; line-height: 1.6; color: var(--cr-pale); }
.cr-foot h2 { margin: 0 0 12px; font-family: var(--cr-sans); font-weight: 800; font-size: 14px; line-height: 1.3; letter-spacing: .08em; text-transform: uppercase; color: var(--cr-gold); text-shadow: none; }
.cr-foot ul { margin: 0; padding: 0; list-style: none; font-size: 16px; line-height: 1.4; }
.cr-foot li a { display: inline-block; padding: 6px 0; color: #fff; text-decoration: none; }
.cr-foot li a:hover { color: #fff; text-decoration: underline; }
.cr-foot .base { border-top: 1px solid rgba(255,255,255,.25); }
.cr-foot .base > div { max-width: var(--cr-wrap); margin: 0 auto; padding: 20px var(--cr-gut) 28px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; font-size: 13px; color: var(--cr-pale); }
.cr-foot .base a { color: var(--cr-pale); }
.cr-foot .links { display: flex; flex-wrap: wrap; gap: 20px; }
.cr-stripes { display: inline-flex; gap: 6px; }
.cr-stripes span { width: 28px; height: 10px; }

.sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Dropdown groups: full width, indented, a shade lighter per level ----------
   No side rule. Each deeper group fills the panel's width, its items step in,
   and its background lightens a little more. */
.cr-sub-in { margin: 0; padding: 0; border: 0; background: #F4F7FF; }
.cr-sub-in a { padding: 9px 20px 9px 36px; }
.cr-sub-in .cr-sub-row { padding-right: 10px; }
.cr-sub-in .cr-sub-in { background: #FAFBFF; }
.cr-sub-in .cr-sub-in a { padding-left: 52px; }
@media (max-width: 900px) {
	.cr-menu > li > .cr-sub { flex: 0 0 calc(100% + 2 * var(--cr-gut)); max-width: none; margin: 0 calc(-1 * var(--cr-gut)); padding: 0; border: 0; background: rgba(255,255,255,.07); }
	.cr-menu > li > .cr-sub > li > a, .cr-menu > li > .cr-sub > li > .cr-sub-toggle.is-label { padding-left: calc(var(--cr-gut) + 16px); }
	.cr-menu > li > .cr-sub > li > .cr-sub-row { padding-left: calc(var(--cr-gut) + 4px); padding-right: calc(var(--cr-gut) - 12px); }
	.cr-menu > li > .cr-sub > li > .cr-sub-toggle.is-label { padding-right: var(--cr-gut); }
	.cr-sub a { padding-top: 12px; padding-bottom: 12px; }
	.cr-sub-row > a { padding-left: 12px; }
	.cr-sub-in { margin: 0; padding: 0; border: 0; background: rgba(255,255,255,.07); }
	.cr-sub-in a { padding: 12px var(--cr-gut) 12px calc(var(--cr-gut) + 32px); }
	.cr-sub-in .cr-sub-in a { padding-left: calc(var(--cr-gut) + 48px); }
}
