/* Ironbridge Electrical Contractors
   One stylesheet for all pages. Colors are checked for WCAG AA:
   graphite on white 15.4:1, graphite on pale 13.6:1, blue on white 5.3:1,
   white on blue 5.3:1, steel on white 4.6:1, steel-dark on pale 5.7:1,
   muted-on-dark on graphite 8.1:1, blue-on-dark on graphite 7.3:1. */

:root {
  --white: #FFFFFF;
  --pale: #EEF2F7;
  --graphite: #22262E;
  --graphite-2: #2C313B;
  --blue: #0A5BFF;
  --blue-hover: #0847C7;
  --steel: #6B7588;
  --steel-dark: #555F72;
  --rule: #D4DBE5;
  --rule-strong: #B9C2CF;
  --rule-dark: rgba(255, 255, 255, 0.16);
  --on-dark-muted: #B4BCCB;
  --blue-on-dark: #8FB2FF;
  --grid-line: rgba(107, 117, 136, 0.09);

  --font-head: "IBM Plex Sans Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --radius: 3px;
  --container: 1200px;
  --gutter: 16px;
  --section-pad: 64px;
  --header-h: 64px;
}

@media (min-width: 600px) {
  :root { --gutter: 24px; --section-pad: 88px; }
}
@media (min-width: 1024px) {
  :root { --gutter: 40px; --section-pad: 112px; --header-h: 76px; }
}

/* ---------- Base ---------- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--white);
  color: var(--graphite);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
}

img, svg { max-width: 100%; }
img { height: auto; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.1;
  margin: 0 0 0.5em;
  letter-spacing: -0.005em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.25rem, 1.55rem + 3vw, 3.875rem); line-height: 1.03; }
h2 { font-size: clamp(1.75rem, 1.4rem + 1.5vw, 2.625rem); }
h3 { font-size: 1.3125rem; line-height: 1.2; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--blue); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--blue-hover); text-decoration-thickness: 2px; }

strong { font-weight: 500; }

ul, ol { margin: 0; padding: 0; }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 2px;
}
.on-dark :focus-visible,
.site-footer :focus-visible { outline-color: var(--blue-on-dark); }

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--graphite);
  color: var(--white);
  font-weight: 500;
  border-radius: var(--radius);
  text-decoration: none;
}
.skip-link:focus { top: 12px; color: var(--white); }

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

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ---------- Labels and headings ---------- */

.label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--steel);
}
.label .label-num { color: var(--blue); }
.label::after {
  content: "";
  flex: 0 0 40px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}
.bg-pale .label { color: var(--steel-dark); }
.on-dark .label { color: var(--on-dark-muted); }
.on-dark .label .label-num { color: var(--blue-on-dark); }

.section-head {
  display: grid;
  gap: 16px;
  margin-bottom: 48px;
}
.section-head h2 { margin: 0; max-width: 20ch; }
.section-head .lede { margin: 0; max-width: 56ch; color: var(--steel); font-size: 1.0625rem; }
.bg-pale .section-head .lede { color: var(--steel-dark); }
.on-dark .section-head .lede { color: var(--on-dark-muted); }
@media (min-width: 900px) {
  .section-head {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: end;
    gap: 48px;
  }
  .section-head .label { grid-column: 1 / -1; margin-bottom: -24px; }
}

.lede { font-size: 1.125rem; color: var(--steel); }

/* ---------- Sections ---------- */

.section { padding: var(--section-pad) 0; border-top: 1px solid var(--rule); }
.section:first-child { border-top: 0; }
.bg-pale { background: var(--pale); }
.on-dark { background: var(--graphite); color: var(--white); border-top-color: var(--graphite); }

