.safety-section { position: relative; border-inline: 1px solid var(--grid-line); border-bottom: 1px solid transparent; background: var(--paper); }
.safety-section::before, .safety-section::after { content: ''; position: absolute; pointer-events: none; left: calc(50% - 50vw); width: 100vw; height: 1px; background: var(--grid-line); }
.safety-section::before { top: 0; }
.safety-section::after { bottom: -1px; }
.safety-section + .setup-divider-space::before { content: none; }
.safety-header { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; column-gap: 48px; row-gap: var(--copy-gap); padding: 28px var(--section-inset) 24px; }
.safety-header h2 { margin: 0; max-width: 22ch; font-size: clamp(28px, 2.8vw, 36px); font-weight: 500; letter-spacing: -.045em; line-height: 1.12; }
.safety-header p { margin: 0; max-width: var(--copy-measure); font-size: 16px; line-height: 1.55; }
/* Keep the highway inside the bento's continuous side rails. */
.safety-example { padding: 16px 0 20px; }
.safety-highway { --lane-height: 24px; --lane-padding: 8px; position: relative; }
.safety-lanes { --gate-contact: calc(50cqw + 10px); position: relative; width: 100%; margin-inline-start: 0; padding-block: var(--lane-padding); overflow: clip; container-type: inline-size; }
.safety-lane { height: var(--lane-height); position: relative; }
.safety-track { position: absolute; inset: 50% 0 auto; height: 1px; background: var(--grid-line); }
.safety-gate {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 36px;
  height: 100%;
  fill: #f3f2f3;
  stroke: #d2cfd2;
  stroke-width: 1;
}
.safety-packet { position: absolute; z-index: 3; left: 0; top: 50%; width: 150px; height: 1px; color: var(--signal); }
.safety-packet::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to right, currentColor, transparent 100%);
  opacity: .9; filter: drop-shadow(0 0 1px currentColor);
}
/* One continuous surface; a stopped signal briefly lights its contact edge. */
.safety-gate-impact {
  position: absolute;
  z-index: 4;
  left: calc(50% - 10px);
  top: calc(50% - 11px);
  width: 20px;
  height: 22px;
  background: linear-gradient(270deg, #d68c8729, #d68c8700);
  opacity: 0;
  pointer-events: none;
}
.safety-gate-impact::after {
  content: '';
  position: absolute;
  right: -0.5px;
  top: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(transparent, #c77f7b 35% 65%, transparent);
}
.safety-reduced-motion .safety-gate-impact { display: none; }
/* Static outcomes retain the meaning without moving traffic. */
.safety-reduced-motion .safety-packet { transform: translateX(28cqw) !important; opacity: 1 !important; }
.safety-reduced-motion .safety-lane[data-kind="held"] .safety-packet { transform: translateX(var(--gate-contact)) !important; }
.safety-reduced-motion [data-secondary] { display: none; }
@media (max-width: 759px) {
 .safety-header { grid-template-columns: 1fr; gap: 16px; }
 .safety-header h2 { max-width: 20ch; font-size: 28px; }
}

.safety-packet.safety-hero-signal::after { content: ''; position: absolute; left: 0; top: -5px; width: 10px; height: 10px; background: currentColor; }
.safety-packet.safety-hero-signal::after { transform: none; border-radius: 1.5px; }
.safety-packet.safety-hero-signal[data-shape="diamond"]::after { transform: rotate(45deg); }
.safety-packet.safety-hero-signal[data-shape="circle"]::after { border-radius: 50%; }
.safety-reduced-motion .safety-hero-signal { display: none; }

/* Red identifies the risky instruction; plum identifies owner-defined filters. */
.safety-review-preview,
.safety-label-demo {
  width: 100%;
  max-width: 350px;
  min-height: 304px;
  justify-self: center;
  font-size: 12px;
  line-height: 1.4;
}
.safety-review-preview { display: grid; align-content: center; max-width: 400px; }
.safety-inbox-card { border: 1px solid var(--grid-line); border-radius: 10px; overflow: hidden; background: #fff; }
.safety-inbox-title { display: flex; align-items: center; gap: 6px; padding: 9px 16px; border-bottom: 1px solid var(--grid-line); background: var(--paper); color: #625b63; }
.safety-review-preview svg {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.safety-message-excerpt {
  margin: 0;
  padding: 16px;
  color: #49434a;
  font-size: clamp(18px, 1.9vw, 21px);
  letter-spacing: -.012em;
  line-height: 1.45;
}
.safety-message-excerpt mark {
  color: #a24f4b;
  background: none;
}
@media (scripting: enabled) and (prefers-reduced-motion: no-preference) and (forced-colors: none) {
  @supports (background-clip: text) or (-webkit-background-clip: text) {
    .safety-review-preview {
      --review-delay: 240ms;
      --review-sweep: 850ms;
    }
    .safety-message-excerpt mark {
      --quote-ink: #49434a;
      color: transparent;
      background-image: linear-gradient(100deg, #a24f4b 36%, #bb6b61 46%, #cd8073 50%, #955452 56%, var(--quote-ink) 64%);
      background-size: 350% 100%;
      background-position: 100% 0;
      -webkit-background-clip: text;
      background-clip: text;
      animation: flagged-phrase-shimmer var(--review-sweep) linear var(--review-delay) both;
      animation-play-state: paused;
    }
    .safety-review-reason {
      animation: reveal-review-reason 200ms ease-out calc(var(--review-delay) + var(--review-sweep)) both;
      animation-play-state: paused;
    }
    [data-active-demo="safety"] .safety-message-excerpt[data-visible] mark,
    [data-active-demo="safety"] .safety-message-excerpt[data-visible] + .safety-review-reason {
      animation-play-state: running;
    }
  }
}
@keyframes flagged-phrase-shimmer {
  from { background-position: 100% 0; }
  to { background-position: 0% 0; }
}
@keyframes reveal-review-reason {
  from { opacity: 0; }
  to { opacity: 1; }
}
.safety-review-reason {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 16px;
  border-top: 1px solid var(--grid-line);
  background: #c971680a;
  color: #a24f4b;
}
.safety-review-reason strong { display: block; font-size: 12px; font-weight: 500; }
.safety-review-reason span { display: block; margin-top: 3px; font-size: 11px; color: #777178; }
@media (max-width: 620px) {
  .safety-review-preview, .safety-label-demo { max-width: none; }
}

.safety-label-demo { position: relative; display: grid; align-content: center; padding-block: 16px; }
.label-demo-pause {
  position: absolute;
  bottom: 0;
  right: 0;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 6px;
  border: 0;
  background: none;
  color: #777178;
  font: inherit;
  cursor: pointer;
}
.label-demo-pause svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.label-play-glyph, .is-paused .label-pause-glyph { display: none; }
.is-paused .label-play-glyph { display: block; }
.label-demo-pause:focus-visible { outline: 2px solid #927096; outline-offset: 4px; }
.label-demo-scenes { display: grid; }
.label-demo-scene { display: grid; align-items: center; grid-area: 1 / 1; min-width: 0; opacity: 0; }
.label-demo-definition, .label-demo-message { grid-area: 1 / 1; }
.label-demo-definition small { display: block; margin-bottom: 12px; font-size: 12px; color: #716971; }
.label-message-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; }
.label-message-meta strong { font-size: 14px; font-weight: 500; }
.label-message-meta .ag-person { display: inline-flex; flex: 0 0 24px; width: 24px; height: 24px; border-radius: 50%; overflow: hidden; }
.label-message-meta .ag-person svg { width: 100%; height: 100%; }
.label-demo-name { display: flex; align-items: center; justify-content: flex-start; gap: 10px; margin: 0 0 12px; min-height: 29px; font-size: 21px; font-weight: 500; letter-spacing: -.03em; line-height: 1.25; }
.label-demo-typed-name { min-width: 0; }
.label-word { display: inline-block; }
.label-icon-cloud, .label-icon-result { grid-area: 1 / 1; }
.label-demo-icon .label-icon-cloud { color: #625d65; fill: currentColor; stroke: none; }
.label-icon-result { display: grid; place-items: center; }
.label-demo-icon { display: grid; place-items: center; width: 25px; height: 25px; color: #49434a; flex: none; }
.label-demo-icon svg, .label-demo-chip svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.label-demo-chip svg { width: 16px; height: 16px; }
.safety-details .label-demo-description { margin: 0 0 0 35px; font-size: 13px; line-height: 1.5; color: #777178; max-width: 35ch; }
.safety-details .label-demo-message p { margin: 12px 0 0; max-width: 32ch; font-size: 18px; letter-spacing: -.015em; color: #49434a; line-height: 1.45; }
.label-demo-scene[data-tone="rose"] { --label-ink: #885367; --label-tint: #f4e8ed; }
.label-demo-scene[data-tone="violet"] { --label-ink: #6e5a8b; --label-tint: #efeaf5; }
.label-demo-scene[data-tone="teal"] { --label-ink: #386d66; --label-tint: #e4f1ec; }
.label-icon-result { color: var(--label-ink); }
.label-demo-chip { display: inline-flex; align-items: center; gap: 5px; margin-inline-start: 3px; padding: 3px 8px; border-radius: 12px; color: var(--label-ink); background: var(--label-tint); font-size: 11px; transform-origin: left center; }
@media (max-width: 620px) { .safety-label-demo { min-height: 190px; } }
@media (prefers-reduced-motion: reduce) { .label-demo-pause { display: none; } }

.safety-highway-labels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 0 var(--section-inset) 14px;
  color: #817b83;
  font-size: 10px;
  line-height: 1.4;
}
.safety-highway-labels span:nth-child(2) { text-align: center; }
.safety-highway-labels span:last-child { text-align: right; }

@media (min-width: 621px) {
  .safety-detail-copy { min-height: 94px; }
}
