/* Chilton Engineering: full-width presentation of the preserved site content. */
:root {
  color-scheme: light;
  --brand: #25408e;
  --brand-dark: #20366d;
  --ink: #283548;
  --muted: #627082;
  --line: #e2e7ed;
  --sidebar: #f5f7fa;
  --active: #e9eef9;
  --sidebar-width: 244px;
}

* { box-sizing: border-box; }
html { margin: 0; min-width: 280px; background: #fff; }
html.embedded-document { min-width: 0; }
body {
  margin: 0;
  min-height: 100vh;
  background: #fff;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-text-size-adjust: 100%;
}
button, input, select, textarea { font: inherit; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-dark); }
button { cursor: pointer; }
img { max-width: 100%; height: auto; }
iframe { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #5277c5; outline-offset: 4px; }
.skip-link { position: fixed; z-index: 1000; top: 12px; left: 12px; padding: 8px 14px; transform: translateY(-160%); background: #fff; border: 1px solid var(--brand); }
.skip-link:focus { transform: translateY(0); }

.site-page { display: flex; flex-direction: column; }
.site-header {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  align-items: center;
  width: 100%;
  min-height: 111px;
  margin: 0;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  color: var(--brand);
  text-decoration: none;
}
.brand img { display: block; width: 205px; height: 110px; flex-shrink: 0; }
.service-nav {
  display: flex;
  align-items: stretch;
  gap: clamp(12px, 2vw, 30px);
  min-width: 0;
  padding: 20px clamp(24px, 4vw, 58px);
}
.service-nav a {
  display: flex;
  align-items: center;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 160px;
  padding: 10px 0;
  border-bottom: 2px solid transparent;
  color: #3d4a5c;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  text-decoration: none;
}
.service-nav a:hover,
.service-nav a[aria-expanded="true"] { color: var(--brand); border-bottom-color: var(--brand); }
.menu-toggle { display: none; }

.site-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  flex: 1 0 auto;
  width: 100%;
  min-height: calc(100vh - 111px);
}
.site-nav {
  min-width: 0;
  padding: 28px 14px 36px;
  background: var(--sidebar);
  border-right: 1px solid var(--line);
}
.primary-nav { position: sticky; top: 20px; }
.nav-link {
  display: block;
  padding: 10px 14px;
  border-left: 3px solid transparent;
  color: #4b5869;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
}
.nav-link + .nav-link { margin-top: 3px; }
.nav-link:hover { color: var(--brand); background: #edf1f7; }
.nav-link.active,
.nav-link[aria-current="page"] {
  border-left-color: var(--brand);
  background: var(--active);
  color: var(--brand);
  font-weight: 650;
}
.nav-link.sub-link { padding-left: 25px; font-size: 13px; line-height: 1.5; }
.mobile-services { display: none; }

.main-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: clamp(30px, 4.5vw, 64px) clamp(28px, 4.5vw, 64px) 40px;
  background: #fff;
}
.page-content { width: 100%; max-width: 1200px; margin: 0; }
.page-title {
  max-width: 30ch;
  margin: 0 0 30px;
  color: #223451;
  font-size: clamp(30px, 3vw, 44px);
  font-weight: 620;
  line-height: 1.18;
  letter-spacing: -.035em;
}
.content-body { display: flow-root; min-width: 0; overflow-wrap: break-word; }
.content-body p { margin: 0 0 1.25em; max-width: 86ch; }
.content-body p:empty { display: none; }
.content-body strong, .content-body b { color: #263b59; font-weight: 650; }
.content-body h2 { margin: 1.8em 0 .65em; color: #263b59; font-size: 24px; line-height: 1.3; }
.content-body h3 { margin: 1.5em 0 .6em; color: #263b59; font-size: 20px; line-height: 1.4; }
.content-body ul, .content-body ol { margin: 0 0 1.5em; padding-left: 24px; }
.content-body li { margin: 0 0 .45em; }
.content-body table { max-width: 100%; border-collapse: collapse; }
.content-body td, .content-body th,
.content-body .mainBody, .content-body .list,
.content-body .mainBodyWindow, .content-body .mainBodyEmailWindow {
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  font-style: normal;
  line-height: inherit;
  vertical-align: top;
}
.content-body .mainBodyBold { color: #263b59; font: inherit; font-weight: 650; }
.content-body .style1 { color: #a7b2bf; }
.content-body a { overflow-wrap: anywhere; }

.home-gallery {
  display: grid;
  grid-template-columns: repeat(4, 112px);
  gap: clamp(16px, 2.4vw, 32px);
  align-items: start;
  width: fit-content;
  max-width: 100%;
  margin: 32px 0 20px;
}
.home-gallery figure { margin: 0; min-width: 0; }
.home-gallery img { display: block; width: 112px; height: 164px; }
.project-figure { float: right; width: 150px; margin: 4px 0 24px 32px; }
.project-figure img { display: block; width: 150px; height: 225px; }
.project-figure figcaption,
.content-body .caption,
.content-body .captionRt {
  margin: 10px 0 0;
  color: var(--muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  text-align: left;
}
.clients-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 48px; max-width: 1000px; }
.client-column { min-width: 0; }
.client-column p { line-height: 1.9; }

.service-panel {
  position: relative;
  width: 100%;
  margin: 0 0 36px;
  padding: 20px 0 8px;
  border-top: 2px solid var(--brand);
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 20px;
}
.service-panel-title { max-width: calc(100% - 80px); margin: 0 0 14px; color: #263b59; font-size: 23px; font-weight: 620; line-height: 1.35; }
.service-panel-close {
  position: absolute;
  top: 18px;
  right: 0;
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.service-panel-close:hover { border-color: #a2b0c5; color: var(--brand); }
#service-details { display: block; width: 100%; height: 180px; min-height: 100px; margin: 0; border: 0; background: #fff; }

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  width: 100%;
  margin-top: auto;
  padding: 20px clamp(24px, 4.5vw, 64px);
  border-top: 1px solid var(--line);
  background: #fff;
  color: #748093;
  font-size: 12px;
  line-height: 1.5;
}
.site-footer a { color: #536a93; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.main-content > .site-footer { padding: 22px 0 0; }
.services-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px 28px; }
.service-choice { padding: 16px 0; border-bottom: 1px solid var(--line); text-decoration: none; font-weight: 600; }
.job-back { justify-self: end; margin-right: clamp(20px, 4.5vw, 64px); font-size: 15px; text-decoration: none; }
.job-section + .job-section { margin-top: 22px; }

.service-page { min-height: 0; margin: 0; background: #fff; }
.service-content { width: 100%; max-width: 1040px; margin: 0; padding: clamp(24px, 5vw, 56px); }
.service-content > h1 { margin: 0 0 24px; color: #223451; font-size: clamp(28px, 3vw, 38px); font-weight: 620; line-height: 1.2; letter-spacing: -.025em; }
.service-copy { font-size: 17px; line-height: 1.75; overflow-wrap: break-word; }
.service-copy p { margin: 0 0 1em; }
.service-copy * { max-width: 100%; }
.service-back { display: inline-block; margin-top: 24px; font-size: 14px; }
.service-page.is-embedded .service-content { max-width: none; margin: 0; padding: 0 4px 4px 0; }
.service-page.is-embedded .service-content > h1,
.service-page.is-embedded .service-back { display: none; }
.service-page.is-embedded .service-copy { font-size: 16px; line-height: 1.7; }

.job-page { min-height: 100vh; margin: 0; background: #fff; }
.job-content { width: 100%; max-width: 1000px; margin: 0; padding: clamp(24px, 5vw, 64px); }
.job-content > h1 { margin: 0 0 28px; color: #223451; font-size: clamp(28px, 3vw, 40px); font-weight: 620; line-height: 1.2; letter-spacing: -.025em; }
.job-content p { margin: 0 0 1.25em; }
.job-content .mainBodyBold { color: #263b59; font: inherit; font-weight: 650; }
.job-content .mainBodyWindow,
.job-content .mainBodyEmailWindow,
.job-content .captionRt { color: inherit; font: inherit; line-height: inherit; }
.job-content a { overflow-wrap: anywhere; }
.job-content .job-actions { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 32px; }

@media (min-width: 1800px) {
  :root { --sidebar-width: 272px; }
  .main-content { padding-left: 72px; padding-right: 72px; }
  .site-nav { padding-left: 22px; padding-right: 22px; }
}

@media (max-width: 850px) {
  body { font-size: 16px; line-height: 1.7; }
  .site-header { grid-template-columns: minmax(0, 1fr) auto; min-height: 89px; padding: 0 20px 0 6px; }
  .brand { width: fit-content; justify-content: flex-start; }
  .brand img { width: 164px; height: 88px; }
  .service-nav { display: none; }
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    min-height: 42px;
    padding: 9px 16px;
    border: 1px solid #cbd5e3;
    background: #fff;
    color: var(--brand);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
  }
  .menu-toggle[aria-expanded="true"] { background: var(--active); border-color: #aabbd6; }
  .site-layout { display: block; min-height: calc(100vh - 89px); }
  .site-nav { display: none; padding: 16px 18px 24px; border-right: 0; border-bottom: 1px solid var(--line); }
  .nav-open .site-nav { display: block; }
  .primary-nav { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
  .nav-link, .nav-link.sub-link { margin: 0; padding: 10px 12px; font-size: 14px; line-height: 1.45; }
  .nav-link.sub-link { font-size: 13px; }
  .mobile-services { display: block; margin: 18px 0 0; padding: 16px 0 0; border-top: 1px solid #dce3ed; }
  .mobile-services h2, .mobile-services h3 { margin: 0 0 10px; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; }
  .mobile-services a { display: inline-block; padding: 8px 12px; margin: 0 5px 5px 0; color: var(--brand); font-size: 13px; line-height: 1.4; text-decoration: none; }
  .mobile-services a:hover { background: var(--active); }
  .main-content { padding: 32px 24px 36px; }
  .page-title { margin-bottom: 24px; font-size: clamp(28px, 5vw, 36px); }
  .site-footer { padding: 20px 24px; }
  .clients-columns { gap: 24px; }
}

@media (max-width: 600px) {
  .primary-nav { grid-template-columns: 1fr; }
  .site-nav { padding: 12px 14px 20px; }
  .nav-link { padding: 10px 14px; }
  .nav-link.sub-link { padding-left: 28px; }
  .main-content { padding: 28px 22px 32px; }
  .home-gallery { grid-template-columns: repeat(2, 112px); gap: 20px 28px; margin-top: 28px; }
  .project-figure { float: none; display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: end; gap: 16px; width: 100%; margin: 0 0 28px; }
  .project-figure figcaption { margin: 0; font-size: 11px; }
  .clients-columns { grid-template-columns: 1fr; gap: 0; }
  .service-panel-title { font-size: 21px; }
  .service-content, .job-content { padding: 28px 22px; }
  .service-copy { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