.grid-bg {
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: -1px -1px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn svg { flex: none; }

.btn-primary { background: var(--blue); color: var(--white); border-color: var(--blue); }
.btn-primary:hover { background: var(--blue-hover); border-color: var(--blue-hover); color: var(--white); }

.btn-secondary { background: var(--white); color: var(--graphite); border-color: var(--graphite); }
.btn-secondary:hover { background: var(--graphite); color: var(--white); }

.btn-light { background: var(--white); color: var(--graphite); border-color: var(--white); }
.btn-light:hover { background: var(--graphite); border-color: var(--graphite); color: var(--white); }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  text-decoration: none;
}
.text-link .arrow { transition: transform 0.15s ease; }
.text-link:hover { text-decoration: underline; }
.text-link:hover .arrow { transform: translateX(3px); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--rule);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--header-h);
}

.logo {
  display: flex;
  flex-direction: column;
  margin-right: auto;
  color: var(--graphite);
  text-decoration: none;
  line-height: 1;
  padding: 6px 0;
}
.logo:hover { color: var(--graphite); }
.logo-name {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.375rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.logo-sub {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1.5px solid var(--blue);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.6875rem;
  letter-spacing: 0.115em;
  text-transform: uppercase;
  color: var(--steel);
}

.header-cta { order: 2; min-height: 44px; padding: 10px 16px; font-size: 0.9375rem; }

.primary-nav { order: 3; }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1.5px solid var(--rule-strong);
  border-radius: var(--radius);
  color: var(--graphite);
  cursor: pointer;
}
.nav-toggle-bars { position: relative; width: 18px; height: 12px; }
.nav-toggle-bars span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle-bars span:nth-child(1) { top: 0; }
.nav-toggle-bars span:nth-child(2) { top: 5.25px; }
.nav-toggle-bars span:nth-child(3) { top: 10.5px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(1) { transform: translateY(5.25px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(3) { transform: translateY(-5.25px) rotate(-45deg); }

.nav-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  display: none;
  background: var(--white);
  border-bottom: 1px solid var(--rule);
  box-shadow: 0 16px 32px -20px rgba(34, 38, 46, 0.35);
  padding: 8px var(--gutter) 24px;
}
.nav-open .nav-panel { display: block; }
.no-js .nav-toggle { display: none; }
.no-js .nav-panel { position: static; display: block; box-shadow: none; border: 0; padding: 0 0 12px; }

.nav-list { list-style: none; }
.nav-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  border-bottom: 1px solid var(--rule);
  color: var(--graphite);
  font-weight: 500;
  font-size: 1.0625rem;
  text-decoration: none;
}
.nav-list a:hover { color: var(--blue); }
.nav-list a[aria-current="page"] { color: var(--blue); }
.nav-list a[aria-current="page"]::after {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--blue);
}

.header-phone {
  display: inline-flex;
  flex-direction: column;
  margin-top: 16px;
  color: var(--graphite);
  text-decoration: none;
  line-height: 1.25;
}
.header-phone-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--steel);
}
.header-phone-num { font-weight: 500; font-size: 1.0625rem; color: var(--blue); }
.header-phone:hover .header-phone-num { text-decoration: underline; }

@media (max-width: 359px) {
  .header-inner { gap: 8px; }
  .logo-name { font-size: 1.1875rem; }
  .logo-sub { font-size: 0.5625rem; letter-spacing: 0.1em; }
  .header-cta { padding: 8px 10px; font-size: 0.875rem; }
  .nav-toggle { width: 42px; }
}

@media (min-width: 1100px) {
  .header-inner { gap: 32px; }
  .primary-nav { order: 1; }
  .nav-toggle { display: none; }
  .nav-panel,
  .no-js .nav-panel {
    position: static;
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
  }
  .nav-list { display: flex; gap: 28px; }
  .nav-list a {
    position: relative;
    min-height: var(--header-h);
    border: 0;
    font-size: 0.9375rem;
  }
  .nav-list a[aria-current="page"]::after {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    width: auto;
    height: 2px;
  }
  .header-phone {
    margin: 0;
    padding-left: 32px;
    border-left: 1px solid var(--rule);
  }
  .header-phone-num { font-size: 0.9375rem; }
  .header-cta { order: 3; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 56px 0 64px;
  border-bottom: 1px solid var(--rule);
}
.hero-inner {
  display: grid;
  gap: 48px;
  align-items: center;
}
.hero h1 { max-width: 18ch; margin-bottom: 24px; }
.hero-text .lede {
  max-width: 50ch;
  margin-bottom: 32px;
  color: var(--graphite);
  font-size: 1.1875rem;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--steel);
}
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta span::before { content: ""; width: 6px; height: 6px; border: 1.5px solid var(--blue); }

