/*
 * Success stories, the stories hub, and the Knowledge Center and materials
 * hubs. Loaded after /styles/home.css, whose base rules, text styles (.hm-sub,
 * .hm-small) and before-and-after bars (.hm-bars) these pages reuse unchanged,
 * and before /styles/site.css, which supplies the tokens, bands, type classes
 * and buttons.
 *
 * Calm rules (review/DESIGN-SPEC.md):
 *   - No new text styles. The h1 is .dz-display at a smaller size, because a
 *     story's headline is a sentence, not three words.
 *   - White bands, with one snow band per page for the thing to look at.
 *   - The only orange is the bar that draws the "after" figure and the rule
 *     under one word of the offer heading.
 *   - No boxes: lists are separated by one hairline and white space.
 *   - Left-aligned throughout.
 *
 * Mobile first: the base rules are the 320px layout.
 */

/* site.css loads after this file, so a rule that overrides a shared .dz-*
   class carries one more class than the rule it overrides. */

/* ---------- Headline and hero ---------- */

.st .dz-display {
  max-width: 22ch;
  font-size: clamp(32px, 5.6vw, 64px);
  line-height: 1.03;
  letter-spacing: -0.035em;
}
.hm .dz-band.st-hero {
  padding-bottom: var(--hm-gap);
}
.st-hero-copy {
  display: grid;
  justify-items: start;
  gap: 20px;
}
.st-hero-copy .dz-btn {
  margin-top: 8px;
}
.st-hero-grid {
  display: grid;
  gap: var(--hm-gap);
}
.st-photo {
  width: 100%;
  border-radius: var(--dz-radius-md);
}
@media (min-width: 900px) {
  .st-hero-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 56px;
    align-items: center;
  }
  .st-hero-grid--text {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Breadcrumb: small Steel links, each a full-height touch target. */
.st-crumbs ol {
  display: flex;
  flex-wrap: wrap;
  column-gap: 10px;
}
.st-crumbs li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--dz-steel);
}
.st-crumbs li::after {
  content: '/';
  color: var(--dz-steel-light);
}
.st-crumbs a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--dz-steel);
  text-decoration: underline;
  text-decoration-color: var(--dz-link-line);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.st-crumbs a:hover {
  color: var(--dz-ink);
  text-decoration-color: currentColor;
}

/* A band that continues the one above it. */
.hm .dz-band.st-follow {
  padding-top: var(--hm-gap);
}

/* ---------- Heading on the left, text on the right ---------- */

.st-split {
  display: grid;
  gap: var(--hm-gap);
}
.st-prose {
  display: grid;
  align-content: start;
  gap: 16px;
}
.st-pick {
  max-width: 58ch;
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--dz-line-strong);
}
@media (min-width: 900px) {
  .st-split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
    gap: 56px;
  }
}

/* ---------- Before and after ---------- */

.st-result,
.st-lead {
  display: grid;
  gap: var(--hm-gap);
}
.st-result-fig {
  display: grid;
  align-content: start;
  gap: 4px;
}
.st-result-fig .hm-case-fig {
  margin-bottom: 8px;
}
.st-result-bars {
  max-width: 560px;
}
.st-result > .st-result-bars > .hm-bars:first-child {
  margin-top: 0;
}
@media (min-width: 860px) {
  .st-result {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
    gap: 56px;
  }
  .st-lead {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 56px;
    align-items: center;
  }
}

/* A story with no figures on record: what changed, in words. */
.st-changed {
  max-width: 58ch;
  border-bottom: 1px solid var(--dz-line-strong);
}
.st-changed li {
  padding: 16px 0;
  border-top: 1px solid var(--dz-line-strong);
}

/* ---------- The offer ---------- */

.st-offer .hm-head {
  padding-top: var(--hm-band);
  border-top: 1px solid var(--dz-line-strong);
}
.hm .dz-band.st-offer {
  padding-top: 0;
}
.st-offer--plain .hm-head {
  border-top: 0;
}
.st-offer .hm-head .dz-h2 {
  max-width: 22ch;
}
.st-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
}

/* ---------- Lists: more results, groups, routes, machines ---------- */

/* A heading that is a link: Ink, with the thin underline links carry. */
.st .dz-h3 a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--dz-link-line);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: text-decoration-color var(--dz-fast) var(--dz-ease);
}
.st .dz-h3 a:hover {
  text-decoration-color: currentColor;
}

.st-more,
.st-machines {
  display: grid;
  gap: 28px 40px;
}
.st-more li,
.st-machines li {
  display: grid;
  align-content: start;
  gap: 6px;
  padding-top: 16px;
  border-top: 1px solid var(--dz-line-strong);
}
@media (min-width: 700px) {
  .st-machines {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 860px) {
  .st-more {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 1100px) {
  .st-machines {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Groups: the job on the left, its lines on the right. */
.st-groups {
  border-bottom: 1px solid var(--dz-line-strong);
}
.st-group {
  display: grid;
  gap: 16px;
  padding: 28px 0;
  border-top: 1px solid var(--dz-line-strong);
}
.st-group-head {
  display: grid;
  align-content: start;
  gap: 4px;
}
.st-group-head a {
  display: inline-block;
  padding: 12px 0;
}
.st-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 20px 40px;
}
.st-list li {
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 2px;
}
.st-list-link {
  display: inline-block;
  padding: 11px 0;
  font-weight: 700;
  color: var(--dz-ink);
  text-decoration: underline;
  text-decoration-color: var(--dz-link-line);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: text-decoration-color var(--dz-fast) var(--dz-ease);
}
.st-list-link:hover {
  text-decoration-color: currentColor;
}
.st-list-fig {
  font-size: 14px;
  line-height: 1.5;
}
@media (min-width: 900px) {
  .st-group {
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 48px;
  }
}

/* Routes: the Knowledge Center's sections, one line each. */
.st-routes {
  border-bottom: 1px solid var(--dz-line-strong);
}
.st-routes li {
  display: grid;
  gap: 4px;
  padding: 20px 0;
  border-top: 1px solid var(--dz-line-strong);
}
@media (min-width: 900px) {
  .st-routes li {
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 48px;
    align-items: center;
    padding: 24px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .st *,
  .st *::before,
  .st *::after {
    transition: none !important;
  }
}
