/* The redesigned header and footer (layouts/site/header + footer) on the Bootstrap pages.
   Everything is scoped under .cs-shell so neither Bootstrap nor custom.css leaks in, and
   nothing here leaks out. Values mirror the kit's (system.css) at the same tokens. */
.cs-shell {
  --bg: #f7f7f1; --surface: #eceee4; --ink: #16241c; --muted: #56635a; --action: #0b7a3e; --action-ink: #f7f7f1;
  --line: rgb(22 36 28 / .13); --line-strong: rgb(22 36 28 / .3);
  --font-display: "Red Hat Display", system-ui, sans-serif; --font-text: "Red Hat Text", system-ui, sans-serif;
  --gut: 80px; --nav: 72px; --r: 8px;
  font-family: var(--font-text); color: var(--ink); display: contents;
}
@media (max-width: 1023px) { .cs-shell { --gut: 48px; } }
@media (max-width: 639px) { .cs-shell { --gut: 24px; --nav: 56px; } }
.cs-shell *, .cs-shell *::before, .cs-shell *::after { box-sizing: border-box; }
.cs-shell .wrap { width: min(100% - 2 * var(--gut), 1280px); margin-inline: auto; }
.cs-shell a { text-decoration: none; color: inherit; }
.cs-shell ul { list-style: none; margin: 0; padding: 0; }
.cs-shell h2, .cs-shell h3, .cs-shell p { margin: 0; }

/* buttons */
.cs-shell .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: var(--r);
  border: 1px solid transparent; font: 500 15px/1 var(--font-text); white-space: nowrap; cursor: pointer; box-shadow: none;
  transition: background-color .2s ease, transform .12s ease; }
.cs-shell .btn--primary { background: var(--action); color: var(--action-ink); }
.cs-shell .btn--primary:hover { background: #096634; color: var(--action-ink); }
.cs-shell .btn--primary::after { content: "→"; transition: transform .2s ease; }
.cs-shell .btn--primary:hover::after { transform: translateX(3px); }
.cs-shell .btn:active { transform: translateY(1px) scale(.985); }

/* header */
.cs-shell header.nav { position: sticky; top: 0; z-index: 1030; height: var(--nav); background: var(--bg); border-bottom: 1px solid var(--line);
  display: block; padding: 0; margin: 0; flex-wrap: nowrap; }
.cs-shell .nav__bar { height: 100%; display: flex; align-items: center; gap: 48px; }
.cs-shell .skip-link { position: absolute; left: -9999px; }
.cs-shell .skip-link:focus { left: var(--gut); top: 8px; background: var(--bg); padding: 8px 12px; z-index: 2; }
.cs-shell .cs-logo { display: inline-flex; align-items: center; flex: none; }
.cs-shell .cs-logo img { height: 40px; width: auto; display: block; }
.cs-shell .nav__links { display: flex; justify-content: center; gap: 4px; flex: 1; align-self: stretch; }
.cs-shell .nav__item { display: flex; align-items: center; }
.cs-shell .nav__link { position: relative; display: inline-flex; align-items: center; height: 36px; padding: 0 12px; font-size: 15px; font-weight: 500; color: var(--ink); white-space: nowrap; }
.cs-shell .nav__link::before, .cs-shell .nav__link[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -2px; height: 2px; border-radius: 2px; background: currentColor; }
.cs-shell .nav__link::before { transform: scaleX(0); transform-origin: right; transition: transform .2s ease; }
.cs-shell .nav__link:hover::before { transform: scaleX(1); transform-origin: left; }
.cs-shell .nav__actions { display: flex; align-items: center; gap: 16px; flex: none; }
.cs-shell .nav__toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--bg); color: var(--ink); align-items: center; justify-content: center; }
@media (max-width: 1023px) {
  .cs-shell .nav__bar { gap: 16px; }
  .cs-shell .nav__links { display: none; }
  .cs-shell .nav__actions { margin-left: auto; }
  .cs-shell .nav__toggle { display: inline-flex; }
  .cs-shell header.nav.is-open .nav__links { display: flex; flex-direction: column; position: fixed; inset: var(--nav) 0 0 0; background: var(--bg); padding: 16px var(--gut); gap: 0; z-index: 1031; }
  .cs-shell header.nav.is-open .nav__link { height: 56px; font-size: 18px; padding: 0; border-bottom: 1px solid var(--line); width: 100%; }
}
@media (max-width: 639px) { .cs-shell .nav__actions > .nav__link { display: none; } .cs-shell .cs-logo img { height: 34px; } }