.drawing {
  position: relative;
  background: var(--white);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  padding: 12px;
}
.drawing::before,
.drawing::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: var(--blue);
  border-style: solid;
}
.drawing::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.drawing::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }
.drawing svg { display: block; width: 100%; height: auto; }

.sld-flow {
  stroke-dasharray: 6 10;
  animation: sld-flow 2.4s linear infinite;
}
@keyframes sld-flow {
  to { stroke-dashoffset: -32; }
}

@media (min-width: 900px) {
  .hero { padding: 88px 0 96px; }
  .hero-inner { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 64px; }
}

/* ---------- Page heads (inner pages) ---------- */

.page-head {
  padding: 56px 0 56px;
  border-bottom: 1px solid var(--rule);
}
.page-head-inner { display: grid; gap: 32px; }
.page-head h1 { max-width: 16ch; margin-bottom: 20px; }
.page-head .lede { max-width: 58ch; margin: 0; color: var(--graphite); }
.page-head .lede + .lede { margin-top: 1em; color: var(--steel); font-size: 1.0625rem; }

.index-list {
  list-style: none;
  border-top: 1px solid var(--graphite);
  align-self: end;
}
.index-list-title {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--steel);
}
.index-list a {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  column-gap: 8px;
  align-items: center;
  min-height: 48px;
  border-bottom: 1px solid var(--rule);
  color: var(--graphite);
  font-weight: 500;
  text-decoration: none;
}
.index-list a:hover { color: var(--blue); }
.index-list .idx {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--blue);
}
.index-list .arrow { color: var(--steel); }

@media (min-width: 900px) {
  .page-head { padding: 88px 0 80px; }
  .page-head-inner { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 80px; }
}

/* ---------- Capability cards ---------- */

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--rule-strong);
  border-left: 1px solid var(--rule-strong);
}
.card-grid > * {
  border-right: 1px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule-strong);
}
@media (min-width: 640px) { .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .card-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.cap-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 28px 24px 24px;
  background: var(--white);
  color: var(--graphite);
  text-decoration: none;
  transition: background-color 0.15s ease;
}
.cap-card:hover { background: #F7F9FC; color: var(--graphite); }
.cap-card:hover h3 { color: var(--blue); }
.cap-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 28px;
}
.cap-card .idx {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--steel);
}
.icon {
  width: 44px;
  height: 44px;
  color: var(--blue);
  flex: none;
}
.cap-card h3 { margin-bottom: 10px; transition: color 0.15s ease; }
.cap-card p { color: var(--steel); margin-bottom: 24px; }
.cap-card .text-link { margin-top: auto; font-size: 0.9375rem; color: var(--blue); }
@media (min-width: 1000px) { .cap-card { padding: 36px 32px 32px; } }

/* ---------- Sector tiles ---------- */

