:root {
  --canvas: #F3F4F6;
  --panel: #FFFFFF;
  --ink: #111827;
  --accent: #EA580C;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: "Trebuchet MS", sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

img {
  display: block;
  width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent);
}

a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

h1,
h2,
h3,
p,
figure,
dl,
dd {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: "Trebuchet MS", sans-serif;
  line-height: 1.12;
}

h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(2rem, 5vw, 4.2rem);
  letter-spacing: -0.045em;
}

h2 {
  margin-bottom: 8px;
  font-size: clamp(1.45rem, 3vw, 2.3rem);
  letter-spacing: -0.025em;
}

h3 {
  margin: 0;
  font-size: 1.05rem;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

.technical-header {
  border-bottom: 4px solid var(--accent);
  background: var(--ink);
  color: var(--panel);
}

.header-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 24px;
  align-items: center;
  min-height: 68px;
}

.brand {
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.header-facts {
  display: flex;
  margin-bottom: 0;
}

.header-facts > div {
  padding: 8px 18px;
  border-left: 1px solid var(--panel);
}

.header-facts dt,
.section-code,
.service-code,
.spec-table th,
.technical-definitions dt,
.service-entry dt,
.contact-details dt {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.header-facts dt {
  color: var(--accent);
}

.header-facts dd {
  margin: 2px 0 0;
  font-weight: 700;
}

.hero {
  padding: clamp(34px, 6vw, 72px) 0;
  border-bottom: 1px solid var(--ink);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 30px;
  align-items: stretch;
}

.hero-copy {
  align-self: center;
}

.hero-copy > p:not(.section-code) {
  max-width: 760px;
  margin-bottom: 10px;
  font-size: 1.02rem;
}

.section-code {
  margin-bottom: 10px;
  color: var(--accent);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 24px;
}

.primary-action,
.text-action {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 9px 15px;
  font-weight: 700;
}

.primary-action {
  border: 2px solid var(--accent);
  background: var(--accent);
  color: var(--panel);
  text-decoration: none;
}

.primary-action:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--panel);
}

.text-action {
  border: 1px solid var(--ink);
  background: var(--panel);
}

.work-image {
  display: grid;
  margin-bottom: 0;
  border: 1px solid var(--ink);
  background: var(--panel);
}

.work-image img {
  height: 100%;
  min-height: 300px;
  object-fit: cover;
}

.work-image figcaption {
  padding: 8px 11px;
  border-top: 1px solid var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
}

.specification,
.services,
.contact {
  padding: clamp(38px, 6vw, 68px) 0;
  border-bottom: 1px solid var(--ink);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--ink);
}

.section-heading h2 {
  max-width: 720px;
  text-align: right;
}

.table-frame {
  overflow-x: auto;
  border: 1px solid var(--ink);
  background: var(--panel);
}

.spec-table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.spec-table th,
.spec-table td {
  padding: 9px 12px;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  text-align: left;
  vertical-align: top;
}

.spec-table th:last-child,
.spec-table td:last-child {
  border-right: 0;
}

.spec-table tbody tr:last-child td {
  border-bottom: 0;
}

.spec-table thead {
  background: var(--ink);
  color: var(--panel);
}

.spec-table .category-row {
  background: var(--accent);
}

.spec-table .category-row th {
  border-color: var(--panel);
}

.service-code {
  display: inline-block;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.rate-badge,
.scope-badge {
  display: inline-block;
  padding: 4px 8px;
  white-space: nowrap;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.rate-badge {
  background: var(--accent);
  color: var(--panel);
}

.scope-badge {
  border: 1px solid var(--ink);
  background: var(--panel);
}

.spec-reference {
  display: grid;
  grid-template-columns: minmax(240px, 0.65fr) minmax(0, 1.35fr);
  gap: 18px;
  margin-top: 18px;
}

.compact-image img {
  min-height: 210px;
}

.technical-definitions {
  margin-bottom: 0;
  border: 1px solid var(--ink);
  background: var(--panel);
}

.technical-definitions > div {
  display: grid;
  grid-template-columns: 190px 1fr;
  border-bottom: 1px solid var(--ink);
}

.technical-definitions > div:last-child {
  border-bottom: 0;
}

.technical-definitions dt,
.technical-definitions dd {
  margin: 0;
  padding: 10px 12px;
}

.technical-definitions dt {
  border-right: 1px solid var(--ink);
  background: var(--ink);
  color: var(--panel);
}

.service-directory {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--ink);
}

.service-entry {
  padding: 16px;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: var(--panel);
}

.service-entry header {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 14px;
}

.service-entry p {
  min-height: 48px;
  margin-bottom: 14px;
}

.service-entry dl {
  margin-bottom: 0;
  border-top: 1px solid var(--ink);
}

.service-entry dl > div {
  display: grid;
  grid-template-columns: 100px 1fr;
  border-bottom: 1px solid var(--ink);
}

.service-entry dt,
.service-entry dd {
  margin: 0;
  padding: 7px 8px;
}

.service-entry dt {
  border-right: 1px solid var(--ink);
}

.service-entry-image {
  grid-column: span 2;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(250px, 0.6fr);
  gap: 16px;
  padding: 0;
}

.service-entry-image .entry-content {
  padding: 16px;
}

.service-entry-image img {
  height: 100%;
  min-height: 230px;
  border-left: 1px solid var(--ink);
  object-fit: cover;
}

.contact {
  border-bottom: 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--ink);
  background: var(--panel);
}

.contact-panel,
.privacy-panel {
  padding: clamp(20px, 4vw, 36px);
}

.contact-panel {
  border-right: 1px solid var(--ink);
}

.contact-details {
  margin: 24px 0 0;
  border-top: 1px solid var(--ink);
}

.contact-details > div {
  display: grid;
  grid-template-columns: 140px 1fr;
  border-bottom: 1px solid var(--ink);
}

.contact-details dt,
.contact-details dd {
  margin: 0;
  padding: 9px;
}

.contact-details dt {
  border-right: 1px solid var(--ink);
}

.contact-details dd {
  font-weight: 700;
}

address {
  font-style: normal;
}

.privacy-panel p:last-child {
  margin-bottom: 0;
}

@media (max-width: 800px) {
  .header-grid,
  .hero-grid,
  .spec-reference,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .header-grid {
    gap: 0;
    padding-top: 14px;
  }

  .header-facts {
    width: 100%;
    flex-direction: column;
    margin-top: 12px;
  }

  .header-facts > div {
    padding: 8px 0;
    border-top: 1px solid var(--panel);
    border-left: 0;
  }

  .hero-grid {
    gap: 22px;
  }

  .section-heading {
    display: block;
  }

  .section-heading h2 {
    text-align: left;
  }

  .service-directory {
    grid-template-columns: 1fr;
  }

  .service-entry-image {
    grid-column: auto;
    grid-template-columns: 1fr;
  }

  .service-entry-image img {
    border-top: 1px solid var(--ink);
    border-left: 0;
  }

  .contact-panel {
    border-right: 0;
    border-bottom: 1px solid var(--ink);
  }
}

@media (max-width: 520px) {
  .page-shell {
    width: min(100% - 20px, 1180px);
  }

  h1 {
    font-size: 2.25rem;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-action,
  .text-action {
    width: 100%;
  }

  .technical-definitions > div,
  .contact-details > div {
    grid-template-columns: 1fr;
  }

  .technical-definitions dt,
  .contact-details dt {
    border-right: 0;
    border-bottom: 1px solid var(--ink);
  }

  .service-entry header {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}