/* Customer stories on Polar Night (overnight build, 19 Nov 2026). Loaded after /vendor/polar-tokens and /products/products.css,
   which stay unedited. The layout is src/layouts/CustomerStory.astro; everything here is scoped under .cs-page.
   Rules kept from design-system/page-build-decisions.md: dark page, moving aurora panels (Ice family on a general page),
   violet only for accents and the main button, no corner glows, no left-border bars, alpha-white fills for cards. */

/* ---------- hero ---------- */
.cs-page .px-hero.pn-hero {
  padding-top: var(--pn-space-6);
}
.cs-page .px-hero {
  padding-bottom: clamp(var(--pn-space-12), 6vw, var(--pn-space-20));
}
.cs-page .px-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--pn-space-10);
  align-items: center;
  margin-top: clamp(var(--pn-space-8), 4vw, var(--pn-space-12));
}
@media (min-width: 1024px) {
  .cs-page .px-grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: var(--pn-space-16);
  }
}
.cs-page .px-hero .pn-in {
  justify-items: start;
  text-align: left;
  gap: var(--pn-space-5);
}
.cs-page .cs-title {
  margin: 0;
  text-wrap: balance;
  font-size: clamp(2.25rem, 1.6rem + 2.2vw, 3.5rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
}
.cs-page .px-hero .pn-sub {
  max-width: 34em;
}
.cs-page .px-acts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--pn-space-4);
  margin-top: var(--pn-space-3);
}

.cs-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--pn-space-3);
  font: 600 var(--pn-type-small-size)/1.2 var(--pn-font-family-sans);
  color: var(--pn-text-body);
}
.cs-eyebrow b {
  color: var(--pn-text-head);
  font-weight: 600;
}
.cs-eb-logo {
  display: block;
  height: 26px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  object-position: left center;
  filter: brightness(0) invert(1);
  opacity: 0.92;
}
.cs-eb-sep {
  width: 1px;
  height: 18px;
  background: var(--pn-color-alpha-white-24);
}

.cs-hero-panel {
  border-radius: var(--pn-radius-2xl);
  box-shadow:
    inset 0 0 0 1px var(--pn-color-alpha-white-10),
    0 40px 90px -40px var(--pn-color-alpha-shade-92);
  display: grid;
  place-items: center;
  padding: clamp(var(--pn-space-6), 3vw, var(--pn-space-10));
  min-height: clamp(300px, 30vw, 440px);
}
.cs-hero-img {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--pn-radius-lg);
  box-shadow:
    inset 0 0 0 1px var(--pn-color-alpha-white-12),
    0 30px 70px -30px var(--pn-color-alpha-shade-92);
}

/* ---------- labels ---------- */
.cs-kicker {
  margin: 0 0 var(--pn-space-6);
  font: 600 var(--pn-type-small-size)/1.2 var(--pn-font-family-sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pn-color-violet-300);
}