.sector-grid {
  display: grid;
  gap: 16px;
}
@media (min-width: 640px) { .sector-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .sector-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.sector-tile {
  display: flex;
  flex-direction: column;
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  color: var(--graphite);
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.sector-tile:hover { border-color: var(--blue); color: var(--graphite); }
.sector-tile .icon { width: 48px; height: 48px; margin-bottom: 40px; }
.sector-tile h3 { font-size: 1.25rem; margin-bottom: 8px; }
.sector-tile p { color: var(--steel); font-size: 0.9375rem; margin-bottom: 20px; }
.sector-tile .text-link { margin-top: auto; font-size: 0.9375rem; color: var(--blue); }

/* ---------- Process stages ---------- */

.stages {
  list-style: none;
  display: grid;
  gap: 0;
  counter-reset: stage;
  border-top: 1px solid var(--rule-dark);
}
.stage {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 0 16px;
  padding: 28px 0;
  border-bottom: 1px solid var(--rule-dark);
}
.stage-num {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--blue-on-dark);
  padding-top: 3px;
}
.stage h3 { color: var(--white); font-size: 1.25rem; margin-bottom: 8px; }
.stage p { color: var(--on-dark-muted); margin: 0; font-size: 0.9375rem; }

@media (min-width: 1000px) {
  .stages {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    border-top: 0;
  }
  .stage {
    grid-template-columns: 1fr;
    align-content: start;
    gap: 0;
    padding: 0 24px 0 0;
    border-bottom: 0;
  }
  .stage-num {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
    padding: 0;
  }
  .stage-num::before {
    content: "";
    width: 11px;
    height: 11px;
    flex: none;
    border: 1.5px solid var(--blue-on-dark);
    background: var(--graphite);
    position: relative;
    z-index: 1;
  }
  .stage-num::after {
    content: "";
    position: absolute;
    left: 0;
    right: -24px;
    top: 50%;
    height: 1px;
    background: var(--rule-dark);
  }
  .stage-num span { position: relative; z-index: 1; background: var(--graphite); padding-right: 12px; }
  .stage:last-child .stage-num::after { right: 0; }
}

/* ---------- Placeholders ---------- */

.placeholder {
  position: relative;
  padding: 28px 18px 18px;
  border: 1.5px dashed var(--blue);
  border-radius: var(--radius);
  background-color: var(--white);
  background-image: repeating-linear-gradient(-45deg, rgba(10, 91, 255, 0.05) 0 8px, transparent 8px 16px);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--graphite);
}
.placeholder::before {
  content: "Placeholder";
  position: absolute;
  top: 0;
  left: 0;
  padding: 3px 8px;
  background: var(--blue);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom-right-radius: var(--radius);
}
.placeholder-inline {
  display: inline;
  padding: 1px 4px;
  border: 1px dashed var(--blue);
  background: rgba(10, 91, 255, 0.06);
  font-family: var(--font-mono);
  font-size: 0.8125em;
}
.on-dark .placeholder,
.site-footer .placeholder {
  background-color: var(--graphite-2);
  background-image: repeating-linear-gradient(-45deg, rgba(143, 178, 255, 0.07) 0 8px, transparent 8px 16px);
  border-color: var(--blue-on-dark);
  color: var(--white);
}
.on-dark .placeholder::before,
.site-footer .placeholder::before { background: var(--blue-on-dark); color: var(--graphite); }

/* ---------- Project placeholders ---------- */

.project-grid { display: grid; gap: 20px; }
@media (min-width: 800px) { .project-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.project-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--white);
  overflow: hidden;
}
.project-frame {
  position: relative;
  aspect-ratio: 16 / 10;
  border-bottom: 1px solid var(--rule-strong);
  background-color: var(--pale);
}
.project-frame svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.project-frame .frame-tag {
  position: absolute;
  right: 10px;
  bottom: 8px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--steel-dark);
}
.project-body { padding: 20px; }
.project-body .idx {
  display: block;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--steel);
}

/* ---------- Credentials ---------- */

.credentials {
  display: grid;
  gap: 32px;
  padding: 32px 24px;
  background: var(--white);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
}
.credentials h2 { margin-bottom: 12px; }
.credentials .note { color: var(--steel); margin: 0; max-width: 46ch; }
.credentials .placeholder { font-size: 1rem; padding: 36px 20px 24px; align-self: center; }
@media (min-width: 900px) {
  .credentials { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; padding: 48px; align-items: center; }
}

/* ---------- Quote band ---------- */

.quote-band {
  position: relative;
  padding: 56px 0;
  background: var(--blue);
  color: var(--white);
  overflow: hidden;
}
.quote-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}
.quote-band-inner {
  position: relative;
  display: grid;
  gap: 24px;
  align-items: center;
}
.quote-band h2 { margin: 0 0 8px; max-width: 24ch; }
.quote-band p { margin: 0; max-width: 56ch; }
.quote-band a:not(.btn) { color: var(--white); }
.quote-band :focus-visible { outline-color: var(--white); }
@media (min-width: 900px) {
  .quote-band { padding: 72px 0; }
  .quote-band-inner { grid-template-columns: 1fr auto; gap: 48px; }
}

