.evidence-section {
  --ev-ink: var(--color-heading, #1d1d1f);
  --ev-text: var(--color-subtle, #6e6e73);
  --ev-blue: var(--color-accent, #0071e3);
  --ev-blue-soft: rgba(0, 113, 227, .1);
  --ev-surface: var(--color-surface, #fff);
  --ev-canvas: var(--color-bg, #f5f5f7);
  --ev-line: var(--color-border-strong, rgba(0, 0, 0, .1));
  width: min(calc(100% - 44px), 1036px);
  margin: 0 auto;
  padding: clamp(72px, 9vw, 120px) 0;
}

.evidence-section + .section {
  padding-top: clamp(54px, 7vw, 88px);
}

.evidence-heading {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(290px, .65fr);
  gap: clamp(36px, 8vw, 92px);
  align-items: end;
  margin-bottom: clamp(36px, 5vw, 56px);
}

.evidence-heading h2 {
  margin: 0;
  color: var(--ev-ink);
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.04;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.evidence-heading p {
  max-width: 62ch;
  margin: 0;
  color: var(--ev-text);
  font-size: 1rem;
  line-height: 1.65;
  text-wrap: pretty;
}

.evidence-frame {
  overflow: hidden;
  border: 1px solid var(--ev-line);
  border-radius: 16px;
  background: var(--ev-surface);
}

.evidence-frame-note {
  margin: 0;
  padding: 15px 22px;
  border-top: 1px solid var(--ev-line);
  color: var(--ev-text);
  font-size: .75rem;
  line-height: 1.5;
}

.evidence-frame-note strong {
  color: var(--ev-ink);
}

/* Office-time calculator */
.office-impact {
  display: grid;
  grid-template-columns: minmax(270px, .72fr) minmax(0, 1.28fr);
}

.office-impact-controls {
  padding: clamp(26px, 4vw, 44px);
  border-right: 1px solid var(--ev-line);
}

.office-impact-controls h3,
.evidence-visual-title {
  margin: 0;
  color: var(--ev-ink);
  font-size: 1rem;
}

.office-impact-controls > p {
  margin: 8px 0 30px;
  color: var(--ev-text);
  font-size: .85rem;
  line-height: 1.55;
}

.impact-field + .impact-field {
  margin-top: 27px;
}

.impact-field-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 11px;
}

.impact-field label {
  color: var(--ev-ink);
  font-size: .82rem;
  font-weight: 600;
}

.impact-field output {
  color: var(--ev-blue);
  font-size: .82rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.impact-field input[type="range"] {
  width: 100%;
  min-height: 28px;
  margin: 0;
  accent-color: var(--ev-blue);
  cursor: pointer;
}

.impact-field input[type="range"]:focus-visible {
  outline: 3px solid rgba(0, 113, 227, .28);
  outline-offset: 4px;
}

.impact-result {
  margin-top: 34px;
  padding-top: 25px;
  border-top: 1px solid var(--ev-line);
}

.impact-result strong,
.impact-result span {
  display: block;
}

.impact-result strong {
  color: var(--ev-ink);
  font-size: clamp(2.2rem, 5vw, 3.65rem);
  line-height: 1;
  letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
}

.impact-result span {
  margin-top: 8px;
  color: var(--ev-text);
  font-size: .78rem;
  line-height: 1.45;
}

.impact-chart-wrap {
  min-width: 0;
  padding: clamp(24px, 4vw, 42px);
}

.impact-chart-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 20px;
}

.impact-chart-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ev-text);
  font-size: .75rem;
}

.impact-chart-legend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ev-blue);
}

.impact-chart {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.impact-grid line,
.model-grid line {
  stroke: var(--ev-line);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.impact-axis-label,
.model-axis-label {
  fill: var(--ev-text);
  font-size: 11px;
}

.impact-area {
  fill: var(--ev-blue-soft);
}

.impact-line {
  fill: none;
  stroke: var(--ev-blue);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.impact-point {
  fill: var(--ev-surface);
  stroke: var(--ev-blue);
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}

.impact-point-value {
  fill: var(--ev-ink);
  font-size: 11px;
  font-weight: 700;
  text-anchor: middle;
  font-variant-numeric: tabular-nums;
}

/* Shared conceptual chart */
.model-chart {
  display: grid;
  grid-template-columns: minmax(245px, .58fr) minmax(0, 1.42fr);
}

.model-chart-copy {
  padding: clamp(28px, 4vw, 44px);
  border-right: 1px solid var(--ev-line);
}

.model-chart-copy p {
  margin: 13px 0 0;
  color: var(--ev-text);
  font-size: .88rem;
  line-height: 1.6;
}

.model-key {
  display: grid;
  gap: 14px;
  margin: 31px 0 0;
  padding: 0;
  list-style: none;
}

.model-key li {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 10px;
  align-items: start;
  color: var(--ev-text);
  font-size: .78rem;
  line-height: 1.45;
}

.model-key i {
  width: 10px;
  height: 10px;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--key-color, var(--ev-blue));
}

.model-chart-canvas {
  min-width: 0;
  padding: clamp(22px, 4vw, 42px);
}

.model-chart-canvas svg {
  display: block;
  width: 100%;
  height: auto;
}

.model-line-primary,
.model-line-secondary {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.model-line-primary {
  stroke: var(--ev-blue);
  stroke-width: 3;
}

.model-line-secondary {
  stroke: var(--ev-ink);
  stroke-width: 2.5;
}

.model-zone {
  fill: var(--ev-blue-soft);
}

.model-threshold {
  fill: none;
  stroke: var(--ev-text);
  stroke-width: 1;
  stroke-dasharray: 5 6;
  vector-effect: non-scaling-stroke;
}

.model-dot {
  fill: var(--ev-surface);
  stroke: var(--ev-blue);
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}

.model-svg-label {
  fill: var(--ev-ink);
  font-size: 12px;
  font-weight: 650;
}

/* Service-layer diagram */
.service-layer-map {
  display: grid;
  grid-template-columns: minmax(230px, .55fr) minmax(0, 1.45fr);
}

.service-layer-copy {
  padding: clamp(28px, 4vw, 44px);
  border-right: 1px solid var(--ev-line);
}

.service-layer-copy p {
  margin: 13px 0 0;
  color: var(--ev-text);
  font-size: .88rem;
  line-height: 1.6;
}

.service-layer-track {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  padding: clamp(24px, 4vw, 42px);
}

.service-layer-step {
  position: relative;
  min-width: 0;
  padding: 22px 18px;
  border-top: 1px solid var(--ev-line);
  border-bottom: 1px solid var(--ev-line);
}

.service-layer-step:first-child {
  border-left: 1px solid var(--ev-line);
  border-radius: 12px 0 0 12px;
}

.service-layer-step:last-child {
  border-right: 1px solid var(--ev-line);
  border-radius: 0 12px 12px 0;
}

.service-layer-step + .service-layer-step {
  border-left: 1px solid var(--ev-line);
}

.service-layer-step::after {
  content: "";
  position: absolute;
  top: 27px;
  right: -5px;
  z-index: 2;
  width: 9px;
  height: 9px;
  border-top: 1px solid var(--ev-blue);
  border-right: 1px solid var(--ev-blue);
  background: var(--ev-surface);
  transform: rotate(45deg);
}

.service-layer-step:last-child::after {
  display: none;
}

.service-layer-step span,
.service-layer-step strong {
  display: block;
}

.service-layer-step span {
  color: var(--ev-blue);
  font-size: .68rem;
  font-weight: 700;
}

.service-layer-step strong {
  margin-top: 22px;
  color: var(--ev-ink);
  font-size: .9rem;
  line-height: 1.35;
}

.service-layer-step small {
  display: block;
  margin-top: 8px;
  color: var(--ev-text);
  font-size: .7rem;
  line-height: 1.45;
}

/* Workflow architecture and consulting filters */
.workflow-map,
.consulting-filter {
  display: grid;
  grid-template-columns: minmax(230px, .55fr) minmax(0, 1.45fr);
}

.evidence-frame-intro {
  padding: clamp(28px, 4vw, 44px);
  border-right: 1px solid var(--ev-line);
}

.evidence-frame-intro h3 {
  margin: 0;
  color: var(--ev-ink);
  font-size: 1rem;
  line-height: 1.35;
}

.evidence-frame-intro p {
  margin: 13px 0 0;
  color: var(--ev-text);
  font-size: .85rem;
  line-height: 1.6;
}

.workflow-map-body,
.consulting-filter-body {
  min-width: 0;
  padding: clamp(26px, 4vw, 42px);
}

.workflow-spine {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.workflow-node {
  position: relative;
  min-width: 0;
  padding: 20px 15px;
  border-top: 1px solid var(--ev-line);
  border-bottom: 1px solid var(--ev-line);
}

.workflow-node:first-child {
  border-left: 1px solid var(--ev-line);
}

.workflow-node:last-child {
  border-right: 1px solid var(--ev-line);
}

.workflow-node + .workflow-node {
  border-left: 1px solid var(--ev-line);
}

.workflow-node::after {
  content: "";
  position: absolute;
  top: 24px;
  right: -5px;
  z-index: 2;
  width: 9px;
  height: 9px;
  border-top: 1px solid var(--ev-blue);
  border-right: 1px solid var(--ev-blue);
  background: var(--ev-surface);
  transform: rotate(45deg);
}

.workflow-node:last-child::after {
  display: none;
}

.workflow-node span,
.workflow-node strong,
.workflow-node small {
  display: block;
}

.workflow-node span {
  color: var(--ev-blue);
  font-size: .68rem;
  font-weight: 700;
}

.workflow-node strong {
  margin-top: 18px;
  color: var(--ev-ink);
  font-size: .82rem;
  line-height: 1.35;
}

.workflow-node small {
  margin-top: 7px;
  color: var(--ev-text);
  font-size: .66rem;
  line-height: 1.4;
}

.workflow-safety-rail {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding: 13px 15px;
  background: var(--ev-blue-soft);
  color: var(--ev-text);
  font-size: .7rem;
  line-height: 1.35;
}

.workflow-safety-rail strong {
  margin-right: auto;
  color: var(--ev-ink);
  font-size: .72rem;
}

.workflow-safety-rail span {
  padding-left: 11px;
  border-left: 1px solid var(--ev-line);
}

.consulting-filter-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) 13px;
  gap: 18px;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid var(--ev-line);
}

.consulting-filter-row:first-child {
  padding-top: 0;
}

.consulting-filter-row span,
.consulting-pilot span {
  color: var(--ev-blue);
  font-size: .7rem;
  font-weight: 700;
}

.consulting-filter-row strong {
  color: var(--ev-ink);
  font-size: .82rem;
  line-height: 1.4;
}

.consulting-filter-row i {
  width: 10px;
  height: 10px;
  border: 2px solid var(--ev-blue);
  border-radius: 50%;
}

.consulting-pilot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-top: 20px;
  padding: 16px 18px;
  background: var(--ev-blue);
}

.consulting-pilot span,
.consulting-pilot strong {
  color: #fff;
}

.consulting-pilot strong {
  font-size: .82rem;
  line-height: 1.4;
  text-align: right;
}

.workflow-map > .evidence-frame-note,
.consulting-filter > .evidence-frame-note {
  grid-column: 1 / -1;
}

/* Project evidence matrix */
.evidence-matrix {
  display: grid;
  grid-template-columns: minmax(190px, .62fr) repeat(3, minmax(120px, 1fr));
}

.evidence-matrix > * {
  min-width: 0;
  padding: 20px;
  border-bottom: 1px solid var(--ev-line);
}

.evidence-matrix > :nth-child(4n + 2),
.evidence-matrix > :nth-child(4n + 3),
.evidence-matrix > :nth-child(4n + 4) {
  border-left: 1px solid var(--ev-line);
}

.evidence-matrix > :nth-last-child(-n + 4) {
  border-bottom: 0;
}

.evidence-matrix-head {
  color: var(--ev-text);
  font-size: .7rem;
  font-weight: 650;
  line-height: 1.35;
  text-align: center;
}

.evidence-matrix-name {
  color: var(--ev-ink);
  font-size: .88rem;
  font-weight: 700;
}

.evidence-matrix-cell {
  display: grid;
  place-items: center;
  text-align: center;
}

.evidence-matrix-cell i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ev-blue);
}

