/* Hero and worked example form one inspector. Keep the art and the readout in sync. */
.cs-frame {
  width: min(calc(100% - 104px), 1360px);
  margin-inline: auto;
}

.cs-hero, .cs-example-grid {
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
  gap: 3.4%;
}

.cs-hero {
  align-items: center;
  padding: 48px 0 32px;
}

.cs-eyebrow, .cs-metric > span, .cs-status {
  font: 700 11px/1.5 ui-monospace, "SFMono-Regular", Consolas, monospace;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--blue);
}

.cs-eyebrow { margin: 0 0 16px; }
.cs-introduction .cs-eyebrow { margin-bottom: 24px; }

.cs-hero h1 {
  color: var(--ink);
  font: 700 clamp(60px, 6.16vw, 94px)/.98 var(--font-family);
  letter-spacing: -.062em;
  margin: 0;
}

.cs-hero h1 span { display: block; }
.cs-lede {
  max-width: 475px;
  margin: 24px 0;
  font-size: clamp(16px, 1.32vw, 20px);
  line-height: 1.52;
  letter-spacing: -.025em;
}

.cs-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 22px; }
.cs-actions .button { padding: 15px 18px; border-radius: 0; font-size: 14px; font-weight: 700; }
.cs-actions .button span { font-size: 18px; line-height: 1; }
.cs-text-link {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 5px;
}
.cs-text-link:hover { color: var(--blue); }

.cs-figure { min-width: 0; margin: 0; }
.cs-specimen { position: relative; aspect-ratio: 1.55; max-height: 470px; }
.cs-hero-art { display: block; width: 100%; height: 100%; object-fit: contain; }
.cs-specimen::before, .cs-specimen::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border: 0 solid #b4bccd;
}
.cs-specimen::before { top: 0; left: 0; border-width: 1px 0 0 1px; }
.cs-specimen::after { bottom: 0; right: 0; border-width: 0 1px 1px 0; }

.cs-figure { --pin-height: 52%; --pin-start: 52%; --pin-end: 82%; }
.cs-figure[data-layer="source"] { --pin-height: 33%; --pin-start: 64%; }
.cs-figure[data-layer="check"] { --pin-height: 72%; --pin-start: 68%; }
.cs-pin { position: absolute; inset: 0; pointer-events: none; }
.cs-pin-line {
  position: absolute;
  left: var(--pin-start);
  right: calc(100% - var(--pin-end));
  top: var(--pin-height);
  border-top: 1px solid var(--ink);
  transition: left .18s, top .18s;
}
.cs-pin-line::before {
  content: "";
  position: absolute;
  left: -4px;
  top: -5px;
  width: 8px;
  height: 8px;
  background: var(--ember);
  box-shadow: 0 0 0 2px var(--white);
}
.cs-pin-label {
  position: absolute;
  left: var(--pin-end);
  top: var(--pin-height);
  transform: translateY(-50%);
  background: var(--ink);
  color: var(--white);
  padding: 6px 8px;
  font: 11px/1.25 ui-monospace, "SFMono-Regular", Consolas, monospace;
  white-space: nowrap;
  transition: top .18s;
}

.cs-inspector {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--color-border);
  margin-top: 8px;
  padding-top: 13px;
}
.cs-inspector strong { font-size: 13px; letter-spacing: -.02em; }
.cs-readout-controls { display: none; }
.cs-layer-control { display: flex; min-width: 0; gap: 5px; padding: 0; margin: 0; border: 0; }
.cs-layer-control label { position: relative; cursor: pointer; }
.cs-layer-control input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cs-layer-control span {
  display: block;
  padding: 8px 10px;
  font: 12px/1.2 ui-monospace, "SFMono-Regular", Consolas, monospace;
  border: 1px solid var(--color-border);
}
.cs-layer-control input:checked + span { color: var(--white); background: var(--ink); border-color: var(--ink); }
.cs-layer-control input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 3px; }
.cs-hint { min-height: 1.5em; margin: 10px 0 0; color: var(--color-text-secondary); font-size: 13px; line-height: 1.5; }

.cs-proof {
  border-top: 1px solid var(--color-border);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6%;
  padding: 21px 0 35px;
}
.cs-proof p { color: var(--color-text-secondary); font-size: 13px; margin: 0 0 7px; }
.cs-proof strong { font-size: clamp(22px, 2.3vw, 36px); line-height: 1.2; letter-spacing: -.053em; }