/* ---------- Service and sector detail sections ---------- */

.detail {
  padding: var(--section-pad) 0;
  border-top: 1px solid var(--rule);
}
.detail:nth-of-type(even) { background: var(--pale); }
.detail:nth-of-type(even) .label { color: var(--steel-dark); }
.detail:nth-of-type(even) .detail-intro p,
.detail:nth-of-type(even) .concerns p { color: var(--steel-dark); }

.detail-grid { display: grid; gap: 36px; }
.detail-intro .icon { width: 56px; height: 56px; margin-bottom: 24px; }
.detail-intro h2 { max-width: 16ch; }
.detail-intro p { color: var(--steel); font-size: 1.0625rem; max-width: 46ch; }
.detail-intro .note {
  margin-top: 20px;
  padding: 14px 16px;
  border-left: 3px solid var(--blue);
  background: var(--white);
  color: var(--graphite);
  font-size: 0.9375rem;
}
.detail-cols { display: grid; gap: 32px; }
.detail-cols h3 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-bottom: 12px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--graphite);
  font-size: 1.125rem;
}
.detail-cols h3 .tag {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--blue);
}
.spec-list { list-style: none; }
.spec-list li {
  position: relative;
  padding: 11px 0 11px 22px;
  border-bottom: 1px solid var(--rule);
  font-size: 0.9375rem;
  line-height: 1.5;
}
.spec-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 19px;
  width: 8px;
  height: 1.5px;
  background: var(--blue);
}
.detail:nth-of-type(even) .spec-list li { border-bottom-color: var(--rule-strong); }
.detail-action { margin-top: 28px; }

@media (min-width: 700px) {
  .detail-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1000px) {
  .detail-grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); gap: 72px; }
  .detail-intro { position: sticky; top: calc(var(--header-h) + 32px); align-self: start; }
}

.concerns { list-style: none; display: grid; gap: 0; border-top: 1px solid var(--graphite); }
.concerns li {
  display: grid;
  gap: 6px;
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
}
.detail:nth-of-type(even) .concerns li { border-bottom-color: var(--rule-strong); }
.concerns h3 { margin: 0; font-size: 1.125rem; }
.concerns p { margin: 0; color: var(--steel); font-size: 0.9375rem; }
@media (min-width: 700px) {
  .concerns li { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.5fr); gap: 24px; }
}
.related {
  margin-top: 24px;
  font-size: 0.9375rem;
}
.related-title {
  display: block;
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--steel);
}
.detail:nth-of-type(even) .related-title { color: var(--steel-dark); }
.related ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.related a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--graphite);
  text-decoration: none;
  font-weight: 500;
}
.related a:hover { border-color: var(--blue); color: var(--blue); }

/* ---------- Quote page ---------- */

.quote-layout {
  display: grid;
  gap: 40px;
  align-items: start;
}
@media (min-width: 1000px) {
  .quote-layout { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 56px; }
  .quote-aside { position: sticky; top: calc(var(--header-h) + 32px); }
}

.form-card {
  background: var(--white);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
}
.form-progress {
  padding: 20px 20px 0;
}
.step-count {
  margin: 0 0 12px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--graphite);
}
.step-track {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.step-track li {
  padding-top: 10px;
  border-top: 3px solid var(--rule);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--steel);
}
.step-track li.is-active,
.step-track li.is-done { border-top-color: var(--blue); color: var(--graphite); }
.no-js .form-progress { display: none; }

.form-step { padding: 28px 20px 24px; }
.form-step + .form-step { border-top: 1px solid var(--rule); }
.form-step h2 {
  font-size: 1.625rem;
  margin-bottom: 6px;
}
.form-step h2:focus { outline: none; }
.form-step h2:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
.form-step .step-intro { color: var(--steel); margin-bottom: 24px; font-size: 0.9375rem; }

