/* GDB Project Sheet. This file is linked only on opted-in public page families. */
body :where(main, #main) {
  --sheet-paper: #faf9f6;
  --sheet-ink: #242421;
  --sheet-line: #bdb5a9;
  --sheet-orange: #f78c1e;
  --sheet-graphite: #41413f;
}

/* Service planning, local project information and completed-work notes. */
body.service-page #main > :is(.service-intro, .service-process, .service-faq, .sx--tint, .faq),
body.area-layout-page #main > :is(.sx--tint, .faq),
body.area-overview-page #main .area-directory-section,
body.about-page #main .about-working-together,
body.gallery-page #main .gallery-notes,
body.homepage #main .home-restored-planning {
  background-color: var(--sheet-paper);
}
body.service-page #main :is(.service-intro, .service-process, .service-faq, .sx--tint, .faq) h2,
body.area-layout-page #main :is(.sx--tint, .area-directory-section, .faq) h2,
body.about-page #main .about-working-together :is(h2, h3),
body.gallery-page #main .gallery-notes :is(h2, h3),
body.homepage #main :is(.home-restored-planning, .lower-faq-panel) h2 {
  color: var(--sheet-ink);
}
body:is(.service-page, .area-layout-page) #main :is(.sx--tint, .faq) .eyebrow > .rule {
  width: 2.5rem;
  height: 2px;
  background-color: var(--sheet-orange);
}

/* A single mark and hairline under the heading of each unnumbered reference panel. */
body.service-page #main .process-intro > h2,
body.homepage #main #home-planning-heading,
body.about-page #main #about-planning-heading,
body.gallery-page #main .gallery-notes > h2,
body.contact-page #main .contact-office .office-heading {
  padding-block-end: 0.5em;
  background-image: linear-gradient(to right, var(--sheet-orange) 2.5rem, var(--sheet-line) 2.5rem);
  background-size: 100% 2px;
  background-position: left bottom;
  background-repeat: no-repeat;
}
body:is(.service-page, .area-layout-page) #main :is(.steps > .step, .sproc > li),
body:is(.homepage, .service-page, .area-layout-page) #main :is(.lower-faq-panel, #faq) details,
body.about-page #main .about-working-together .company-service,
body.gallery-page #main .gallery-note-grid > div {
  border-block-start: 1px solid var(--sheet-line);
}
body:is(.service-page, .area-layout-page) #main > section.areas:not(.wrap) {
  background-color: var(--sheet-graphite);
}

/* The contact-page treatment belongs to the office information only. */
body.contact-page #main .contact-office .office-details {
  background-color: var(--sheet-paper);
}
body.contact-page #main .contact-office .office-heading {
  color: var(--sheet-ink);
}
body.contact-page #main .contact-office .office-contact-rows .office-row {
  border-color: var(--sheet-line);
}

/* Reading editions keep the established article measure, navigation and card media. */
body.guides-index #main .blog,
body.guides-article #main article .post {
  background-color: var(--sheet-paper);
}
body.guides-index #main .blog .blog__card {
  box-shadow: inset 0 -1px var(--sheet-line);
}
body.guides-index #main .blog .blog__card > b,
body.guides-article #main article .prose :is(h2, h3) {
  color: var(--sheet-ink);
}
body.guides-article #main article .prose > h2 {
  padding-block-start: 0.65em;
  border-block-start: 1px solid var(--sheet-line);
}
body.guides-article #main article .post__toc {
  background-color: #fff;
  border-block-start: 2px solid var(--sheet-line);
  background-image: linear-gradient(var(--sheet-orange), var(--sheet-orange));
  background-size: 2.5rem 2px;
  background-position: left top;
  background-repeat: no-repeat;
}

/* Neighbourhood profiles have their own planning and question sections. */
body.area-layout-page #main .area-section:is(#planning, #questions) {
  background-color: var(--sheet-paper);
}
body.area-layout-page #main .area-section:is(#planning, #questions) > h2 {
  color: var(--sheet-ink);
  padding-block-end: 0.5em;
  background: linear-gradient(to right, var(--sheet-orange) 2.5rem, var(--sheet-line) 2.5rem)
    left bottom / 100% 2px no-repeat;
}
body.area-layout-page #main .area-faq details {
  border-block-start: 1px solid var(--sheet-line);
}

