.home-editorial {
  --home-ink: #172b3b;
  --home-muted: #465e6d;
  --home-blue: #075676;
  --home-line: #d4e0e7;
  color: var(--home-ink);
}

.home-opening {
  background: #142633;
  color: #fff;
  padding-block: clamp(28px, 4.8vw, 68px);
}
.home-opening-grid {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  align-items: center;
  gap: clamp(24px, 4vw, 70px);
}
.home-opening h1 {
  max-width: 12ch;
  margin: 0 0 18px;
  font-size: clamp(2.55rem, 5.25vw, 5rem);
  line-height: 1.03;
  letter-spacing: -.04em;
  text-wrap: balance;
  color: #fff;
}
.home-opening-copy p {
  max-width: 50ch;
  color: #dce9f0;
  font-size: clamp(.96rem, 1.4vw, 1.09rem);
  line-height: 1.65;
  margin: 0 0 20px;
}
.home-opening-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
}
.home-opening-actions > a:not(.button) {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: underline;
  text-underline-offset: 4px;
  color: #e6f3fa;
  font-weight: 650;
  font-size: .86rem;
}
.home-opening-actions a:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }

.home-photo { margin: 0; }
.home-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  background: #bcccda;
  border-radius: 4px;
}
.home-opening .home-photo img { object-position: 56% 52%; }
.home-photo figcaption { margin-top: 8px; font-size: .72rem; color: var(--home-muted); }