.fields { display: grid; gap: 20px; }
@media (min-width: 640px) {
  .form-progress { padding: 28px 32px 0; }
  .form-step { padding: 36px 32px 32px; }
  .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 20px; }
  .field-full { grid-column: 1 / -1; }
}

.field { display: flex; flex-direction: column; min-width: 0; }
.field label,
.field legend {
  margin-bottom: 6px;
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--graphite);
}
.req { color: var(--blue); margin-left: 2px; }
.opt { font-weight: 400; color: var(--steel); font-size: 0.875rem; }

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border: 1.5px solid var(--steel);
  border-radius: var(--radius);
  background-color: var(--white);
  color: var(--graphite);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.4;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field textarea { min-height: 128px; resize: vertical; }
.field select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2322262E' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  text-overflow: ellipsis;
}
.field input:hover,
.field select:hover,
.field textarea:hover { border-color: var(--graphite); }
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(10, 91, 255, 0.28);
}

fieldset.field { border: 0; padding: 0; margin: 0; }
fieldset.field legend { padding: 0; }
.choice-row { display: flex; flex-wrap: wrap; gap: 8px; }
.choice {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 16px 10px 12px;
  border: 1.5px solid var(--steel);
  border-radius: var(--radius);
  background: var(--white);
  cursor: pointer;
  font-size: 0.9375rem;
  font-weight: 400;
}
.choice:hover { border-color: var(--graphite); }
.choice input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--blue);
}
.choice:has(input:checked) { border-color: var(--blue); background: #F2F6FF; }
.choice:has(input:focus-visible) { outline: 3px solid var(--blue); outline-offset: 2px; }

.field-error {
  display: none;
  align-items: flex-start;
  gap: 6px;
  margin: 8px 0 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: #B3261E;
}
.field-error::before {
  content: "!";
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  border-radius: 50%;
  background: #B3261E;
  color: var(--white);
  font-size: 0.6875rem;
  font-weight: 700;
}
.field.has-error .field-error { display: flex; }
.field.has-error input,
.field.has-error select,
.field.has-error textarea,
.field.has-error .choice { border-color: #B3261E; }

.error-summary {
  margin: 0 0 20px;
  padding: 12px 14px;
  border-left: 3px solid #B3261E;
  background: #FCEEEE;
  color: #8C1D18;
  font-size: 0.9375rem;
  font-weight: 500;
}
.error-summary:empty { display: none; }

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}
.form-actions .btn-primary { margin-left: auto; }
.form-actions .hint { margin: 0; font-size: 0.8125rem; color: var(--steel); }
.no-js .js-only { display: none; }
@media (max-width: 479px) {
  .form-actions { flex-direction: column-reverse; align-items: stretch; }
  .form-actions .btn { width: 100%; margin-left: 0; }
  .form-actions .hint { text-align: center; }
}

.form-status {
  margin: 24px 0 0;
  padding: 16px 18px;
  border: 1.5px solid var(--blue);
  border-left-width: 4px;
  border-radius: var(--radius);
  background: #F2F6FF;
  color: var(--graphite);
  font-weight: 500;
}
.form-status[hidden] { display: none; }
.form-status:focus { outline: none; }
.form-status:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

.aside-block {
  padding: 28px 24px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--white);
}
.aside-block + .aside-block { margin-top: 16px; }
.aside-block h2 { font-size: 1.5rem; margin-bottom: 20px; }
.next-steps { list-style: none; counter-reset: next; }
.next-steps li {
  position: relative;
  padding: 0 0 22px 48px;
  counter-increment: next;
}
.next-steps li:last-child { padding-bottom: 0; }
.next-steps li::before {
  content: counter(next, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--blue);
  border-radius: var(--radius);
  background: var(--white);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--blue);
  z-index: 1;
}
.next-steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 16px;
  top: 32px;
  bottom: 0;
  width: 1px;
  background: var(--rule-strong);
}
.next-steps strong { display: block; font-weight: 500; margin-bottom: 2px; padding-top: 4px; }
.next-steps p { margin: 0; color: var(--steel); font-size: 0.9375rem; }