.cs-example { padding: 50px 0 45px; background: var(--cool-gray); border-block: 1px solid var(--color-border); }
.cs-example h2, .cs-section-title {
  font: 700 clamp(33px, 3.4vw, 56px)/1.05 var(--font-family);
  letter-spacing: -.055em;
  color: var(--ink);
}
.cs-example-intro { max-width: 400px; margin: 18px 0 22px; color: var(--color-text-secondary); font-size: 15px; line-height: 1.6; }
.cs-refund {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  border: 1px solid var(--color-border);
  background: var(--white);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.cs-refund input { accent-color: var(--blue); width: 18px; height: 18px; }
.cs-readout { min-width: 0; padding: 22px 24px; border: 1px solid var(--color-border); background: var(--white); }
.cs-metric, .cs-layer-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.cs-metric { border-bottom: 1px solid var(--color-border); padding-bottom: 14px; margin-bottom: 14px; }
.cs-metric > span { color: var(--color-text-secondary); }
.cs-metric output { font: 700 34px/1.2 var(--font-family); letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.cs-layer-title h3 { display: flex; align-items: center; gap: 8px; font-size: 17px; }
.cs-layer-title h3::before { content: ""; width: 9px; height: 9px; background: var(--ember); }
.cs-layer-title button {
  border: 0;
  background: transparent;
  padding: 6px 0;
  font: 700 13px/1.5 var(--font-family);
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.cs-formula {
  font: clamp(14px, 1.44vw, 20px)/1.5 ui-monospace, "SFMono-Regular", Consolas, monospace;
  letter-spacing: -.035em;
  color: var(--blue);
  margin: 9px 0;
}
.cs-explanation, .cs-note p { font-size: 14px; line-height: 1.55; }
.cs-explanation { color: var(--color-text-secondary); }
.cs-note { margin-top: 16px; border-top: 1px solid var(--color-border); padding-top: 10px; }
.cs-note summary { padding: 5px 0; font-size: 13px; font-weight: 700; cursor: pointer; }
.cs-note p { margin: 8px 0 4px; }
[data-demo-control][hidden] { display: none; }

.cs-opening, #projects.cs-work, .cs-services { background: var(--white); color: var(--ink); }
.cs-work-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 34px; border-top: 1px solid var(--ink); }
.cs-work-card { display: flex; flex-direction: column; align-items: flex-start; padding: 28px 26px; border-left: 1px solid var(--color-border); }
.cs-work-card:first-child { padding-left: 0; border-left: 0; }
.cs-work-card:last-child { padding-right: 0; }
.cs-work-card .cs-status { margin-bottom: 24px; }
.cs-work-card h3, .cs-offer-list h3 { font: 700 clamp(21px, 1.9vw, 29px)/1.14 var(--font-family); letter-spacing: -.045em; }
.cs-work-card p:not(.cs-status), .cs-offer-list p { color: var(--color-text-secondary); font-size: 16px; line-height: 1.6; margin: 16px 0 22px; }
.cs-work-card a { margin-top: auto; }
.cs-services { border-top: 1px solid var(--color-border); }
.cs-offer-list { margin: 34px 0; }
.cs-offer-list article {
  display: grid;
  grid-template-columns: 1fr 1.5fr minmax(155px, .6fr);
  gap: 5%;
  align-items: baseline;
  padding: 26px 0;
  border-top: 1px solid var(--color-border);
}
.cs-offer-list article:first-child { border-top-color: var(--ink); }
.cs-offer-list p { margin: 0; }
.cs-offer-list a { justify-self: end; }
.cs-directory { padding: 24px; background: var(--cool-gray); }
.cs-directory h3 { margin-bottom: 13px; font: 700 19px/1.3 var(--font-family); letter-spacing: -.03em; }
.cs-directory .service-links { margin: 0; }
.service-page .service-breadcrumb { align-items: center; }
.service-page .service-hero { background: var(--white); border-bottom: 1px solid var(--color-border); padding-block: clamp(48px, 6vw, 84px); }
.service-page .service-hero h1 { font: 700 clamp(43px, 5.5vw, 80px)/1.02 var(--font-family); letter-spacing: -.06em; }
.service-page .service-promise { color: var(--blue); font-family: var(--font-editorial); }
.service-page .service-deliverables, .service-page .service-next { background: var(--cool-gray); }
.service-page .service-deliverable-grid article { background: var(--white); padding: 24px; border-top: 2px solid var(--blue); }

@media (max-width: 960px) {
  .cs-frame { width: calc(100% - 64px); }
  .cs-hero { padding-top: 38px; gap: 2%; }
  .cs-hero h1 { font-size: clamp(50px, 6.8vw, 68px); }
  .cs-figure { --pin-end: 74%; }
  .cs-pin-label { font-size: 9px; }
  .cs-inspector { flex-wrap: wrap; }
  .cs-specimen { aspect-ratio: 1.32; }
  .cs-layer-control span { padding: 7px; }
  .cs-hint { min-height: 3em; }
}

@media (max-width: 740px) {
  .cs-frame { width: calc(100% - 36px); }
  .cs-hero, .cs-example-grid { grid-template-columns: 1fr; gap: 25px; }
  .cs-hero { padding-top: 32px; }
  .cs-introduction .cs-eyebrow { margin-bottom: 17px; }
  .cs-hero h1 { font-size: clamp(53px, 11vw, 69px); }
  .cs-lede { margin: 19px 0; }
  .cs-actions { gap: 18px; }
  .cs-specimen { aspect-ratio: 1.55; max-height: 370px; }
  .cs-hint { min-height: auto; }
  .cs-pin-label { padding: 5px 4px; }
  .cs-proof { gap: 15px; padding: 17px 0 25px; }
  .cs-proof p { font-size: 12px; line-height: 1.45; }
  .cs-proof strong { display: block; font-size: clamp(18px, 4.6vw, 26px); }
  .cs-example { padding: 32px 0; }
  .cs-readout { padding: 18px; }
  .cs-readout-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 0 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--color-border);
  }
  .cs-readout-controls strong { font-size: 12px; }
  .cs-readout-controls .cs-layer-control span { min-height: 40px; display: grid; place-items: center; padding: 7px 9px; }
  .cs-work-grid, .cs-offer-list article { grid-template-columns: 1fr; }
  .cs-work-card, .cs-work-card:first-child, .cs-work-card:last-child { padding: 24px 0; border-left: 0; border-bottom: 1px solid var(--color-border); }
  .cs-work-card .cs-status { margin-bottom: 12px; }
  .cs-offer-list article { gap: 14px; }
  .cs-offer-list a { justify-self: start; }
  .cs-directory { padding: 18px; }
  .cs-inspector { flex-wrap: nowrap; }
  .cs-inspector strong { font-size: 12px; }
  .cs-layer-control span { padding: 7px; font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .cs-pin-line, .cs-pin-label { transition: none; }
}
