/* customers area — owned by the customers agent (29 Nov). Loaded after polish.css on every page.
   Scope: the Customers hub  → main:has(#featured-stories)
          the 22 story pages → main:has(.c-hero)   (.c-hero exists only on customer stories)
   Design only: no copy is added, removed or changed. */

/* ============ Customers hub ============ */

/* Hero: the copy sat 48px in from the breadcrumb and the page edge (padding left from the old white card).
   Line it up with the breadcrumb and every section below. */
main:has(#featured-stories) .p-hero__copy { padding-inline: 0 !important; }

/* Find a story like yours: the "Read the … story" link floated at the top of each row while the text was
   centred — centre all three parts on one line. */
body main #find-a-story-like-yours .rc.rc.rc.rc.rc .d-linkcards__go { align-self: center !important; }
@media (max-width: 48rem) {
  body main #find-a-story-like-yours .rc.rc.rc.rc.rc .d-linkcards__go { align-self: start !important; justify-content: flex-start !important; gap: 0.75rem !important; white-space: normal !important; }
  body main #find-a-story-like-yours .rc.rc.rc.rc.rc .cv { align-self: start; }
}

/* At a glance: a quiet ruled table — no indigo header bar. Column labels as small indigo caps over a
   2px indigo rule; first column flush with the page edge like every other section. */
main:has(#featured-stories) #telecom-case-studies-at-a-glance :is(th, td) { padding: 1rem 1.5rem 1rem 0 !important; }
main:has(#featured-stories) #telecom-case-studies-at-a-glance thead th {
  background: transparent !important; color: var(--indigo) !important; border-radius: 0 !important;
  font-size: 0.75rem !important; font-weight: 700 !important; letter-spacing: 0.1em; text-transform: uppercase;
  padding-block: 0 0.875rem !important; border-bottom: 2px solid var(--indigo) !important;
}
main:has(#featured-stories) #telecom-case-studies-at-a-glance .d-table { border-radius: 0 !important; overflow: visible !important; }
main:has(#featured-stories) #telecom-case-studies-at-a-glance tbody :is(th, td) { border-bottom: 1px solid var(--rule) !important; border-top: 0 !important; }
main:has(#featured-stories) #telecom-case-studies-at-a-glance tbody :is(th, td):first-child { font-weight: 600; }
@media (max-width: 48rem) {
  main:has(#featured-stories) #telecom-case-studies-at-a-glance tbody :is(th, td) { padding: 0.25rem 0 !important; border: 0 !important; }
  main:has(#featured-stories) #telecom-case-studies-at-a-glance tbody tr { padding: 1rem 0 !important; margin: 0 !important; border: 0 !important; border-bottom: 1px solid var(--rule) !important; border-radius: 0 !important; }
  main:has(#featured-stories) #telecom-case-studies-at-a-glance tbody { border-top: 2px solid var(--indigo); }
}

/* Stories by product: the 01–04 number badges become the site's icon tiles (lavender tile, indigo line icon;
   customers.js adds the icon). */
#customer-success-stories-by-product .d-unit .d-feat__n:has(+ .cu-ico),
#customer-success-stories-by-product .d-unit:has(.cu-ico) .d-feat__n { display: none !important; }
.cu-ico {
  display: inline-grid; place-items: center; width: 3rem; height: 3rem; border-radius: 0.75rem; flex: none;
  background: var(--indigo-10); border: 1px solid #D5D2E9; color: var(--indigo); transition: background-color .2s linear, color .2s linear, border-color .2s linear;
}
.cu-ico svg { width: 1.5rem; height: 1.5rem; }
#customer-success-stories-by-product .d-unit:hover .cu-ico { background: var(--indigo); border-color: var(--indigo); color: #fff; }

/* All customer stories: 22 photos at 4:3 made a very tall wall. Covers at 3:2 on desktop; on phones the grid
   becomes a ruled list (thumbnail + title) instead of 22 full-width photos. */
main:has(#featured-stories) .cu-all .rc .cv { aspect-ratio: 3 / 2 !important; }
@media (max-width: 36rem) {
  main:has(#featured-stories) .cu-all { row-gap: 0 !important; border-top: 1px solid var(--rule) !important; }
  body main .cu-all .rc.rc.rc.rc.rc {
    display: grid !important; grid-template-columns: 6.5rem minmax(0, 1fr); align-items: center; column-gap: 1rem;
    padding: 1rem 0 !important; border-bottom: 1px solid var(--rule) !important; border-radius: 0 !important;
  }
  main:has(#featured-stories) .cu-all .rc .cv { aspect-ratio: 4 / 3 !important; margin: 0 !important; border-radius: 0.625rem !important; }
  main:has(#featured-stories) .cu-all .rc > span:not(.cv) { font-size: 1rem !important; }
}

/* Related reading (2 links on this page): the top rule ran the full width over two links. Each link carries
   its own rules so top and bottom match. */
main:has(#featured-stories) .rl-list { border-top: 0 !important; }
main:has(#featured-stories) .rl-list > li:nth-child(-n+3) { border-top: 1px solid var(--rule); }
@media (max-width: 62rem) { main:has(#featured-stories) .rl-list > li:nth-child(3) { border-top: 0; } }
@media (max-width: 36rem) { main:has(#featured-stories) .rl-list > li:nth-child(2) { border-top: 0; } }


/* ============ Customer story template (22 pages) ============ */

/* Hero: the big figure is the page's headline number — give it real size. */
main:has(.c-hero) .c-hero__fig .figure-num { font-size: clamp(3.5rem, 2rem + 4vw, 6rem) !important; line-height: 0.95 !important; }
main:has(.c-hero) .c-hero__fig .figure-num.cu-long { font-size: clamp(2.5rem, 1.5rem + 2.5vw, 3.75rem) !important; white-space: normal !important; }

/* Results: was a 2- or 3-column grid where figures, text-only results and widths changed from story to story
   (and the 4/5-figure stories left holes). Now one form: heading on the left (same column as Challenge),
   results as ruled rows on the right (same column as Solution) — figure, then what it means. */
main:has(.c-hero) .c-res {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important; column-gap: clamp(2rem, 5vw, 5rem) !important; row-gap: var(--ss-head, 3rem) !important; align-items: start;
}
main:has(.c-hero) .c-res > .c-h2 { margin: 0 !important; position: sticky; top: 7rem; }
main:has(.c-hero) .c-res > .c-results.c-results {
  display: grid !important; grid-template-columns: minmax(0, 1fr) !important; gap: 0 !important; margin: 0 !important;
  border-top: 2px solid var(--indigo);
}
main:has(.c-hero) .c-results > li.c-results-li, main:has(.c-hero) .c-res .c-results > li:not(.d-fill) {
  grid-column: 1 / -1 !important; display: grid !important; grid-template-columns: 9.5rem minmax(0, 1fr) !important; column-gap: var(--gap) !important; row-gap: 0.375rem !important;
  align-items: baseline; background: transparent !important; border: 0 !important; border-bottom: 1px solid var(--rule) !important; border-radius: 0 !important;
  padding: 1.5rem 0 !important; container-type: normal !important;
}
main:has(.c-hero) .c-res .c-results > li > .figure-num {
  font-size: clamp(2rem, 1.4rem + 1.2vw, 2.625rem) !important; line-height: 1 !important; letter-spacing: -0.03em !important;
  white-space: nowrap !important; color: var(--indigo) !important;
}
main:has(.c-hero) .c-res .c-results > li > .figure-num.cu-long { font-size: clamp(1.375rem, 1.1rem + 0.6vw, 1.625rem) !important; white-space: normal !important; line-height: 1.15 !important; letter-spacing: -0.01em !important; }
main:has(.c-hero) .c-res .c-results > li > span:not(.figure-num) { grid-column: 2; font-size: 1.0625rem; line-height: 1.6; color: var(--graphite); }
@media (max-width: 62rem) {
  main:has(.c-hero) .c-res { grid-template-columns: minmax(0, 1fr) !important; }
  main:has(.c-hero) .c-res > .c-h2 { position: static; }
}
@media (max-width: 36rem) {
  main:has(.c-hero) .c-res .c-results > li:not(.d-fill) { grid-template-columns: minmax(0, 1fr) !important; }
  main:has(.c-hero) .c-res .c-results > li > span:not(.figure-num) { grid-column: 1; }
}

/* Customer quote (8 stories): no pale-cyan box; the same two columns as Results — who said it on the left,
   the quote on the right, at a calmer size. */
main:has(.c-hero) .c-quote.c-quote {
  background: transparent !important; border-radius: 0 !important; padding: 0 !important; border: 0 !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important; column-gap: clamp(2rem, 5vw, 5rem) !important;
}
main:has(.c-hero) .c-quote blockquote p {
  font-size: clamp(1.375rem, 1rem + 1vw, 1.875rem) !important; line-height: 1.4 !important; font-weight: 500 !important; color: var(--indigo) !important;
  padding-left: 1.5rem; border-left: 2px solid var(--turquoise);
}
main:has(.c-hero) .c-quote figcaption strong { color: var(--graphite); font-size: 1.0625rem; }
main:has(.c-hero) .c-quote figcaption span { color: var(--ink-2); }
@media (max-width: 48rem) {
  main:has(.c-hero) .c-quote.c-quote { grid-template-columns: minmax(0, 1fr) !important; grid-template-areas: "quote" "cap" !important; row-gap: 1.5rem !important; }
}

/* Related customer stories: open photo stories (as the hub's Featured stories) instead of white boxes with
   grey chips. Region · type as one plain label line; cover photo from covers.json (customers.js). */
main:has(.c-hero) .c-more-head .arrow-link { white-space: nowrap; flex: none; }
main:has(.c-hero) .cells .cell.case {
  background: transparent !important; box-shadow: none !important; border: 0 !important; border-radius: 0 !important; padding: 0 !important;
  position: relative; gap: 0.75rem !important;
}
main:has(.c-hero) .cells .cell.case::before, main:has(.c-hero) .cells .cell.case::after { display: none !important; }
main:has(.c-hero) .case .cv { display: block; aspect-ratio: 3 / 2; border-radius: var(--r-tile); overflow: hidden; background: var(--indigo-10); margin-bottom: 0.5rem; }
main:has(.c-hero) .case .cv img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s var(--ease-out); }
main:has(.c-hero) .case:hover .cv img { transform: scale(1.04); }
main:has(.c-hero) .case .case__meta { margin: 0 !important; gap: 0 !important; }
main:has(.c-hero) .case .case__meta .tag {
  background: transparent !important; padding: 0 !important; border-radius: 0 !important; border: 0 !important;
  color: var(--ink-2) !important; font-size: 0.75rem !important; font-weight: 600 !important; letter-spacing: 0.1em;
}
main:has(.c-hero) .case .case__meta .tag + .tag::before { content: "·"; margin: 0 0.5rem; }
main:has(.c-hero) .case .case__fig .figure-num { font-size: clamp(2.25rem, 1.6rem + 1.2vw, 2.75rem) !important; color: var(--indigo) !important; }
main:has(.c-hero) .case .case__fig .figure-num.cu-long { font-size: clamp(1.75rem, 1.3rem + 1vw, 2.25rem) !important; }
main:has(.c-hero) .case .case__op { margin-top: 0.25rem !important; }
main:has(.c-hero) .case p:not(.case__fig) { color: var(--ink-2) !important; line-height: 1.65; }
main:has(.c-hero) .case .cell__foot { justify-content: flex-start !important; gap: 0.75rem; margin-top: auto; padding-top: 0.5rem; color: var(--indigo) !important; }
main:has(.c-hero) .case:hover .cell__foot { text-decoration: underline; text-underline-offset: 0.2em; }
main:has(.c-hero) .case:focus-visible { outline: 2px solid var(--indigo); outline-offset: 4px; border-radius: var(--r-tile) !important; }
main:has(.c-hero) .case .case__label, main:has(.c-hero) .case:is(:hover, :focus-visible) .case__label { color: var(--graphite) !important; }

/* Kevin's rule: one tile gap (--gap) across and down. Featured stories (was ~43px across) and the
   All customer stories grid (was 40px down) now use --gap both ways. */
main:has(#featured-stories) #featured-stories .d-units { gap: var(--gap) !important; }
main:has(#featured-stories) .cu-all { gap: var(--gap) !important; }
@media (max-width: 36rem) { main:has(#featured-stories) .cu-all { gap: 0 !important; } }