/* ---------- results band ---------- */
.cs-results {
  padding-block: 0 var(--pn-section-pad-compact);
}
.cs-res {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--pn-space-4);
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 640px) {
  .cs-res {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  .cs-res-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .cs-res-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .cs-res-1 {
    grid-template-columns: minmax(0, 1fr);
  }
}
.cs-res li {
  display: grid;
  align-content: start;
  gap: var(--pn-space-3);
  padding: var(--pn-space-6);
  border-radius: var(--pn-radius-xl);
  background: var(--pn-color-alpha-white-05);
  box-shadow: inset 0 0 0 1px var(--pn-color-alpha-white-08);
}
.cs-res b {
  font: 500 clamp(2.25rem, 1.8rem + 1.6vw, 3.25rem)/1 var(--pn-font-family-sans);
  letter-spacing: -0.04em;
  color: var(--pn-text-head);
  font-variant-numeric: tabular-nums;
}
.cs-res-fig span {
  font-size: var(--pn-type-body-size);
  line-height: 1.45;
  color: var(--pn-text-body);
  text-wrap: pretty;
}
.cs-res-txt span {
  font: 500 var(--pn-type-h4-size)/1.35 var(--pn-font-family-sans);
  color: var(--pn-text-head);
  text-wrap: pretty;
}

/* ---------- facts row ---------- */
.cs-facts {
  padding-block: var(--pn-space-8);
}
.cs-facts dl {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  border-block: 1px solid var(--pn-color-alpha-white-10);
}
.cs-facts dl > div {
  padding: var(--pn-space-5) 0;
}
.cs-facts dl > div + div {
  border-top: 1px solid var(--pn-color-alpha-white-10);
}
@media (min-width: 768px) {
  .cs-facts dl {
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    grid-auto-flow: column;
  }
  .cs-facts dl > div {
    padding: var(--pn-space-5) var(--pn-space-6);
  }
  .cs-facts dl > div:first-child {
    padding-left: 0;
  }
  .cs-facts dl > div + div {
    border-top: 0;
    border-left: 1px solid var(--pn-color-alpha-white-10);
  }
}
.cs-facts dt {
  font: 600 var(--pn-type-caption-size)/1.2 var(--pn-font-family-sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pn-text-body);
}
.cs-facts dd {
  margin: var(--pn-space-2) 0 0;
  color: var(--pn-text-head);
  font-size: var(--pn-type-body-size);
  line-height: 1.45;
}
.cs-facts a {
  color: var(--pn-text-head);
  text-decoration: underline;
  text-decoration-color: var(--pn-color-alpha-white-30);
  text-underline-offset: 3px;
}
.cs-facts a:hover {
  text-decoration-color: currentColor;
}

/* ---------- story sections ---------- */
.cs-part {
  padding-block: clamp(var(--pn-space-10), 5vw, var(--pn-space-16));
}
.cs-part-g {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--pn-space-5);
}
@media (min-width: 1024px) {
  .cs-part-g {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    gap: var(--pn-space-16);
  }
}
.cs-label {
  margin: 0;
  font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--pn-text-head);
}
@media (min-width: 1024px) {
  .cs-label {
    position: sticky;
    top: calc(var(--pn-space-24));
    align-self: start;
  }
}
.cs-prose {
  max-width: 44rem;
}
.cs-prose h3 {
  color: var(--pn-text-head);
}
.cs-prose img {
  max-width: 100%;
  height: auto;
  border-radius: var(--pn-radius-md);
}
.cs-prose blockquote {
  margin: var(--pn-space-8) 0 0;
  padding: var(--pn-space-6) var(--pn-space-8);
  border: 0;
  border-radius: var(--pn-radius-xl);
  background: var(--pn-color-alpha-white-05);
  box-shadow: inset 0 0 0 1px var(--pn-color-alpha-white-08);
  color: var(--pn-text-head);
  font-size: var(--pn-type-lede-size);
  line-height: 1.5;
}
.cs-prose blockquote p {
  margin: 0;
}
.cs-prose blockquote strong {
  display: inline-block;
  margin-top: var(--pn-space-3);
  font: 600 var(--pn-type-caption-size)/1.4 var(--pn-font-family-sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pn-text-body);
}
.cs-prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--pn-type-ui-size);
}
.cs-prose th,
.cs-prose td {
  padding: var(--pn-space-3);
  border-bottom: 1px solid var(--pn-color-alpha-white-10);
  text-align: left;
}
.cs-prose {
  overflow-wrap: anywhere;
}

/* ---------- the pull quote ---------- */
.cs-quote {
  padding-block: clamp(var(--pn-space-12), 6vw, var(--pn-space-20));
}
.cs-quote figure {
  margin: 0 auto;
  max-width: 56rem;
  text-align: center;
}
.cs-quote blockquote {
  margin: 0;
  border: 0;
  padding: 0;
}
.cs-quote blockquote p {
  margin: 0;
  font: 500 clamp(1.5rem, 1.15rem + 1.4vw, 2.5rem)/1.2
    var(--pn-font-family-sans);
  letter-spacing: -0.02em;
  color: var(--pn-text-head);
  text-wrap: balance;
}
.cs-quote figcaption {
  margin-top: var(--pn-space-6);
  font: 600 var(--pn-type-caption-size)/1.5 var(--pn-font-family-sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pn-text-body);
}

/* ---------- the stack the story names ---------- */
.cs-flow {
  padding-block: clamp(var(--pn-space-10), 5vw, var(--pn-space-16));
}
.cs-flow-row {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--pn-space-8);
  grid-template-columns: minmax(0, 1fr);
  counter-reset: none;
}
@media (min-width: 768px) {
  .cs-flow-row {
    gap: var(--pn-space-10);
  }
  .cs-flow-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cs-flow-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .cs-flow-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .cs-flow-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
.cs-flow-col {
  position: relative;
  display: grid;
  align-content: start;
  gap: var(--pn-space-3);
}
.cs-flow-l {
  font: 600 var(--pn-type-caption-size)/1.2 var(--pn-font-family-sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pn-text-body);
}
.cs-flow-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--pn-space-2);
}
.cs-flow-col li {
  padding: var(--pn-space-3) var(--pn-space-4);
  border-radius: var(--pn-radius-md);
  background: var(--pn-color-alpha-white-05);
  box-shadow: inset 0 0 0 1px var(--pn-color-alpha-white-10);
  color: var(--pn-text-head);
  font: 500 var(--pn-type-ui-size)/1.35 var(--pn-font-family-sans);
}
.cs-flow-col.is-lit li {
  box-shadow: inset 0 0 0 1.5px var(--pn-color-violet-300);
  background: var(--pn-color-alpha-white-07);
}
.cs-flow-col.is-lit .cs-flow-l {
  color: var(--pn-color-violet-300);
}
/* the connector: a violet line from each column to the next, down on phones, across from 768px */
.cs-flow-col + .cs-flow-col::before {
  content: '';
  position: absolute;
  left: var(--pn-space-6);
  top: calc(-1 * var(--pn-space-8));
  width: 1.5px;
  height: var(--pn-space-8);
  background: var(--pn-color-violet-300);
  opacity: 0.7;
}
@media (min-width: 768px) {
  .cs-flow-col + .cs-flow-col::before {
    left: calc(-1 * var(--pn-space-10));
    top: calc(var(--pn-space-5) + 1.4em);
    width: var(--pn-space-10);
    height: 1.5px;
  }
}

