/* Nonprofit service catalog: the existing site palette and system fonts. */
.service-page {
  --service-space: clamp(3.5rem, 6vw, 6rem);
  --service-pad: max(var(--gutter), calc((100% - var(--shell)) / 2 + var(--gutter)));
}
.service-page [hidden] { display: none !important; }
.service-page > .section {
  padding: var(--service-space) var(--service-pad);
}
.service-page > .section > * {
  width: 100%;
  max-width: none;
  margin-inline: 0;
  padding-inline: 0;
}
.service-page :is(section, article, div, dl) { min-width: 0; }
.service-page h1 { font-size: clamp(2.15rem, 4.2vw, 3.6rem); max-width: 24ch; }
.service-page h2 { font-size: clamp(1.7rem, 3vw, 2.55rem); max-width: 30ch; }
.service-page h3 { font-size: clamp(1.2rem, 1.65vw, 1.5rem); line-height: 1.25; }
.service-page p, .service-page li { line-height: 1.65; }
.service-page .eyebrow { font-size: .8rem; line-height: 1.5; }
.service-hero { padding-inline: var(--service-pad); padding-bottom: clamp(3rem, 6vw, 5rem); }
.service-hero > * { width: 100%; margin-inline: 0; }
.service-hero .lede { max-width: 65ch; font-size: clamp(1.05rem, 1.65vw, 1.25rem); }
.service-hero .button-row { margin-top: 2rem; }
.service-hero .text-link { color: var(--white); }
.service-section-heading { margin-bottom: 2.25rem; }
.service-section-heading h2 { margin-bottom: 1.15rem; }
.service-section-heading > p:not(.eyebrow) { max-width: 68ch; color: #45504b; }
.service-reading { max-width: 50rem !important; }
.service-reading > p:not(.eyebrow) { max-width: 68ch; }
.service-reading .lede { font-size: clamp(1.05rem, 1.7vw, 1.25rem); }
.service-grid, .measure-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
}
.service-card {
  display: flex;
  flex-direction: column;
  padding: clamp(1.4rem, 2.6vw, 2rem);
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
}
.service-card .eyebrow { color: #694038; margin-bottom: 1.75rem; }
.service-card h3 { margin-bottom: 1rem; }
.service-card h3 a { text-decoration-thickness: 1px; text-underline-offset: .22em; }
.service-card h3 a:hover { color: #9d302a; }
.service-card h3 a span { white-space: nowrap; }
.service-card > p:last-child { margin-bottom: 0; color: #45504b; }
.service-more { display: inline-block; margin-top: 2rem; font-weight: 600; text-underline-offset: .2em; }
.service-page .section-dark :is(.service-section-heading > p:not(.eyebrow), .policy-source) { color: #d0d9d3; }
.service-page .section-dark .eyebrow { color: var(--coral); }
.section-dark .service-card { background: var(--ink-2); border-color: var(--line-dark); color: var(--white); }
.section-dark .service-card > p:last-child { color: #d0d9d3; }
.section-dark .service-card a:hover { color: var(--coral); }
.service-page .section-dark a:focus-visible { outline-color: var(--white); }
.service-page :is(a, button, summary):focus-visible,
.service-footer a:focus-visible { outline: 3px solid #9d302a; outline-offset: 5px; }
.service-footer a:focus-visible { outline-color: var(--coral); }

/* The five-stage example remains complete when JavaScript is unavailable. */
.journey {
  display: grid;
  grid-template-columns: minmax(13rem, .75fr) minmax(0, 1.7fr);
  border: 1px solid var(--line);
  background: var(--white);
}
.journey-controls:not([hidden]) {
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  background: var(--paper-2);
  border-right: 1px solid var(--line);
}
.journey-controls [role="tablist"] { display: grid; gap: .5rem; }
.journey-controls [role="tab"] {
  display: flex;
  align-items: baseline;
  gap: .8rem;
  width: 100%;
  min-height: 3.2rem;
  padding: .8rem;
  border: 1px solid transparent;
  color: var(--ink);
  background: transparent;
  text-align: left;
  cursor: pointer;
  line-height: 1.4;
}
.journey-controls [role="tab"] span { font-size: .8rem; font-weight: 650; }
.journey-controls [role="tab"]:hover { background: rgba(255,255,255,.65); border-color: var(--line); }
.journey-controls [role="tab"][aria-selected="true"] { background: var(--ink); color: var(--white); border-color: var(--ink); }
.journey-controls [role="tab"][aria-selected="true"] span { color: var(--coral); }
.journey-controls [role="tab"][aria-selected="true"]:focus-visible { outline-color: #9d302a; }
.journey-playback { display: flex; flex-wrap: wrap; gap: .55rem; padding-top: 1.5rem; margin-top: auto; }
.journey-playback button {
  min-height: 2.8rem;
  padding: .55rem .7rem;
  border: 1px solid #8a918a;
  background: var(--white);
  color: var(--ink);
  line-height: 1.4;
  cursor: pointer;
}
.journey-playback button:hover { background: var(--ink); color: var(--white); }
.journey-playback button:disabled { opacity: .55; cursor: default; }
.journey-playback p { flex-basis: 100%; margin: .45rem 0 0; color: #45504b; font-size: .9rem; }
.journey-panels { grid-column: 1 / -1; }
.journey-controls:not([hidden]) + .journey-panels { grid-column: 2; }
.journey-panels > article { padding: clamp(1.5rem, 4vw, 3rem); }
.journey-panels > article + article { border-top: 1px solid var(--line); }
.journey-panels > article > .eyebrow { margin-bottom: 2rem; color: #694038; }
.journey-stage { max-width: 43rem; }
.journey-symbol {
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  margin-bottom: 1.5rem;
  background: var(--paper-2);
  color: var(--ink);
  font-size: 1.7rem;
  line-height: 1;
}
.journey-stage h3 { margin-bottom: 1rem; font-size: clamp(1.4rem, 2.4vw, 2rem); }
.journey-stage p { max-width: 58ch; margin-bottom: 0; font-size: 1.05rem; }
.example-note { grid-column: 1 / -1; padding: 1rem 1.5rem; margin: 0; border-top: 1px solid var(--line); font-size: .9rem; color: #45504b; }

/* Funding, practical work and measurement use separate reading structures. */
.funding-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.funding-grid > article { padding: clamp(1.5rem, 3vw, 2.5rem); border: 1px solid var(--line); background: var(--white); }
.funding-grid > article:last-child { background: var(--paper-2); }
.funding-badge { display: inline-block; max-width: 100%; padding: .4rem .65rem; margin-bottom: 1.2rem; background: #dceacc; color: #253e1d; font-size: .8rem; font-weight: 650; line-height: 1.45; }
.funding-badge.paid { background: #e6ddd7; color: #553b2e; }
.funding-grid h3 { margin-bottom: 1.2rem; }
.funding-grid p { color: #37413d; }
.funding-grid a { display: inline-block; margin-top: .5rem; font-weight: 600; text-underline-offset: .2em; }
.service-page > .section > .policy-source { max-width: 78ch; margin-top: 1.5rem; font-size: .9rem; color: #45504b; }
.policy-source a { text-underline-offset: .2em; }
.measure-grid > article { padding-top: 1.5rem; border-top: 2px solid #8b958b; }
.measure-grid h3 { margin-bottom: 1rem; }
.measure-grid p { color: #45504b; margin-bottom: 0; }
.service-page > .section > .service-readiness { margin-top: 3rem; padding: clamp(1.5rem, 3vw, 2.5rem); background: var(--paper-2); }
.service-readiness ul { max-width: 70ch; margin: 1.3rem 0 0; padding-left: 1.3rem; }
.service-readiness li + li { margin-top: .65rem; }
.service-page > .section > .service-scope { margin-top: 3rem; padding: 1.5rem 0 0 1.5rem; border-top: 1px solid var(--line); border-left: 3px solid #8b958b; }
.service-scope h2 { max-width: 35ch; font-size: clamp(1.3rem, 2vw, 1.6rem); }
.service-scope p { max-width: 78ch; color: #45504b; margin-bottom: 0; }
.service-faq { border-top: 1px solid var(--line); }
.service-faq details { border-bottom: 1px solid var(--line); }
.service-faq summary { min-height: 3.5rem; padding: 1.3rem 1.5rem 1.3rem 0; cursor: pointer; font-weight: 600; line-height: 1.5; }
.service-faq summary::marker { color: #9d302a; }
.service-faq details[open] summary { padding-bottom: .9rem; }
.service-faq details > p { max-width: 68ch; padding: 0 1.5rem .6rem 0; color: #45504b; }
.service-page > .service-next > .callout { width: 100%; padding: clamp(1.75rem, 4vw, 3.5rem); }
.service-next .callout { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.service-next .callout h2 { max-width: 26ch; }
.service-next .callout p:last-child { margin-bottom: 0; }
.service-next .button { flex: 0 0 auto; max-width: 21rem; gap: 1rem; }
.service-funding-strip { background: var(--paper-2); border-bottom: 1px solid var(--line); padding-block: 1.6rem; }
.service-funding-strip .shell { display: grid; grid-template-columns: minmax(12rem,.65fr) minmax(0,1.6fr); gap: 2rem; }
.service-funding-strip p { margin: 0; }
.service-two-column { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: clamp(2rem, 5vw, 5rem); }
.service-two-column h3 { margin-top: 2rem; }
.service-two-column ul, .service-limitations ul { padding-left: 1.25rem; margin-bottom: 0; }
.service-two-column li + li, .service-limitations li + li { margin-top: .75rem; }
.service-inputs { padding: clamp(1.5rem, 3vw, 2.5rem); background: var(--white); border: 1px solid var(--line); }
.service-inputs h3:first-child { margin-top: 0; }
.service-page > .section > .service-limitations { padding: 1.5rem; margin-top: 2.5rem; background: var(--paper-2); border-left: 3px solid #8b958b; }
.service-limitations ul { max-width: 82ch; }
.option-comparison { display: grid; gap: 0; }
.option-comparison > article { display: grid; grid-template-columns: 1.1fr 1.2fr 1.2fr; gap: 2rem; padding: 2rem 0; border-top: 1px solid var(--line); }
.option-comparison > article:last-child { border-bottom: 1px solid var(--line); }
.option-comparison h3 { margin: 0 0 .85rem; }
.option-comparison h3 a { text-underline-offset: .2em; }
.option-comparison .funding-badge { margin-bottom: 0; }
.option-comparison p { margin-bottom: 0; color: #45504b; }

/* Format diagrams are illustrative compositions, not platform screenshots. */
.format-example { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(15rem, 1fr); border: 1px solid var(--line); background: var(--white); }
.format-stage { display: flex; flex-direction: column; justify-content: center; min-height: 23rem; padding: clamp(1.5rem, 3vw, 3rem); background: var(--paper-2); }
.format-stage > p:last-child { margin: 1.5rem 0 0; max-width: 60ch; color: #37413d; }
.format-decisions { display: grid; align-content: center; gap: 1.5rem; padding: 2rem; margin: 0; border-left: 1px solid var(--line); }
.format-decisions > div + div { padding-top: 1.5rem; border-top: 1px solid var(--line); }
.format-decisions dt { margin-bottom: .5rem; font-size: .8rem; font-weight: 650; text-transform: uppercase; letter-spacing: .08em; color: #694038; }
.format-decisions dd { margin: 0; color: #37413d; }
.ad-label { font-size: .8rem; font-weight: 600; line-height: 1.5; }
.format-stage h3 { font-size: clamp(1.25rem, 2vw, 1.7rem); }
.ad-search { padding: 1.5rem; background: var(--white); border: 1px solid var(--line); box-shadow: 0 .4rem 0 rgba(17,24,21,.05); }
.ad-search-query { padding: .8rem 1rem; margin: 0 0 1.75rem; border: 1px solid #9fa89f; border-radius: 2rem; color: #37413d; font-size: .95rem; }
.ad-search .ad-label { margin-bottom: .55rem; }
.ad-search h3 { color: #25513d; margin-bottom: .75rem; }
.ad-search > p:last-child { margin-bottom: 0; }
.ad-map { position: relative; padding-top: 7.5rem; }
.map-lines { position: absolute; inset: 0 0 auto; height: 12rem; overflow: hidden; background: repeating-linear-gradient(30deg,transparent 0,transparent 2.5rem,#aabfa8 2.5rem,#aabfa8 2.8rem),#d6dfc9; }
.map-lines i { position: absolute; display: block; width: 130%; height: 1.2rem; background: var(--paper); transform: rotate(-25deg); }
.map-lines i:nth-child(1) { top: 2rem; left: -1rem; }
.map-lines i:nth-child(2) { top: 7rem; left: -1rem; transform: rotate(38deg); }
.map-lines i:nth-child(3) { top: 9rem; left: -3rem; transform: rotate(-25deg); }
.map-lines > span { position: absolute; top: 2.8rem; left: 55%; display: grid; place-items: center; width: 2.7rem; height: 2.7rem; border: 5px solid var(--white); border-radius: 50%; background: #9d302a; color: var(--white); box-shadow: 0 2px 8px #11181533; }
.map-location { position: relative; margin: 0 1rem; padding: 1.5rem; background: var(--white); border: 1px solid var(--line); }
.map-location h3 { margin-bottom: .65rem; }
.map-location p:last-child { margin: 0; }
.ad-storyboard { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: .65rem; }
.ad-storyboard > div { display: flex; min-height: 13rem; flex-direction: column; justify-content: space-between; padding: 1rem; background: var(--ink); color: var(--white); border-top: .4rem solid var(--coral); }
.ad-storyboard > div:nth-child(2) { background: #304c3b; }
.ad-storyboard > div:nth-child(3) { background: #573d33; }
.ad-storyboard span { font-size: .85rem; color: #f2d9d1; }
.ad-storyboard h3 { font-size: clamp(1.05rem, 1.5vw, 1.35rem); margin: 2rem 0 0; }
.ad-assets { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; gap: 1rem; }
.ad-assets > div { padding: 1.25rem; background: var(--white); border: 1px solid var(--line); }
.ad-assets ul { padding-left: 1rem; margin: 0; }
.ad-assets li + li { margin-top: .7rem; }
.ad-assets h3 { font-size: 1.25rem; }
.ad-assets > div:last-child { background: var(--ink); color: var(--white); }
.ad-assets > div:last-child .ad-label { color: var(--coral); }
.ad-assets > div:last-child p:last-child { margin-bottom: 0; font-size: .95rem; }
.asset-arrow { color: #694038; font-size: 1.6rem; }
.ad-gates { display: grid; gap: .7rem; }
.ad-gates > div { display: grid; grid-template-columns: 2.4rem 1fr; align-items: center; gap: 1rem; padding: 1rem; border: 1px solid #9fa89f; background: var(--white); }
.ad-gates span { display: grid; place-items: center; height: 2.4rem; background: var(--ink); color: var(--white); font-size: .8rem; }
.ad-gates h3 { font-size: 1.1rem; margin: 0; }
.ad-shop, .ad-app { display: grid; grid-template-columns: 6rem minmax(0,1fr); gap: 1.5rem; align-items: center; padding: 1.5rem; border: 1px solid var(--line); background: var(--white); }
.product-shape { position: relative; width: 5.5rem; height: 6.2rem; margin-top: 1.2rem; border: 2px solid #53694f; background: #d6dfc9; }
.product-shape::before { content: ''; position: absolute; width: 2.8rem; height: 2rem; left: 50%; top: -1.4rem; transform: translateX(-50%); border: 2px solid #53694f; border-bottom: 0; border-radius: 1.4rem 1.4rem 0 0; }
.product-shape::after { content: ''; position: absolute; width: 2rem; height: 2rem; left: 50%; top: 40%; transform: translate(-50%,-50%); background: #53694f; border-radius: 50%; }
.ad-shop p:last-child, .ad-app p:last-child { margin-bottom: 0; }
.app-shape { display: grid; place-items: center; width: 5rem; height: 8rem; border: .35rem solid var(--ink); border-radius: .9rem; background: var(--coral); color: var(--ink); font-size: 2.4rem; }
.ad-display { display: grid; grid-template-columns: .6fr 1.4fr; gap: 1rem; align-items: center; padding: 1.25rem; background: var(--white); border: 1px solid var(--line); }
.display-context { display: grid; gap: .75rem; align-content: start; }
.display-context span { height: 1.2rem; background: #d5d9d0; }
.display-context span:first-child { height: 5rem; background: #b6c5ae; }
.display-context span:last-child { width: 65%; }
.display-creative { padding: 1.4rem; background: var(--ink); color: var(--white); border-top: .4rem solid var(--coral); }
.display-creative .ad-label { color: var(--coral); }
.display-creative p:last-child { margin: 0; color: #d0d9d3; }
/* Demand Gen uses a feed card, distinct from the in-page Display illustration. */
.ad-demand .ad-display, .ad-display.ad-demand { grid-template-columns: 1fr; max-width: 27rem; margin-inline: auto; padding: 0; background: var(--white); }
.ad-demand .display-context, .ad-display.ad-demand .display-context { padding: 1rem; grid-template-columns: 1fr 2fr; align-items: center; }
.ad-demand .display-context span:first-child, .ad-display.ad-demand .display-context span:first-child { grid-row: 1 / 3; width: 3.5rem; height: 3.5rem; border-radius: 50%; }
.ad-demand .display-context span:last-child, .ad-display.ad-demand .display-context span:last-child { width: 75%; }
.ad-demand .display-creative, .ad-display.ad-demand .display-creative { padding: 1.5rem; background: #d6dfc9; color: var(--ink); border-top: 0; border-bottom: .4rem solid #53694f; }
.ad-demand .display-creative .ad-label, .ad-display.ad-demand .display-creative .ad-label { color: #374d31; }
.ad-demand .display-creative p:last-child, .ad-display.ad-demand .display-creative p:last-child { color: #37413d; }

/* Shared catalog footer also appears on the existing site routes. */
.service-footer { display: grid; grid-template-columns: 1.1fr 1.3fr 1.3fr .7fr; gap: clamp(1.5rem, 3vw, 3rem); padding-bottom: 3.5rem; }
.service-footer > div { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.service-footer h2 { font: 650 .8rem/1.5 var(--font-display); letter-spacing: .1em; text-transform: uppercase; color: #aeb8b2; margin: 0 0 1rem; }
.service-footer > div:first-child p { max-width: 26ch; margin: 1.25rem 0; color: #c5cfc8; }
.service-footer .brand { font-size: 1.4rem; }
.service-footer .brand > span { color: var(--coral); }
.service-footer a:not(.brand) { min-height: 2.75rem; padding-block: .45rem; color: #e0e7e2; text-decoration: none; font-size: .9rem; line-height: 1.5; }
.service-footer a:not(.brand):hover { color: var(--coral); text-decoration: underline; text-underline-offset: .2em; }
.site-footer:has(.service-footer) .footer-meta { align-items: flex-start; gap: 1rem; }
.site-footer:has(.service-footer) .footer-meta > a { min-height: 2.75rem; max-width: 30rem; line-height: 1.5; }

@media (max-width: 1100px) {
  .service-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .service-next .callout { display: block; }
  .service-next .button { margin-top: 2rem; }
  .service-footer { grid-template-columns: repeat(2, minmax(0,1fr)); column-gap: 3rem; row-gap: 2.5rem; }
  .ad-assets { gap: .6rem; }
  .ad-assets > div { padding: 1rem; }
}
@media (max-width: 900px) {
  .journey { grid-template-columns: 1fr; }
  .journey-controls:not([hidden]) { border-right: 0; border-bottom: 1px solid var(--line); }
  .journey-controls [role="tablist"] { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .journey-controls [role="tab"] { flex-direction: column; gap: .25rem; }
  .journey-controls:not([hidden]) + .journey-panels { grid-column: 1; }
  .journey-playback { margin-top: .5rem; padding-top: 1rem; }
  .format-example { grid-template-columns: 1fr; }
  .format-stage { min-height: 20rem; }
  .format-decisions { border-left: 0; border-top: 1px solid var(--line); grid-template-columns: repeat(3,minmax(0,1fr)); padding: 1.5rem; gap: 1.25rem; }
  .format-decisions > div + div { border-top: 0; padding-top: 0; }
  .option-comparison > article { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1.25rem 2rem; }
  .option-comparison > article > div { grid-column: 1 / -1; }
  .option-comparison h3 { max-width: none; }
}
@media (max-width: 700px) {
  .service-grid, .measure-grid, .funding-grid, .service-two-column { grid-template-columns: 1fr; }
  .service-section-heading { margin-bottom: 1.75rem; }
  .service-card .eyebrow { margin-bottom: 1.25rem; }
  .measure-grid { gap: 2rem; }
  .service-funding-strip .shell { grid-template-columns: 1fr; gap: .65rem; }
  .service-page > .service-next > .callout { padding: 1.5rem; }
  .service-next .button { max-width: 100%; width: 100%; }
  .service-page > .section > .service-scope { padding-left: 1rem; }
}
@media (max-width: 480px) {
  .service-hero { padding-top: 7rem; }
  .service-page h1 { font-size: 2.1rem; }
  .service-page h2 { font-size: 1.7rem; }
  .journey-controls:not([hidden]) { padding: 1rem; }
  .journey-controls [role="tablist"] { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .journey-controls [role="tab"] { font-size: .95rem; }
  .journey-panels > article { padding: 1.5rem; }
  .journey-stage p { font-size: 1rem; }
  .journey-panels > article > .eyebrow { margin-bottom: 1.5rem; }
  .example-note { padding: 1rem; }
  .format-stage { padding: 1.2rem; }
  .format-decisions { grid-template-columns: 1fr; }
  .format-decisions > div + div { padding-top: 1rem; border-top: 1px solid var(--line); }
  .ad-search { padding: 1rem; }
  .ad-search-query { border-radius: .9rem; }
  .ad-storyboard { grid-template-columns: 1fr; }
  .ad-storyboard > div { min-height: 6rem; display: grid; grid-template-columns: 2rem 1fr; align-items: center; gap: .75rem; }
  .ad-storyboard h3 { margin: 0; }
  .ad-assets { grid-template-columns: 1fr; }
  .asset-arrow { transform: rotate(90deg); justify-self: center; line-height: 1; }
  .ad-shop, .ad-app { grid-template-columns: 4rem minmax(0,1fr); gap: 1rem; padding: 1rem; }
  .product-shape { width: 3.7rem; height: 4.7rem; }
  .app-shape { width: 3.7rem; height: 6rem; }
  .ad-display { grid-template-columns: 1fr; padding: 1rem; }
  .display-context { grid-template-columns: 2fr 1fr; }
  .display-context span:first-child { grid-row: 1 / 3; height: 4rem; }
  .display-context span:last-child { width: 100%; }
  .display-creative { padding: 1.1rem; }
  .option-comparison > article { grid-template-columns: 1fr; }
  .service-footer { grid-template-columns: 1fr; gap: 2rem; }
  .service-footer > div + div { padding-top: 1.5rem; border-top: 1px solid var(--line-dark); }
}
@media (max-height: 500px) and (min-width: 700px) {
  .service-hero { padding-top: 7rem; }
  .journey-panels > article { padding: 1.5rem; }
  .journey-controls [role="tablist"] { grid-template-columns: repeat(5,minmax(0,1fr)); }
  .journey-controls [role="tab"] { padding: .6rem; font-size: .9rem; }
}
@media (prefers-reduced-motion: reduce) {
  .service-page *, .service-page *::before, .service-page *::after { scroll-behavior: auto; transition: none !important; animation: none !important; }
}
