.opportunity .section-intro { margin-bottom: 1.75rem; }
.history-demo { margin: 0 0 2.5rem; color: #244c3b; container-type: inline-size; scroll-margin-top: 2rem; }
.history-stage { position: relative; height: 320px; isolation: isolate; overflow: hidden; }
.history-demo svg { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.history-scene { position: absolute; top: -20px; left: 50%; width: min(78%, 980px); height: 380px; transform: translateX(-50%) perspective(1100px) rotateX(58deg); transform-style: preserve-3d; }
.history-ground { position: absolute; inset: 0; display: grid; grid-template-rows: repeat(23, 1fr); gap: 7px; padding: 22px; border: 1px solid #a6baa252; background: linear-gradient(180deg, #e5e9dc66, #e2e6d84d); mask-image: linear-gradient(to bottom, #000 55%, transparent 98%); }
.archive-row { display: flex; gap: 8px; }
.archive-cell { display: block; min-width: 0; border-radius: 2px; background: #a8b3a18c; }
.archive-cell.is-signal { background: #7d9e73; }
.history-records { position: absolute; inset: 0; transform-style: preserve-3d; }
.history-event { position: absolute; width: 19%; transform: translateZ(70px); transform-style: preserve-3d; }
.history-record { padding: 16px; border: 1px solid #b2c7ad; border-radius: 3px; background: #fffef2; box-shadow: 4px 14px 15px -10px #315a3a44; }
.history-email { left: 0; top: 5%; }
.history-discussion { left: 20%; top: 18%; }
.history-document { left: 42%; top: 0; width: 16%; }
.history-crm { left: 62%; top: 24%; }
.history-invoice { left: 82%; top: 5%; width: 17%; }
.history-callouts { position: absolute; inset: 0; pointer-events: none; }
.history-callouts > span { position: absolute; top: 10px; padding: 0 0 10px; width: 15%; border-bottom: 1px solid #9ab1958c; color: #446544; font: 500 12px/1.3 var(--mono); text-transform: uppercase; letter-spacing: .04em; }
.history-callouts > span::after { content: ''; position: absolute; bottom: -28px; height: 28px; width: 1px; background: #9ab1958c; transform: rotate(-35deg); transform-origin: top; }
.history-callouts > span:nth-child(1) { left: 3%; }
.history-callouts > span:nth-child(2) { left: 21%; }
.history-callouts > span:nth-child(3) { left: 44%; }
.history-callouts > span:nth-child(4) { right: 19%; text-align: right; }
.history-callouts > span:nth-child(5) { right: 1%; text-align: right; }
.history-callouts > span:nth-child(n+4)::after { right: 0; transform: rotate(35deg); }
.fragment-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.fragment-toolbar > svg { width: 21px; height: 21px; flex: none; }
.fragment-dots { color: #8c9e91; font: 600 20px/1 var(--sans); }
.fragment-rule, .fragment-lines i, .fragment-fields i, .fragment-total i, .fragment-bubble i { display: block; height: 5px; border-radius: 5px; background: #dce3d8; }
.fragment-rule { width: 65%; }
.fragment-rule.short { width: 40%; }
.fragment-sender { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.fragment-avatar { display: block; width: 20px; height: 20px; flex: none; border-radius: 50%; background: #b6c9b4; }
.fragment-subject { display: block; font: 500 14px/1.2 var(--sans); margin-bottom: 10px; }
.fragment-lines { display: grid; gap: 7px; }
.fragment-lines i:last-child { width: 72%; }
.fragment-attachment { display: flex; align-items: center; gap: 6px; width: 65%; border: 1px solid #dce3d8; border-radius: 4px; padding: 4px; margin-top: 13px; }
.fragment-attachment svg { width: 14px; height: 14px; flex: none; }
.fragment-chat { display: flex; align-items: start; gap: 8px; margin: 9px 0; }
.fragment-bubble { flex: 1; display: grid; gap: 7px; border-radius: 1px 8px 8px 8px; padding: 10px; background: #edf0e9; }
.fragment-bubble i:last-child { width: 70%; }
.fragment-chat.reply { margin: 0 0 0 30%; }
.fragment-chat.reply .fragment-bubble { position: relative; background: #d9ecd5; padding-right: 28px; min-height: 27px; }
.fragment-chat.reply svg { position: absolute; right: 7px; top: 5px; width: 17px; height: 17px; }
.fragment-version { padding: 2px 5px; background: #e0edd9; font: 500 12px/1.3 var(--mono); }
.fragment-revision { display: flex; align-items: center; gap: 6px; padding: 4px 6px; margin-top: 8px; font: 500 13px/1 var(--mono); }
.fragment-revision i { display: block; height: 4px; flex: 1; background: currentColor; opacity: .3; }
.fragment-revision.old { background: #f2e8e0; color: #936e60; }
.fragment-revision.new { margin-top: 4px; background: #d9efcf; color: #487c3b; }
.fragment-lines.last { margin-top: 14px; }
.history-document .history-record { padding-bottom: 23px; box-shadow: 4px 5px 0 -1px #e7eddf, 4px 5px 0 0 #bfcdbd, 0 14px 32px -16px #193b3955; }
.fragment-pipeline { display: flex; align-items: center; margin: 22px 0; }
.fragment-pipeline b { width: 16px; height: 16px; border-radius: 50%; background: #cbdcc4; }
.fragment-pipeline b:last-child { width: 24px; height: 24px; padding: 3px; background: #b7e4ba; }
.fragment-pipeline b svg { width: 100%; height: 100%; }
.fragment-pipeline i { height: 2px; flex: 1; background: #b4cbae; }
.fragment-fields { display: grid; grid-template-columns: 1.5fr 1fr; gap: 9px 20px; }
.fragment-fields i:nth-child(even) { background: #a8bca7; }
.fragment-total { display: flex; gap: 12px; align-items: center; border-top: 1px dashed #cad7c5; margin-top: 15px; padding-top: 8px; }
.fragment-total > span { font: 400 25px/1.2 var(--sans); }
.fragment-total i { width: 48%; height: 7px; }
.fragment-paid { display: flex; align-items: center; justify-content: center; gap: 6px; width: fit-content; margin: 12px 0 0 auto; padding: 3px 8px; border: 1px solid #accaa8; color: #386747; font: 500 12px/1.3 var(--mono); }
.fragment-paid svg { width: 13px; height: 13px; }
.history-years { position: absolute; bottom: 10px; left: 9%; right: 9%; display: flex; align-items: center; gap: 16px; font: 400 12px/1.3 var(--mono); color: #6b826c; }
.history-years i { height: 1px; flex: 1; background: #8daa7966; }
@container (max-width: 55rem) {
  .history-stage { height: 300px; }
  .history-scene { width: 90%; height: 340px; top: -8px; }
  .history-record { padding: 12px; }
  .fragment-toolbar { margin-bottom: 10px; }
  .fragment-pipeline { margin: 14px 0; }
  .history-callouts > span { width: 12%; }
}
@container (max-width: 34rem) {
  .history-stage { height: 270px; }
  .history-scene { width: 94%; height: 280px; top: 0; transform: translateX(-50%) perspective(700px) rotateX(49deg); }
  .history-ground { gap: 5px; padding: 12px; grid-template-rows: repeat(18, 1fr); }
  .archive-row { gap: 4px; }
  .archive-row:nth-child(n+19) { display: none; }
  .history-event { width: 31%; transform: translateZ(45px); }
  .history-email { left: 0; top: 0; }
  .history-discussion { left: 8%; top: 47%; }
  .history-document { left: 36%; top: -8%; width: 28%; }
  .history-crm { left: 56%; top: 48%; width: 35%; }
  .history-invoice { left: 72%; top: 2%; width: 29%; }
  .history-record { padding: 9px; }
  .fragment-toolbar { margin-bottom: 9px; }
  .fragment-toolbar > svg { width: 18px; height: 18px; }
  .fragment-avatar { width: 14px; height: 14px; }
  .fragment-sender { margin-bottom: 7px; }
  .fragment-subject { font-size: 12px; margin-bottom: 7px; }
  .fragment-rule, .fragment-lines i, .fragment-fields i, .fragment-bubble i { height: 3px; }
  .fragment-lines { gap: 5px; }
  .fragment-attachment { margin-top: 8px; width: 80%; padding: 2px; }
  .fragment-chat { gap: 5px; margin: 7px 0; }
  .fragment-bubble { padding: 7px; gap: 5px; }
  .fragment-chat.reply { margin-left: 15%; }
  .fragment-revision { padding: 3px; margin-top: 6px; }
  .fragment-lines.last { margin-top: 8px; }
  .history-document .history-record { padding-bottom: 16px; }
  .fragment-pipeline { margin: 11px 0; }
  .fragment-pipeline b { width: 11px; height: 11px; }
  .fragment-pipeline b:last-child { width: 19px; height: 19px; }
  .fragment-fields { gap: 7px 12px; }
  .fragment-total { margin-top: 9px; padding-top: 6px; gap: 7px; }
  .fragment-total > span { font-size: 21px; }
  .fragment-paid { padding: 2px 4px; margin-top: 8px; gap: 3px; }
  .history-callouts > span { width: auto; border: none; top: 0 !important; left: 0 !important; right: auto !important; }
  .history-callouts > span::after { display: none; }
  .history-demo:not([data-history-state]) .history-callouts, .history-demo[data-history-state="static"] .history-callouts { display: none; }
  .history-years { bottom: 19px; left: 3%; right: 3%; }
}
@media (prefers-reduced-motion: reduce) {
  .history-demo *, .history-demo *::before, .history-demo *::after { animation: none !important; transition: none !important; }
}