/* ---------- read more ---------- */
.cs-more {
  padding-block: 0 var(--pn-space-8);
}
.cs-more-a {
  color: var(--pn-text-link);
  font-weight: 500;
  text-decoration: none;
}
.cs-more-a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ---------- products used ---------- */
.cs-prods .cs-prod-list {
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 640px) {
  .cs-prods .cs-prod-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  .cs-prods .cs-prod-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.cs-nolink {
  display: block;
}

/* ---------- related stories ---------- */
.cs-rel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--pn-space-4);
}
.cs-rel-head .pn-lnk {
  color: var(--pn-text-link);
  text-decoration: none;
  font-weight: 500;
}
.cs-rel-head .pn-lnk:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.cs-rel-list {
  list-style: none;
  margin: var(--pn-space-8) 0 0;
  padding: 0;
  display: grid;
  gap: var(--pn-space-6);
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 768px) {
  .cs-rel-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.cs-rel-list a {
  display: grid;
  gap: var(--pn-space-3);
  color: inherit;
  text-decoration: none;
  border-radius: var(--pn-radius-xl);
}
.cs-rel-list a:focus-visible {
  outline: 2px solid var(--pn-text-link);
  outline-offset: 6px;
}
.cs-rel-img {
  overflow: hidden;
  border-radius: var(--pn-radius-xl);
  aspect-ratio: 16 / 10;
  background: var(--pn-color-alpha-white-05);
  box-shadow: inset 0 0 0 1px var(--pn-color-alpha-white-08);
}
.cs-rel-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--pn-easing-out);
}
.cs-rel-list a:hover .cs-rel-img img {
  transform: scale(1.03);
}
.cs-rel-meta {
  display: flex;
  align-items: center;
  gap: var(--pn-space-3);
  margin-top: var(--pn-space-2);
}
.cs-rel-logo {
  display: block;
  height: 20px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  object-position: left center;
  filter: brightness(0) invert(1);
  opacity: 0.85;
}
/* A name in place of a logo keeps the logo's 20px row, so card titles line up. */
.cs-rel-meta b,
.cs-rel-meta small {
  line-height: 20px;
}
.cs-rel-meta small {
  font-size: var(--pn-type-caption-size);
  color: var(--pn-text-body);
}
.cs-rel-t {
  font: 600 var(--pn-type-h4-size)/1.35 var(--pn-font-family-sans);
  color: var(--pn-text-head);
  text-wrap: pretty;
}

/* ---------- round 2 (19 Nov, after the first shots) ---------- */
.cs-page .cs-rel-head {
  max-width: none;
  display: flex;
}
.cs-quote.is-long blockquote p {
  font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.75rem);
  line-height: 1.3;
}
.cs-hero-panel {
  padding: clamp(var(--pn-space-5), 2.2vw, var(--pn-space-8));
  min-height: 0;
}
/* products used: a compact card per product, the aurora tile on the left */
.cs-prods .cs-prod-list {
  grid-template-columns: minmax(0, 1fr);
  gap: var(--pn-space-4);
}
@media (min-width: 768px) {
  .cs-prods .cs-prod-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.cs-prods .cs-prod-list > li > a,
.cs-prods .cs-prod-list > li > .cs-nolink {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  column-gap: var(--pn-space-5);
  align-items: start;
  padding: var(--pn-space-4);
  border-radius: var(--pn-radius-xl);
  background: var(--pn-color-alpha-white-05);
  box-shadow: inset 0 0 0 1px var(--pn-color-alpha-white-08);
}
.cs-prods .cs-prod-list .fx-art {
  grid-row: 1 / 3;
  margin: 0;
  aspect-ratio: 1;
  border-radius: var(--pn-radius-lg);
}
.cs-prods .cs-prod-list .fx-art .fx-tile {
  width: 44%;
  left: 28%;
  top: 28%;
}
.cs-prods .cs-prod-list b {
  align-self: end;
  margin-top: var(--pn-space-3);
}
.cs-prods .cs-prod-list a:hover {
  background: var(--pn-color-alpha-white-08);
}
.cs-prods .pn-head {
  margin-bottom: 0;
}
@media (max-width: 767px) {
  .cs-facts dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--pn-space-5);
  }
  .cs-facts dl > div + div {
    border-top: 0;
  }
  .cs-facts dl > div:nth-child(n + 3) {
    border-top: 1px solid var(--pn-color-alpha-white-10);
  }
}
.cs-prods .cs-prod-list .fx-art {
  width: 112px;
  height: 112px;
  aspect-ratio: auto;
}
.cs-prods .cs-prod-list > li > a,
.cs-prods .cs-prod-list > li > .cs-nolink {
  min-height: 144px;
  align-content: center;
}