.home-service-index { border-bottom: 1px solid var(--home-line); background: #f5f9fb; }
.home-service-index > div {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px 24px;
}
.home-service-index a {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  gap: 8px;
  font-size: .94rem;
  font-weight: 700;
  color: var(--home-blue);
}
.home-service-index a:hover { text-decoration: underline; text-underline-offset: 3px; }

.home-service, .home-projects, .home-premises, .home-working { padding-block: clamp(42px, 6vw, 86px); }
.home-service-feature {
  display: grid;
  align-items: center;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 5vw, 72px);
}
.home-service-reverse .home-photo { grid-area: 1 / 1; }
.home-service-copy { max-width: 71ch; }
.home-service-copy .eyebrow { margin: 0 0 8px; }
.home-service h2, .home-projects h2, .home-premises h2, .home-working h2 {
  margin: 0 0 16px;
  color: var(--home-ink);
  font-size: clamp(1.75rem, 3.1vw, 3.15rem);
  line-height: 1.12;
  text-wrap: balance;
  letter-spacing: -.027em;
}
.home-service-copy p:not(.eyebrow), .home-premises p, .home-working p {
  color: var(--home-muted);
  line-height: 1.72;
  margin: 0 0 14px;
}
.home-service { scroll-margin-top: 1rem; }
.home-reading-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  margin: 16px 0 10px;
  padding: 0;
  column-gap: 20px;
}
.home-reading-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: 7px;
  color: var(--home-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
  line-height: 1.35;
  font-size: .88rem;
  font-weight: 600;
}
.home-enquiry {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: 8px;
  color: var(--home-blue);
  border-bottom: 2px solid #2191c1;
  line-height: 1.35;
  font-weight: 750;
  font-size: .92rem;
}
.home-enquiry:hover { color: #142633; border-color: currentColor; }

.home-section-heading, .home-working {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 30px;
}
.home-working > div { max-width: 68ch; }

@media (max-width: 740px) {
  .home-opening-grid, .home-service-feature, .home-stories { grid-template-columns: minmax(0, 1fr); }
  .home-opening h1 { font-size: clamp(2.4rem, 9vw, 3.55rem); }
  .home-opening-actions .button { min-height: 46px; padding: 10px 16px; }
  .home-service-index > div { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-service-index a { min-height: 44px; }
  .home-service-reverse .home-photo { grid-area: auto; }
  .home-section-heading h2 { margin-bottom: 0; }
}

.home-opening-image figcaption { color: #dbe9f0; }
.home-opening-image figcaption a, .home-photo figcaption a { text-decoration: underline; text-underline-offset: 3px; }

/* Let photos, headings and open space define the service sections. */
.home-opening {
  background: radial-gradient(ellipse at 75% 30%, #1e3747 0, #142633 65%);
}
.home-opening h1 { max-width: 13ch; }
.home-opening .home-photo img {
  aspect-ratio: 8/5;
  border-radius: 0;
}
.home-service-index {
  background: #fff;
  border-bottom: 1px solid #d8e2e8;
}
.home-service-index > div {
  display: flex;
  flex-wrap: wrap;
  gap: 0 clamp(14px, 3vw, 42px);
}
.home-service-index a {
  justify-content: flex-start;
  gap: 6px;
  letter-spacing: -.012em;
  font-size: .89rem;
}
.home-topic {
  border-bottom: 1px solid #d8e2e8;
}
.home-topic--fire {
  --home-section-accent: #a02b39;
  --home-section-rule: #e2b6bf;
}
.home-topic > .home-service {
  padding-block: clamp(42px, 6.1vw, 88px) clamp(24px, 3.2vw, 50px);
}
.home-topic--fire .home-service-copy .eyebrow,
.home-topic--fire .home-reading-links a,
.home-topic--fire .home-enquiry { color: var(--home-section-accent); }
.home-topic--fire .home-enquiry { border-color: var(--home-section-accent); }
.home-topic--fire .home-service-copy .eyebrow::before {
  display: inline-block;
  content: '';
  width: 20px;
  margin-inline-end: 9px;
  border-top: 2px solid currentColor;
  vertical-align: .25em;
}
.home-service-copy .home-enquiry { margin-top: 1px; }
.home-service-feature .home-photo img { border-radius: 0; }
.home-service-feature .home-fire-photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 4/3;
  object-fit: contain;
  background: transparent;
}
.home-service-feature .home-fire-photo figcaption { text-align: center; }
@media (max-width: 740px) {
  .home-service-index > div {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    column-gap: 15px;
  }
  .home-service-index a { font-size: .82rem; line-height: 1.2; }
  .home-opening .home-photo img { aspect-ratio: 5/3; }
  .home-service-feature .home-fire-photo img { max-height: 360px; }
}

.home-story-actions { display: flex; flex-wrap: wrap; }

/* Section themes can set --home-section-accent and --home-section-rule. */
.home-editorial :is(.home-reading-section, .home-premises, .home-projects) {
  --reading-accent: var(--home-section-accent, var(--reading-theme, #315664));
  --reading-rule: var(--home-section-rule, var(--reading-theme-rule, #d2d9d8));
  --reading-text: #394a50;
  --reading-measure: 64ch;
  --reading-width: 70rem;
  --reading-columns: minmax(0, .8fr) minmax(0, 1.65fr);
  --reading-column-gap: clamp(2rem, 5vw, 5rem);
  scroll-margin-top: 1.5rem;
}

.home-editorial .home-reading-section:is([data-service="fire-safety"], [aria-labelledby="fire-safety-details"]) {
  --reading-theme: #873e32;
  --reading-theme-rule: #dbcac3;
}

.home-editorial .home-reading-section:is([data-service="electrical"], [aria-labelledby="electrical-details"]) {
  --reading-theme: #735019;
  --reading-theme-rule: #dcd1bc;
}

.home-editorial .home-reading-section:is([data-service="security"], [aria-labelledby="security-details"]) {
  --reading-theme: #3f5066;
  --reading-theme-rule: #cdd4de;
}

.home-editorial .home-reading-section:is([data-service="connectivity"], [aria-labelledby="connectivity-details"]) {
  --reading-theme: #286051;
  --reading-theme-rule: #c9d8d0;
}

.home-editorial .home-premises {
  --reading-theme: #486047;
  --reading-theme-rule: #cdd6c9;
  background: #f5f6f2;
}

.home-editorial .home-projects {
  --reading-theme: #3c5365;
  --reading-theme-rule: #cfd7da;
  background: #f4f6f6;
}

.home-editorial .home-reading-section {
  padding-block: clamp(2.75rem, 5.5vw, 5rem);
}

.home-editorial :is(.home-service, .home-service-shade) + .home-reading-section {
  padding-block-start: clamp(1.25rem, 2.8vw, 2.25rem);
}

.home-editorial :is(.home-reading-heading, .home-reading-section > h2, .home-reading-lead, .home-reading-index, .home-reading-list, .home-reading-grid, .home-reading-faq, .home-projects .home-section-heading, .home-stories, .home-premises > .container) {
  max-inline-size: var(--reading-width);
  margin-inline: auto;
}

.home-editorial :is(.home-reading-section h2, .home-projects h2, .home-premises h2) {
  color: var(--home-ink, #172b3b);
  font-size: clamp(1.7rem, 1.18rem + 1.7vw, 2.65rem);
  line-height: 1.15;
  letter-spacing: -.032em;
  text-wrap: balance;
}

.home-editorial :is(.home-reading-heading, .home-reading-section > h2, .home-projects .home-section-heading, .home-premises h2) {
  margin-block-end: clamp(1rem, 2.7vw, 2rem);
}

.home-editorial :is(.home-reading-heading, .home-projects .home-section-heading) h2 {
  max-inline-size: 29ch;
  margin-block: 0;
}

.home-editorial :is(.home-reading-heading > h2 + p, .home-projects .home-section-heading h2 + p) {
  margin-block-start: .75rem;
}

.home-editorial .home-reading-lead,
.home-editorial .home-projects .home-section-heading p {
  max-inline-size: var(--reading-measure);
  margin-inline-start: 0;
  margin-block-end: 0;
  color: var(--reading-text);
  font-size: 1rem;
  line-height: 1.65;
}

.home-editorial .home-reading-section > .home-reading-lead {
  max-inline-size: var(--reading-width);
  margin-inline: auto;
  margin-block-end: 1.25rem;
}

.home-editorial .home-reading-index {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.35rem;
  margin-block: -.25rem .8rem;
  padding: 0;
  list-style: none;
}

.home-editorial :is(.home-reading-index a, .home-reading-action, .home-projects .home-enquiry, .home-premises .home-enquiry) {
  display: inline-flex;
  align-items: center;
  min-block-size: 44px;
  margin: 0;
  padding-block: .45rem;
  color: var(--reading-accent);
  border: 0;
  font-size: .9rem;
  font-weight: 680;
  line-height: 1.38;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
  overflow-wrap: anywhere;
}

.home-editorial :is(.home-reading-index a, .home-reading-action, .home-projects .home-enquiry, .home-premises .home-enquiry, .home-stories h3 a) > span[aria-hidden="true"] {
  display: none;
}

.home-editorial :is(.home-reading-list, .home-reading-grid, .home-reading-faq, .home-stories) {
  display: block;
  margin-block: 0;
  padding: 0;
  list-style: none;
  border-block-end: 1px solid var(--reading-rule);
}

.home-editorial :is(.home-reading-item, .home-reading-grid > .home-reading-note, .home-stories > article) {
  border-block-start: 1px solid var(--reading-rule);
}

.home-editorial .home-reading-note-heading[id] {
  scroll-margin-top: 1.25rem;
}

.home-editorial .home-reading-item > .home-reading-note {
  border: 0;
}

.home-editorial .home-reading-note,
.home-editorial .home-stories > article {
  min-inline-size: 0;
  padding: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

.home-editorial :is(article.home-reading-note, .home-stories > article) {
  padding-block: clamp(1.1rem, 2.3vw, 1.8rem);
}

.home-editorial :is(.home-reading-note h3, .home-reading-note summary, .home-stories h3) {
  color: var(--home-ink, #172b3b);
  margin: 0;
  font-size: clamp(1.14rem, 1.02rem + .42vw, 1.43rem);
  font-weight: 730;
  line-height: 1.26;
  letter-spacing: -.021em;
  overflow-wrap: anywhere;
}

.home-editorial :is(.home-reading-note-heading, .home-reading-note > h3, .home-story-heading) {
  max-inline-size: 30ch;
  margin-block-end: .65rem;
}

.home-editorial :is(.home-reading-note p, .home-stories p:where(:not(.home-story-meta))) {
  max-inline-size: var(--reading-measure);
  margin: 0;
  color: var(--reading-text);
  font-size: 1rem;
  line-height: 1.68;
}

.home-editorial :is(.home-reading-note p, .home-stories p) + p {
  margin-block-start: .7em;
}

.home-editorial :is(.home-reading-prose, .home-story-content, .home-story-heading, .home-reading-note-heading) {
  min-inline-size: 0;
}

.home-editorial .home-reading-note p + .home-reading-action,
.home-editorial .home-story-actions {
  margin-block-start: .15rem;
}

.home-editorial .home-projects .home-section-heading {
  align-items: flex-start;
  gap: .5rem 2rem;
}

.home-editorial .home-stories h3 a {
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--reading-accent);
  text-underline-offset: .18em;
}

.home-editorial .home-story-meta {
  margin: 0 0 .5rem;
  color: var(--reading-accent);
  font-size: .875rem;
  font-weight: 680;
  line-height: 1.45;
}

.home-editorial .home-story-actions {
  gap: 0 1.4rem;
}

.home-editorial .home-premises .home-enquiry {
  margin-block-start: .7rem;
}

.home-editorial .home-reading-note summary {
  display: list-item;
  min-block-size: 44px;
  padding-block: .85rem;
  cursor: pointer;
}

.home-editorial .home-reading-note summary::marker {
  color: var(--reading-accent);
}

.home-editorial .home-reading-note[open] summary {
  margin-block-end: .15rem;
}

.home-editorial :is(.home-reading-note details, details.home-reading-note) > :is(.home-reading-prose, p, .home-reading-action) {
  margin-inline-start: .95rem;
}

.home-editorial :is(.home-reading-note details, details.home-reading-note)[open] {
  padding-block-end: .8rem;
}

.home-editorial :is(.home-reading-index a, .home-reading-action, .home-reading-note summary, .home-stories h3 a, .home-projects .home-enquiry, .home-premises .home-enquiry):hover {
  color: var(--reading-accent);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: .2em;
}

.home-editorial :is(.home-reading-index a, .home-reading-action, .home-reading-note summary, .home-stories h3 a, .home-projects .home-enquiry, .home-premises .home-enquiry):focus-visible {
  outline: 3px solid var(--reading-accent);
  outline-offset: 3px;
}

@media (min-width: 52rem) {
  .home-editorial :is(article.home-reading-note, .home-stories > article) {
    display: grid;
    grid-template-columns: var(--reading-columns);
    column-gap: var(--reading-column-gap);
    align-items: start;
  }

  .home-editorial :is(.home-reading-note-heading, .home-reading-note > h3, .home-story-heading) {
    grid-column: 1;
    grid-row: 1 / span 2;
    margin-block-end: 0;
  }

  .home-editorial :is(.home-reading-prose, .home-reading-note > p, .home-reading-note > .home-reading-action, .home-story-content, .home-stories > article > p, .home-stories > article > .home-story-actions) {
    grid-column: 2;
  }

  .home-editorial :is(.home-reading-grid article, .home-stories > article:not(.home-story)) > :is(h3, .home-reading-action, .home-story-actions) {
    justify-self: start;
  }
}

@media (max-width: 36rem) {
  .home-editorial .home-reading-index {
    column-gap: 1rem;
  }

  .home-editorial :is(.home-reading-note-heading, .home-reading-note > h3, .home-story-heading) {
    max-inline-size: 100%;
  }

  .home-editorial :is(.home-reading-note details, details.home-reading-note) > :is(.home-reading-prose, p, .home-reading-action) {
    margin-inline-start: .65rem;
  }
}