/* footer */
.cs-shell footer.closing { background: var(--ink); color: var(--bg); padding: 120px 0 24px; margin: 0; --line: rgb(247 247 241 / .16); --muted: #b1b8ae; }
.cs-shell footer.closing > .wrap { display: grid; gap: 96px; }
.cs-shell .closing__cta { display: grid; gap: 32px; }
.cs-shell .closing__cta h2 { font: 400 clamp(32px, 2.2vw + 16px, 52px)/1.05 var(--font-display); letter-spacing: -0.025em; color: var(--bg); }
.cs-shell .closing__cta .section-head { display: grid; gap: 16px; }
.cs-shell .closing__cta p { font-size: 20px; line-height: 1.5; color: var(--bg); }
.cs-shell .btn--xl { width: 100%; height: clamp(64px, 3vw + 40px, 88px); justify-content: space-between; padding: 0 48px; background: var(--bg); color: var(--ink);
  font: 400 clamp(22px, .95vw + 18px, 32px)/1 var(--font-display); letter-spacing: -0.025em; }
.cs-shell .btn--xl:hover { background: #fff; color: var(--ink); }
.cs-shell .btn--xl::after { content: none; }
.cs-shell .btn--xl .m-arrow { width: .62em; height: .62em; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.cs-shell .closing__links { display: grid; gap: 48px; }
.cs-shell .closing__links .grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; }
.cs-shell .span-4 { grid-column: span 4; } .cs-shell .span-2 { grid-column: span 2; }
.cs-shell .stack-4 { display: grid; gap: 16px; align-content: start; }
.cs-shell .cs-logo--inverse { background: var(--bg); border-radius: 6px; padding: 4px 12px; justify-self: start; }
.cs-shell .cs-logo--inverse img { height: 44px; }
.cs-shell .footer__lede { font: 400 20px/1.35 var(--font-display); max-width: 30ch; color: var(--bg); }
.cs-shell .footer__col h3 { font: 500 13px/1.3 var(--font-text); color: var(--muted); margin-bottom: 12px; letter-spacing: 0; }
.cs-shell .footer__col li { font-size: 14px; line-height: 1.45; padding: 4px 0; color: var(--bg); }
.cs-shell .footer__col a:hover { text-decoration: underline; text-underline-offset: 3px; }
.cs-shell .cs-address { color: var(--muted); max-width: 26ch; }
.cs-shell .footer__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 24px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.cs-shell .footer__legal a:hover { color: var(--bg); }
@media (max-width: 1023px) { .cs-shell .span-4 { grid-column: 1 / -1; } .cs-shell .span-2 { grid-column: span 3; } }
@media (max-width: 639px) {
  .cs-shell footer.closing { padding-top: 96px; }
  .cs-shell .span-2 { grid-column: span 6; }
  .cs-shell .btn--xl { padding: 0 24px; }
  .cs-shell .footer__col li { padding: 0; } .cs-shell .footer__col a { display: inline-flex; min-height: 44px; align-items: center; }
}
.cs-shell .cs-towns-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px 24px; font-size: 14px; }
@media (max-width: 1023px) { .cs-shell .cs-towns-row { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.cs-shell .cs-towns-row a { color: var(--bg); }
.cs-shell .cs-towns-row a:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 639px) { .cs-shell .cs-towns-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; } .cs-shell .cs-towns-row a { min-height: 44px; display: inline-flex; align-items: center; } }
.cs-shell .footer__legal { align-items: center; }
.cs-shell .cs-devby { margin-left: auto; }
.cs-shell .cs-devby a { color: var(--bg); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgb(247 247 241 / .35); }
@media (max-width: 639px) { .cs-shell .cs-devby { margin-left: 0; flex-basis: 100%; } }
.cs-shell .cs-legal { display: flex; flex-wrap: wrap; gap: 0 20px; } .cs-shell .cs-legal a { color: inherit; }

/* the Jobs menu on the Bootstrap pages: hover or focus opens the full-width panel; the phone sheet lists its links */
.cs-shell .nav__item { position: static; }
.cs-shell .nav__link .chev { width: 12px; height: 12px; margin-left: 4px; opacity: .6; }
.cs-shell .nav__menu { position: absolute; left: 0; right: 0; top: 100%; background: var(--bg); border-bottom: 1px solid var(--line); padding: 32px 0 40px;
  opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .12s ease, transform .12s ease, visibility 0s linear .12s; }
@media (min-width: 1024px) {
  .cs-shell .nav__item:hover > .nav__menu, .cs-shell .nav__item:focus-within > .nav__menu { opacity: 1; visibility: visible; transform: none; transition-delay: .15s, .15s, 0s; }
}
.cs-shell .nav__menu .grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; }
.cs-shell .nav__menu .span-3 { grid-column: span 3; }
.cs-shell .menu-col { display: grid; gap: 4px; align-content: start; }
.cs-shell .menu-col .t-label { font-size: 13px; font-weight: 500; color: var(--muted); margin: 0 0 8px; }
.cs-shell .menu-col a { display: grid; gap: 2px; padding: 6px 0; font-size: 15px; font-weight: 500; color: var(--ink); }
.cs-shell .menu-col a span { font-weight: 400; color: var(--muted); font-size: 13px; }
.cs-shell .menu-col a:hover { color: var(--action); }
@media (max-width: 1023px) {
  .cs-shell header.nav.is-open .nav__links { overflow-y: auto; }
  .cs-shell header.nav.is-open .nav__item { display: block; }
  .cs-shell header.nav.is-open .nav__menu { position: static; opacity: 1; visibility: visible; transform: none; padding: 8px 0 16px; border: 0; }
  .cs-shell header.nav.is-open .nav__menu .grid { grid-template-columns: 1fr 1fr; gap: 8px 16px; }
  .cs-shell header.nav.is-open .nav__menu .span-3 { grid-column: span 1; }
  .cs-shell header.nav.is-open .menu-col a { min-height: 44px; font-size: 16px; }
}