.aside-call { background: var(--graphite); color: var(--white); border-color: var(--graphite); }
.aside-call h2 { color: var(--white); margin-bottom: 8px; }
.aside-call p { color: var(--on-dark-muted); font-size: 0.9375rem; }
.aside-call :focus-visible { outline-color: var(--blue-on-dark); }
.call-number {
  display: inline-block;
  margin: 12px 0 14px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 2rem;
  letter-spacing: 0.01em;
  color: var(--white);
  text-decoration: none;
}
.call-number:hover { color: var(--blue-on-dark); text-decoration: underline; }
.aside-call a:not(.call-number) { color: var(--blue-on-dark); }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--graphite);
  color: var(--white);
  padding: 56px 0 32px;
}
.site-footer a { color: var(--white); }
.site-footer a:hover { color: var(--blue-on-dark); }

.title-block {
  display: grid;
  grid-template-columns: 1fr;
  border: 1px solid var(--rule-dark);
}
.tb-cell {
  padding: 18px 20px;
  border-bottom: 1px solid var(--rule-dark);
  min-width: 0;
}
.tb-cell:last-child { border-bottom: 0; }
.tb-label {
  display: block;
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
}
.tb-value { margin: 0; font-size: 0.9375rem; line-height: 1.55; }
.tb-value a { font-weight: 500; text-decoration: none; overflow-wrap: anywhere; }
.tb-value a:hover { text-decoration: underline; }
.tb-brand .footer-name {
  margin: 0 0 6px;
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.1;
}
.tb-brand p { color: var(--on-dark-muted); font-size: 0.9375rem; margin: 0; }
.tb-muted { color: var(--on-dark-muted); }
.site-footer .placeholder { font-size: 0.8125rem; padding: 26px 12px 12px; }

.footer-nav ul { list-style: none; display: grid; gap: 2px; }
.footer-nav a { display: inline-flex; align-items: center; min-height: 32px; text-decoration: none; font-weight: 500; font-size: 0.9375rem; }
.footer-nav a:hover { text-decoration: underline; }

.footer-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 24px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--on-dark-muted);
}

/* Title block: 7 cells (brand, phone, email, hours, region, credentials, pages). */
@media (min-width: 640px) {
  .title-block { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .title-block > .tb-cell { border-right: 1px solid var(--rule-dark); border-bottom: 1px solid var(--rule-dark); }
  .title-block > .tb-brand { grid-column: 1 / -1; border-right: 0; }
  .title-block > .tb-cell:nth-child(2n+3) { border-right: 0; }
  .title-block > .tb-cell:nth-child(n+6) { border-bottom: 0; }
}
@media (min-width: 1000px) {
  .title-block { grid-template-columns: 1.3fr 1fr 1fr 1fr; }
  .title-block > .tb-cell,
  .title-block > .tb-cell:nth-child(2n+3) { border-right: 1px solid var(--rule-dark); border-bottom: 1px solid var(--rule-dark); }
  .title-block > .tb-brand { grid-column: 1; grid-row: 1 / span 2; border-bottom: 0; }
  .title-block > .tb-cell:nth-child(4),
  .title-block > .tb-cell:nth-child(7) { border-right: 0; }
  .title-block > .tb-cell:nth-child(n+5) { border-bottom: 0; }
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .sld-flow { animation: none; stroke-dasharray: none; }
}

/* Quote page: less space between the page head and the form */
.section.quote-section { padding-top: 40px; }
@media (min-width: 1024px) { .section.quote-section { padding-top: 56px; } }

/* Small phones: keep logo, quote button and menu toggle on one line */
.label { flex-wrap: wrap; row-gap: 4px; }
.label > span { white-space: nowrap; }
.logo-sub { white-space: nowrap; }
@media (max-width: 399px) {
  .header-inner { gap: 6px; }
  .logo-name { font-size: 1.0625rem; letter-spacing: 0.05em; }
  .logo-sub { font-size: 0.5625rem; letter-spacing: 0.04em; }
  .header-cta { padding: 8px 10px; font-size: 0.8125rem; min-height: 42px; }
  .nav-toggle { width: 40px; height: 42px; }
}