/* ---------- round 3 (19 Nov, fresh-eyes review) ---------- */
.cs-prose {
  max-width: 38rem;
}
.cs-part {
  padding-block: clamp(var(--pn-space-8), 3.5vw, var(--pn-space-12));
}
.cs-quote {
  padding-block: clamp(var(--pn-space-10), 4.5vw, var(--pn-space-16));
}
.cs-flow {
  padding-block: clamp(var(--pn-space-8), 3.5vw, var(--pn-space-12));
}
.cs-facts {
  padding-block: var(--pn-space-4) var(--pn-space-6);
}
.cs-results {
  padding-bottom: var(--pn-space-6);
}
.cs-res b {
  font-size: clamp(2rem, 1.7rem + 1vw, 2.75rem);
}
.cs-page .cs-title {
  font-size: clamp(2.125rem, 1.6rem + 1.8vw, 3.25rem);
}
.cs-prose blockquote {
  color: var(--pn-text-head);
  font-weight: 400;
}
.cs-prose blockquote strong,
.cs-quote figcaption {
  font-size: var(--pn-type-small-size);
  letter-spacing: 0.04em;
}

/* ---------- the /customers index (overnight 19 Nov, on #771's markup) ---------- */
.cs-wall {
  min-height: clamp(280px, 26vw, 380px);
}
.cs-wall-list {
  position: relative;
  z-index: 2;
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--pn-space-3);
}
@media (min-width: 640px) {
  .cs-wall-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.cs-wall-list li {
  display: grid;
  place-items: center;
  min-height: 88px;
  padding: var(--pn-space-4);
  border-radius: var(--pn-radius-lg);
  background: var(--pn-color-ink-850);
  box-shadow: inset 0 0 0 1px var(--pn-color-alpha-white-10);
}
.cs-wall-logo {
  display: block;
  max-width: 100%;
  height: 28px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}
.cs-browse {
  padding-top: 0;
}
.cs-filter {
  display: grid;
  gap: var(--pn-space-5);
  margin-bottom: var(--pn-space-10);
}
.cs-filter input {
  width: min(100%, 420px);
  min-height: 48px;
  padding: 0 var(--pn-space-4);
  border: 0;
  border-radius: var(--pn-radius-pill);
  background: var(--pn-color-alpha-white-07);
  box-shadow: inset 0 0 0 1px var(--pn-color-alpha-white-16);
  color: var(--pn-text-head);
  font: inherit;
  font-size: var(--pn-type-body-size);
}
.cs-filter input::placeholder {
  color: var(--pn-text-body);
}
.cs-filter input:focus-visible {
  outline: 2px solid var(--pn-text-link);
  outline-offset: 2px;
}
.customer-industries {
  display: flex;
  flex-wrap: wrap;
  gap: var(--pn-space-2);
}
.customer-industries a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 var(--pn-space-4);
  border-radius: var(--pn-radius-pill);
  box-shadow: inset 0 0 0 1px var(--pn-color-alpha-white-16);
  color: var(--pn-text-body);
  text-decoration: none;
  font-size: var(--pn-type-ui-size);
}
.customer-industries a:hover {
  color: var(--pn-text-head);
  background: var(--pn-color-alpha-white-05);
}
.customer-industries a[aria-current='page'] {
  color: var(--pn-text-head);
  background: var(--pn-color-alpha-white-16);
  box-shadow: none;
}
.cs-grid {
  margin-top: 0;
  row-gap: var(--pn-space-10);
}
.cs-card a {
  display: grid;
  gap: var(--pn-space-3);
  color: inherit;
  text-decoration: none;
}
.cs-grid .cs-rel-t {
  margin: 0;
  font-size: var(--pn-type-h4-size);
}
.customer-search-empty {
  margin-top: var(--pn-space-8);
  color: var(--pn-text-body);
}
@media (min-width: 768px) and (max-width: 1023px) {
  .cs-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
