/* Data & Integrations (/data-integrations). Loaded after svc.css and uipath.css.
   The example: one made-up patient written four different ways in four systems. Each record is matched into one
   record, which the booking app, reports, an AI agent and staff then use. Driven by /scripts/v2/svc-flows.mjs; the
   markup holds the finished state, which is what shows with reduced motion. Uses the paper colors from .up-board. */
.dm-board { transform: none; padding: 20px 24px 22px; }
.dm-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) minmax(0, .9fr); gap: 0 52px; margin-top: 4px; }
.dm-col { display: grid; grid-template-rows: auto 1fr; min-width: 0; }
.dm-h { font-family: var(--f-mono); font-stretch: 87.5%; font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--faint-type); }
.dm-list { list-style: none; padding: 0; display: grid; gap: 8px; margin-top: 10px; }

/* Where the data is: four systems, four spellings */
.dm-src { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "k st" "name name" "v v"; gap: 2px 8px; align-items: center; padding: 9px 11px; border: 1px solid var(--rule-type); transition: border-color 240ms ease, box-shadow 240ms ease; }
.dm-k { grid-area: k; font-family: var(--f-mono); font-stretch: 87.5%; font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint-type); }
.dm-st { grid-area: st; font-family: var(--f-mono); font-stretch: 87.5%; font-size: 10px; letter-spacing: .04em; color: var(--type); opacity: 0; transition: opacity 300ms ease; }
.dm-st::before { content: "✓ "; color: #1E9E57; }
.dm-src strong { grid-area: name; font-family: var(--f-mono); font-stretch: 87.5%; font-size: 13.5px; font-weight: 600; color: var(--type); overflow-wrap: anywhere; }
.dm-v { grid-area: v; font-size: 12px; line-height: 1.35; color: var(--faint-type); }
.dm-src.act { border-color: var(--type); box-shadow: 3px 3px 0 var(--type); }
.dm-src.sent { border-color: var(--type); }
.dm-src.sent .dm-st { opacity: 1; }

/* Lines into and out of the record, with a yellow square that travels along them */
.dm-src::after, .dm-use::before { content: ""; position: absolute; top: 50%; width: 52px; border-top: 1px dashed var(--rule-type); }
.dm-src::after { left: 100%; }
.dm-use::before { right: 100%; }
.dm-src.sent::after, .dm-use.on::before { border-top-style: solid; border-top-color: var(--type); }
.dm-dot { position: absolute; top: calc(50% - 4px); width: 8px; height: 8px; background: #F2C230; border: 1px solid var(--type); opacity: 0; pointer-events: none; }
.dm-src .dm-dot { left: 100%; }
.dm-use .dm-dot { right: 100%; }
.dm-src.go .dm-dot { animation: dmIn 650ms ease-in-out both; }
.dm-use.go .dm-dot { animation: dmOut 550ms ease-in-out both; }
@keyframes dmIn { 0% { opacity: 1; transform: translateX(0); } 85% { opacity: 1; transform: translateX(44px); } 100% { opacity: 0; transform: translateX(44px); } }
@keyframes dmOut { 0% { opacity: 1; transform: translateX(-44px); } 85% { opacity: 1; transform: translateX(0); } 100% { opacity: 0; transform: translateX(0); } }

/* One record */
.dm-mid .dm-rec { margin-top: 10px; display: grid; align-content: start; gap: 10px; padding: 16px 16px 14px; border: 2px solid var(--type); }
.dm-name { font-family: var(--f-display); font-stretch: 112%; font-weight: 740; font-size: 22px; line-height: 1.15; letter-spacing: -.01em; color: var(--type); opacity: .14; transition: opacity 300ms ease; }
.dm-name.on { opacity: 1; }
.dm-rows { display: grid; border-top: 1px dashed var(--rule-type); }
.dm-rows > div { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 10px; align-items: baseline; padding: 8px 0; border-bottom: 1px dashed var(--rule-type); }
.dm-rows dt { font-size: 12px; color: var(--faint-type); }
.dm-rows dd { margin: 0; font-family: var(--f-mono); font-stretch: 87.5%; font-size: 13px; color: var(--type); opacity: .14; transition: opacity 300ms ease; }
.dm-rows > div.on dd { opacity: 1; }
.dm-count { justify-self: start; padding: 4px 8px; border: 1px solid var(--rule-type); font-size: 13px; color: var(--faint-type); transition: background 240ms ease, color 240ms ease, border-color 240ms ease; }
.dm-count b { font-family: var(--f-display); font-stretch: 118%; font-weight: 780; }
.dm-count.on { background: #F2C230; border-color: var(--type); color: #15181A; }

/* Who uses it */
.dm-uses { align-content: start; }
.dm-use { position: relative; display: grid; gap: 2px; padding: 9px 11px; border: 1px solid var(--rule-type); opacity: .4; transition: opacity 300ms ease, border-color 240ms ease; }
.dm-use strong { display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 650; color: var(--type); }
.dm-use strong::after { content: "✓"; margin-left: auto; color: #1E9E57; opacity: 0; transition: opacity 300ms ease; }
.dm-use span:not(.dm-dot) { font-size: 12.5px; line-height: 1.35; color: var(--faint-type); }
.dm-use.on { opacity: 1; border-color: var(--type); }
.dm-use.on strong::after { opacity: 1; }

@media (max-width: 900px) {
  .dm-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .dm-col + .dm-col { margin-top: 18px; padding-top: 30px; position: relative; }
  .dm-col + .dm-col::before { content: "↓"; position: absolute; top: 0; left: 50%; transform: translateX(-50%); font-size: 20px; line-height: 1; color: var(--type); }
  .dm-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dm-src::after, .dm-use::before, .dm-dot { display: none; }
}
@media (max-width: 560px) {
  .dm-board { padding: 16px 14px 18px; }
  .dm-list { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .dm-uses { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dm-rows > div { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); }
  .up-top span + span { display: none; }
}

/* Docplanner metrics */
.di-proof .up-stats { grid-template-columns: minmax(0, .8fr) minmax(0, 1.6fr) minmax(0, .9fr); }
.di-proof .up-stats dt { font-size: clamp(24px, 2.5vw, 36px); }
@media (max-width: 600px) {
  .di-proof .up-stats { grid-template-columns: minmax(0, 1fr); }
  .di-proof .up-stats > div, .di-proof .up-stats > div + div { padding: 16px 0; border-left: 0; }
  .di-proof .up-stats > div + div { border-top: 1px dashed var(--line); }
  .di-proof .up-stats dt { font-size: 32px; }
}
.svc-fig.paused .dm-dot { animation-play-state: paused; }

/* How we connect: four ways, as a ruled list (no cards). */
.di-ways { margin: 0; border-top: 2px solid var(--ink); }
.di-ways > div { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 8px 20px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.di-ways dt { font-family: var(--f-mono); font-stretch: 87.5%; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); padding-top: 4px; }
.di-ways dd { margin: 0; font-size: 17px; line-height: 1.55; color: var(--ink-2); }
@media (max-width: 600px) { .di-ways > div { grid-template-columns: minmax(0, 1fr); } }

/* What an automation needs: the paper cards sit under the intro. */
#reliable .up-help { margin-top: 36px; }

/* Where the data stays, under the steps. */
.di-stay { margin-top: 28px; max-width: 64ch; font-size: 17px; line-height: 1.55; color: var(--ink); padding-left: 16px; border-left: 3px solid var(--c-yellow); }
.di-more { display: flex; flex-wrap: wrap; gap: 10px 28px; }

/* Client examples: two paper cards under the heading. */
.di-proof .up-cases { margin-top: 32px; }
@media (min-width: 601px) { .di-proof .up-stats.two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.di-proof .up-case .btn-text { justify-self: start; }