.evidence-matrix-cell.is-support i {
  border: 2px solid var(--ev-blue);
  background: transparent;
}

.evidence-matrix-cell span {
  margin-top: 8px;
  color: var(--ev-text);
  font-size: .68rem;
  line-height: 1.3;
}

@media (prefers-reduced-motion: no-preference) {
  .impact-line,
  .model-line-primary,
  .model-line-secondary {
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
    animation: evidence-line-draw 900ms cubic-bezier(.23, 1, .32, 1) 120ms forwards;
  }

  .impact-area {
    animation: evidence-area-enter 500ms ease-out 420ms both;
  }

  @keyframes evidence-line-draw {
    to { stroke-dashoffset: 0; }
  }

  @keyframes evidence-area-enter {
    from { opacity: 0; }
    to { opacity: 1; }
  }
}

@media (max-width: 850px) {
  .evidence-heading,
  .office-impact,
  .model-chart,
  .service-layer-map {
    grid-template-columns: 1fr;
  }

  .office-impact-controls,
  .model-chart-copy,
  .service-layer-copy,
  .evidence-frame-intro {
    border-right: 0;
    border-bottom: 1px solid var(--ev-line);
  }

  .workflow-map,
  .consulting-filter {
    grid-template-columns: 1fr;
  }

  .workflow-spine {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .workflow-node,
  .workflow-node:first-child,
  .workflow-node:last-child {
    border: 1px solid var(--ev-line);
  }

  .workflow-node::after {
    display: none;
  }

  .service-layer-track {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-layer-step,
  .service-layer-step:first-child,
  .service-layer-step:last-child {
    border: 1px solid var(--ev-line);
    border-radius: 0;
  }

  .service-layer-step::after {
    display: none;
  }
}

@media (max-width: 620px) {
  .evidence-section {
    width: min(calc(100% - 32px), 1036px);
    padding-block: 64px;
  }

  .impact-chart-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .impact-chart-wrap,
  .model-chart-canvas {
    padding: 20px 14px 24px;
  }

  .service-layer-track {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 20px;
  }

  .service-layer-step,
  .service-layer-step:first-child,
  .service-layer-step:last-child {
    border-radius: 12px;
  }

  .workflow-map-body,
  .consulting-filter-body {
    padding: 20px;
  }

  .workflow-spine {
    grid-template-columns: 1fr;
  }

  .workflow-node {
    padding: 16px;
  }

  .workflow-node strong {
    margin-top: 8px;
  }

  .workflow-safety-rail {
    align-items: flex-start;
    flex-direction: column;
  }

  .workflow-safety-rail strong {
    margin-right: 0;
  }

  .workflow-safety-rail span {
    padding-left: 0;
    border-left: 0;
  }

  .consulting-filter-row {
    grid-template-columns: 78px minmax(0, 1fr) 10px;
    gap: 10px;
  }

  .consulting-pilot {
    align-items: flex-start;
    flex-direction: column;
  }

  .consulting-pilot strong {
    text-align: left;
  }

  .evidence-matrix {
    grid-template-columns: minmax(110px, .72fr) repeat(3, minmax(92px, 1fr));
    overflow-x: auto;
  }

  .evidence-matrix > * {
    padding: 16px 10px;
  }

  .evidence-matrix-head,
  .evidence-matrix-cell span {
    font-size: .62rem;
  }
}

[data-theme="dark"] .evidence-section {
  --ev-blue-soft: rgba(10, 132, 255, .16);
}

[data-theme="dark"] .service-layer-step::after {
  background: var(--ev-surface);
}