@media (max-width: 600px) {
  body.contact-page #main .contact-office .office-contact-rows .office-row {
    grid-template-columns: 3.5rem minmax(0, 1fr);
  }
  body.contact-page #main .contact-office .office-contact-rows .office-row > span {
    white-space: nowrap;
  }
}

/* Apply the Design & Permits reading treatment to equivalent page bodies. */
body #main :is(.lower-guides .guide, .company-services .company-service, .area-service-card,
              .area-planning-grid > article, .area-alias-entry, .service-intro .scope-item,
              .scope-section .scope-item, .sgrid .scard, .blog__grid .blog__card,
              .next__grid .next__card) {
  border-block-end: 1px solid var(--sheet-line);
  border-radius: 0;
  min-inline-size: 0;
}
body #main :is(.sgrid .scard, .area-directory-section .area-alias-entry,
              .scope-section .scope-item, .company-services .company-service) {
  background-color: var(--sheet-paper);
  border-color: var(--sheet-line);
}
body #main :is(.scope-section .scope-item, .area-planning-grid > article) {
  border-block-start: 1px solid var(--sheet-line);
}
body #main :is(.lower-guides .guide, .area-service-card, .blog__grid .blog__card,
              .next__grid .next__card) :is(h3, b),
body #main :is(.area-directory-section .area-alias-entry, .scope-section .scope-item) h3 {
  color: var(--sheet-ink);
}

/* Keep long lists legible with one reference rule at the section heading. */
body.area-layout-page #main .area-section .area-section-heading h2,
body #main .sgrid .scard__in h3 {
  color: var(--sheet-ink);
}
body #main :is(.company-services, .scope-section, .lower-guides, .home-services-visual) .sectionhead h2,
body #main .next > .sec-title,
body #main .area-section-heading > h2 {
  border-block-end: 1px solid var(--sheet-line);
  padding-block-end: .38em;
  background: linear-gradient(var(--sheet-orange), var(--sheet-orange)) left bottom / 2.5rem 2px no-repeat;
}

/* Local and service proof rows take the same crisp edge as the reference. */
body #main :is(.sx--tint, .sx--plain, .sx--warm) .sfeat__c {
  min-inline-size: 0;
  border-radius: 0;
  border-color: var(--sheet-line);
}
body #main .next__card:focus-visible,
body #main :is(.scope-item, .area-service-card, .scard, .area-alias-entry, .lower-guides) a:focus-visible {
  outline: 2px solid #864600;
  outline-offset: 2px;
}

/* Utility pages retain the document, confirmation or client portal workflow. */
body #main > .doc {
  background-color: var(--sheet-paper);
}
body #main .doc .prose {
  color: var(--sheet-graphite);
}
body #main .doc .prose h2 {
  color: var(--sheet-ink);
  border-block-start: 1px solid var(--sheet-line);
  padding-block-start: .65em;
}
body #main:has(> .hero) > .sx--tint .sfeat__c {
  border-radius: 0;
}
body #main .ty .ty__list > li + li {
  border-block-start: 1px solid #716e69;
  padding-block-start: .65rem;
}

/* The reference pairs serif headings with sans-serif service explanations. */
body #main :is(.doc .prose, .sfeat__c, .area-planning-grid > article,
              .area-service-card, .area-alias-entry, .scope-item, .company-service) :is(h2, h3),
body #main :is(.sgrid .scard__t, .next__card > b, .gallery-note-grid h3) {
  font-family: SourceSerif, "Source Serif 4", Georgia, serif;
}
body #main :is(.sfeat__c, .area-planning-grid > article, .area-service-card,
              .area-alias-entry, .scope-item, .company-service) > p,
body #main .doc .prose {
  font-family: Instrument, "Instrument Sans", Arial, sans-serif;
}
@media (max-width: 600px) {
  body.area-layout-page #main .area-planning-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
