.eg-main { color: var(--inner-ink); }
.eg-main h1, .eg-main h2, .eg-main h3, .eg-main h4, .eg-main p, .eg-main figure, .eg-main dl, .eg-main dd { margin: 0; }
.eg-main h1, .eg-main h2, .eg-main h3 { text-wrap: balance; }
.eg-main h2 { color: var(--inner-brand); font-size: clamp(1.9rem, 3.25vw, 3rem); line-height: 1.25; }
.eg-main p { line-height: 1.66; }
.eg-main [hidden] { display: none !important; }
.eg-main svg { flex: none; vertical-align: middle; }
.eg-hero { color: #fff; background: var(--inner-deep); padding: 15px 0 clamp(36px, 4vw, 60px); }
.eg-hero :is(a, button):focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.eg-route, .eg-route nav, .eg-route a { display: flex; align-items: center; }
.eg-route { justify-content: space-between; gap: 16px; margin-bottom: clamp(18px, 2.6vw, 38px); }
.eg-route nav { gap: 9px; }
.eg-route a, .eg-route nav { color: #d6e3e9; font-size: .875rem; line-height: 1.4; }
.eg-route a { gap: 7px; min-height: 44px; text-decoration: none; }
.eg-route a:hover { text-decoration: underline; }
.eg-route nav svg { color: #a6b9c5; }
#eg-guides-jump { font-weight: 600; color: #fff; }
.eg-hero-grid { display: grid; grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr); grid-template-areas: 'intro plate' 'stages plate'; gap: 30px clamp(30px, 4.5vw, 72px); align-items: center; }
.eg-intro { grid-area: intro; align-self: end; }
.eg-intro h1 { font-size: clamp(2.7rem, 5.05vw, 4.8rem); line-height: 1.2; color: white; }
.eg-intro h1:lang(en) { letter-spacing: -.025em; }
.eg-intro p { margin-top: clamp(14px, 1.5vw, 24px); max-width: 44ch; font-size: 1.0625rem; color: #dae6ee; }
.eg-stage-picker { grid-area: stages; align-self: start; }
#eg-stage-prompt { margin: 0 0 10px; font-weight: 600; font-size: 1rem; line-height: 1.45; }
.eg-stage-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.eg-stage-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 10px 7px;
  border: 1px solid #c4d2d9;
  border-radius: 5px;
  background: #f3f6f7;
  color: var(--inner-deep);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
}
.eg-stage-mark {
  display: grid;
  place-items: center;
  width: 1.1em;
  height: 1.1em;
  flex: none;
  border: 1.5px solid #5e7483;
  border-radius: 50%;
}
.eg-stage-button[aria-pressed=true] { background: var(--inner-amber); border-color: var(--inner-amber); }
.eg-stage-button[aria-pressed=true] .eg-stage-mark { background: var(--inner-deep); border-color: var(--inner-deep); }
.eg-stage-button[aria-pressed=true] .eg-stage-mark::after {
  content: '';
  width: .3em;
  height: .55em;
  margin-top: -.12em;
  transform: rotate(45deg);
  border: solid #fff;
  border-width: 0 2px 2px 0;
}
@media (hover: hover) and (pointer: fine) {
  .eg-stage-button:hover { background: #ffe4c6; border-color: var(--inner-amber); }
  .eg-stage-button[aria-pressed=true]:hover { background: #ffc282; }
}
@media (forced-colors: active) {
  .eg-stage-button[aria-pressed=true] { outline: 2px solid Highlight; outline-offset: -3px; }
}
.eg-plate { grid-area: plate; width: 100%; align-self: center; background: #f7f8f7; }
.eg-diagram-frame { position: relative; aspect-ratio: 1200/680; }
.eg-diagram-frame img, #diagram-motion > svg { display: block; width: 100%; height: 100%; }
#diagram-motion { position: absolute; inset: 0; pointer-events: none; }
#diagram-motion:not(:empty) { background: #e9eeef; }
#diagram-caption { padding: 9px clamp(12px, 1.6vw, 24px); border-top: 1px solid #d8dddc; background: #fff; color: var(--inner-muted); font-size: .875rem; line-height: 1.5; }
.eg-work, .eg-guides { padding: clamp(64px, 6.3vw, 96px) 0; }
.eg-work { background: #fff; }
.eg-work-grid, .eg-guide-grid { display: grid; grid-template-columns: minmax(0,.94fr) minmax(0,1.06fr); gap: clamp(30px,4.5vw,72px); }
.eg-work-intro { max-width: 54ch; }
.eg-section-label { display: flex; align-items: center; gap: 10px; margin-bottom: 12px !important; font-size: .9375rem; font-weight: 600; color: var(--inner-muted); }
.eg-section-label::before { content: ''; width: 25px; height: 3px; background: #d36a19; }
.eg-work-intro .eg-work-copy, .eg-guide-intro p { margin-top: 18px; color: var(--inner-muted); }
.eg-main .eg-primary { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 46px; margin-top: 25px; padding: 10px 19px; background: var(--inner-amber); color: var(--inner-deep); border-radius: 4px; font-size: 1rem; line-height: 1.4; font-weight: 700; text-decoration: none; }
.eg-main .eg-primary:hover { background: #ffc282; }
.eg-prepare > h3 { color: var(--inner-brand); font-size: 1.35rem; font-weight: 600; line-height: 1.3; margin: 0 0 15px; }
.eg-prepare dl { border-top: 1px solid var(--inner-rule); }
.eg-field { display: grid; grid-template-columns: minmax(96px,.52fr) minmax(0,1fr); gap: 18px; align-items: baseline; padding: 13px 0; border-bottom: 1px solid #d9dedd; }
.eg-field dt { color: var(--inner-brand); font-weight: 600; }
.eg-field dd { color: var(--inner-muted); }
.eg-faq { margin-top: 15px; color: var(--inner-brand); }
.eg-faq summary { list-style: none; }
.eg-faq summary::-webkit-details-marker { display: none; }
.eg-faq summary { display: flex; position: relative; align-items: center; gap: 10px; width: fit-content; min-height: 44px; font-weight: 600; }
.eg-faq summary::before { content: '+'; display: grid; place-content: center; flex: none; width: 20px; height: 20px; border: 1px solid #a8b6b9; border-radius: 50%; font: 400 16px/1 'Barlow',sans-serif; }
.eg-faq[open] summary::before { content: '−'; }
.eg-faq p { max-width: 59ch; margin: 4px 0 0 30px; color: var(--inner-muted); }
.eg-guides { background: #f0f3f2; border-top: 1px solid #e2e7e5; }
.eg-guide-intro { max-width: 43ch; }
#engineering-articles { border-top: 1px solid #8c9a9e; }
.eg-faq summary:hover { text-decoration: underline; text-underline-offset: .18em; }
.eg-article-title { color: var(--inner-brand); font-size: clamp(1.13rem,1.8vw,1.55rem); line-height: 1.30; font-weight: 600; }
.eg-article-label { display: block; margin-bottom: 5px; font-size: .875rem; line-height: 1.4; color: var(--inner-muted); font-weight: 400; }
.eg-article-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0 22px; }
.eg-article-links a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; font-size: .9375rem; }
@media (max-width: 1000px) and (min-width: 841px) {
  .eg-hero-grid { column-gap: 26px; }
  .eg-stage-button { gap: 6px; }
}
@media (max-width: 840px) {
  .eg-hero-grid { grid-template-columns: 1fr; grid-template-areas: 'intro' 'stages' 'plate'; gap: 20px; }
  .eg-intro p { max-width: 62ch; }
  .eg-intro h1 br { display: none; }
  .eg-work-grid, .eg-guide-grid { grid-template-columns: 1fr; gap: 32px; }
  .eg-work-intro, .eg-guide-intro { max-width: 60ch; }
}
@media (max-width: 760px) {
  .eg-intro h1 { font-size: clamp(1.88rem,7.4vw,2.55rem); }
}
@media (max-width: 700px) {
  .eg-work-grid { grid-template-areas: 'label' 'heading' 'summary' 'checks' 'action'; row-gap: 0; }
  .eg-work-intro { display: contents; }
  .eg-section-label { grid-area: label; }
  #eg-work-title { grid-area: heading; }
  #eg-work-copy { grid-area: summary; }
  .eg-prepare { grid-area: checks; padding-top: 24px; }
  #enquire { grid-area: action; justify-self: start; }
}
@media (max-width: 640px) {
  .eg-intro p { font-size: 1rem; }
  .eg-hero { padding: 6px 0 24px; }
  .eg-route { margin-bottom: 15px; gap: 6px; }
  .eg-route nav { gap: 5px; }
  .eg-hero-grid { gap: 15px; }
  .eg-stage-nav { gap: 6px; }
  .eg-stage-button { min-height: 48px; gap: 6px; padding-inline: 4px; font-size: .9375rem; }
  .eg-intro h1:lang(zh) br { display: initial; }
  .eg-intro p { margin-top: 12px; }
  .eg-work, .eg-guides { padding: 48px 0; }
  .eg-guide-grid { gap: 25px; }
  .eg-section-label { margin-bottom: 8px !important; }
  .eg-work-intro .eg-work-copy, .eg-guide-intro p { margin-top: 12px; }
  .eg-field { grid-template-columns: minmax(82px,.55fr) minmax(0,1fr); gap: 12px; }
}
@media (max-width: 380px) {
  .eg-main h2 { font-size: 1.55rem; }
  .eg-stage-button { gap: 4px; font-size: .875rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .eg-stage-button, .eg-primary { transition: border-color 180ms, color 180ms, background-color 180ms; }
}

.eg-guide-entry {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 84px; padding: 16px 2px; border-bottom: 1px solid #bac5c6; text-decoration: none;
}
.eg-guide-entry:hover h3, .eg-guide-entry:focus-visible h3 { text-decoration: underline; text-underline-offset: .18em; }
.eg-reader { max-width: 840px; padding-block: clamp(22px, 4vw, 58px); }
.eg-reader-back a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.eg-reader header { margin: 20px 0 32px; border-bottom: 1px solid var(--inner-rule); padding-bottom: 26px; }
.eg-reader h1 { color: var(--inner-brand); font-size: clamp(1.88rem, 4.5vw, 3.85rem); line-height: 1.16; }
.eg-reader .eg-reader-intro { margin-top: 15px; font-size: 1.13rem; }
.eg-reader section { margin-block: 28px; }
.eg-reader section h2 { margin-bottom: 8px; font-size: clamp(1.24rem, 2.25vw, 1.8rem); }
.eg-reader #references { padding-block: 16px; border-block: 1px solid var(--inner-rule); }
.eg-reader .eg-article-links a { gap: 7px; }
.eg-reader .eg-primary { margin-top: 12px; }
