/* =====================================================================
   LINTAS — command-centre.html only. Shared components live in site.css;
   this file holds page-unique pieces: the live dashboard mock (hero), the
   exception-handling flow, escalation ladder, integrations + webhook
   sample, the KPI chart and the case card.
   Motion: transform / opacity / stroke-dashoffset only.
   ===================================================================== */

/* ── Hero: live dashboard mock ─────────────────────────────────────── */
.cc-grid { align-items: center; }
@media (min-width: 900px) { .cc-grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); } }
.phero-media.cc-media { aspect-ratio: auto; }
.cc-dash { position: relative; overflow: hidden; border: 1px solid var(--navy-3); border-radius: 8px; background: var(--navy); box-shadow: 0 40px 80px -40px rgba(11, 21, 38, .65); }
.cc-ui { display: grid; }
.cc-k { font: 500 10.5px/1.25 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--on-navy-2); }
.cc-top { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--navy-line); font: 500 11px/1 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--on-navy-2); }
.cc-live { display: inline-flex; align-items: center; gap: 7px; padding: 5px 8px; border-radius: 3px; background: rgba(79, 216, 139, .12); color: #4fd88b; font-weight: 600; }
.cc-live i { position: relative; width: 7px; height: 7px; border-radius: 50%; background: #4fd88b; }
.cc-live i::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1.5px solid #4fd88b; opacity: 0; animation: pulse 1.8s var(--ease-out) infinite; }
.cc-dash.is-paused .cc-live i::after { animation-play-state: paused; }
.cc-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-clock { color: var(--on-navy); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cc-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--navy-line); }
.cc-kpi { display: grid; gap: 7px; padding: 14px 14px 12px; min-width: 0; }
.cc-kpi + .cc-kpi { border-left: 1px solid var(--navy-line); }
.cc-kpi b { font: 700 clamp(1.45rem, 2.3vw, 2rem)/1 var(--sans); letter-spacing: -.035em; font-variant-numeric: tabular-nums; color: var(--on-navy); }
.cc-kpi small { font: 500 11px/1.2 var(--mono); color: var(--on-navy-2); }
.cc-kpi.is-exc b { color: #f2b14a; }
.cc-list { padding: 2px 14px; border-bottom: 1px solid var(--navy-line); }
.cc-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, .82fr) minmax(0, 1fr); gap: 10px; align-items: center; min-height: 38px; margin: 0 -14px; padding: 0 14px; border-bottom: 1px solid var(--navy-line); font: 500 12px/1.2 var(--mono); transition: background-color 1.2s ease; }
.cc-list ul .cc-row:last-child { border-bottom: 0; }
.cc-row.is-flash { background-color: rgba(138, 166, 255, .1); transition-duration: .15s; }
.cc-lh { min-height: 30px; font-size: 10px; letter-spacing: .07em; text-transform: uppercase; color: var(--on-navy-2); }
.cc-ref { color: var(--on-navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-lane { display: inline-flex; align-items: center; gap: 6px; color: var(--on-navy-2); white-space: nowrap; overflow: hidden; }
.cc-lane .i { width: 14px; height: 14px; color: var(--signal-hi); }
.cc-eta { color: var(--on-navy); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cc-chip { justify-self: start; display: inline-flex; align-items: center; max-width: 100%; height: 22px; padding: 0 8px; border-radius: 3px; font: 600 10px/1 var(--mono); letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-chip.is-info { background: rgba(138, 166, 255, .14); color: var(--signal-hi); }
.cc-chip.is-ok { background: rgba(79, 216, 139, .14); color: #4fd88b; }
.cc-chip.is-warn { background: rgba(242, 177, 74, .16); color: #f2b14a; }
.cc-bottom { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); }
.cc-mapbox { display: grid; gap: 4px; align-content: start; padding: 12px 10px 8px 14px; border-right: 1px solid var(--navy-line); }
.cc-map svg { aspect-ratio: 216 / 162; }
.cc-map .rmap-dots circle { opacity: .4; }
.cc-feed { display: grid; gap: 10px; align-content: start; min-width: 0; padding: 12px 14px 14px; }
.cc-alerts { position: relative; height: calc(58px * 3 + 16px); overflow: hidden; }
.cc-al { position: absolute; left: 0; right: 0; top: 0; height: 58px; display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 9px 10px 9px 9px; border: 1px solid var(--navy-line); border-left: 2px solid currentColor; border-radius: 4px; background: var(--navy-2); translate: 0 calc(var(--k, 0) * (100% + 8px)); transition: translate .5s var(--ease-io), opacity .32s var(--ease-out), background-color 1.2s ease; }
.cc-al.is-new { background: var(--navy-3); transition: translate .5s var(--ease-io), opacity .32s var(--ease-out), background-color .15s ease; }
.cc-al.is-info { color: var(--signal-hi); } .cc-al.is-ok { color: #4fd88b; } .cc-al.is-warn { color: #f2b14a; }
.cc-al > .i { width: 16px; height: 16px; margin-top: 1px; }
.cc-al div { min-width: 0; }
.cc-al p { display: flex; align-items: baseline; gap: 8px; min-width: 0; white-space: nowrap; overflow: hidden; }
.cc-al b { font: 600 12.5px/1.25 var(--sans); color: var(--on-navy); }
.cc-al code { font: 500 10.5px/1.2 var(--mono); color: var(--on-navy-2); overflow: hidden; text-overflow: ellipsis; }
.cc-al .cc-al-t { display: block; margin-top: 4px; font-size: 12px; line-height: 1.3; color: var(--on-navy-2); overflow: hidden; text-overflow: ellipsis; }
.cc-al time { font: 500 10.5px/1.25 var(--mono); color: var(--on-navy-2); font-variant-numeric: tabular-nums; }
@media (max-width: 1099.98px) and (min-width: 900px) { .cc-row { grid-template-columns: minmax(0, 1.35fr) minmax(0, .8fr) minmax(0, 1fr); } .cc-row > :nth-child(2) { display: none; } }
@media (max-width: 899.98px) { .cc-dash { max-width: 640px; } }
@media (max-width: 599.98px) {
  .cc-top { padding: 9px 12px; gap: 10px; }
  .cc-title { display: none; }
  .cc-clock { margin-left: auto; }
  .cc-kpi { padding: 12px 10px 10px; gap: 5px; }
  .cc-kpi b { font-size: 1.3rem; }
  .cc-kpi small { display: none; }
  .cc-k { font-size: 9.5px; }
  .cc-list { padding: 0 12px; }
  .cc-row { grid-template-columns: minmax(0, 1.25fr) minmax(0, .85fr) minmax(0, 1fr); gap: 8px; margin: 0 -12px; padding: 0 12px; font-size: 11px; }
  .cc-row > :nth-child(2) { display: none; }
  .cc-list ul .cc-row:nth-child(5) { display: none; }
  .cc-list ul .cc-row:nth-child(4) { border-bottom: 0; }
  .cc-chip { padding: 0 6px; font-size: 9.5px; }
  .cc-bottom { grid-template-columns: minmax(0, 1fr); }
  .cc-mapbox { display: none; }
  .cc-feed { padding: 12px; }
  .cc-alerts { height: calc(58px * 2 + 8px); }
}

/* ── Exception flow: detected → triaged → alerted → resolved ───────── */
.xf { border: 1px solid var(--line); border-radius: var(--r); background: var(--card); overflow: hidden; }
.xf-ticket { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 14px 28px; align-items: center; padding: 18px clamp(20px, 3vw, 32px); background: var(--navy) var(--grid-dark); color: var(--on-navy); }
.xf-ticket .kv { color: var(--on-navy-2); }
.xf-id, .xf-clock { display: grid; gap: 6px; }
.xf-id b, .xf-clock b { font: 600 1.15rem/1 var(--mono); letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.xf-what { min-width: 0; }
.xf-what b { display: block; font-size: 1.05rem; font-weight: 700; letter-spacing: -.01em; }
.xf-what span { display: block; margin-top: 4px; font: 500 12px/1.4 var(--mono); color: var(--on-navy-2); }
.xf-state { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: 3px; font: 600 11px/1 var(--mono); letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; transition: background-color .2s ease, color .2s ease; }
.xf-state.is-info { background: rgba(138, 166, 255, .16); color: var(--signal-hi); }
.xf-state.is-ok { background: rgba(79, 216, 139, .16); color: #4fd88b; }
.xf-state.is-warn { background: rgba(242, 177, 74, .18); color: #f2b14a; }
.xf-body { position: relative; padding: clamp(28px, 4vw, 44px) clamp(20px, 3vw, 32px) 4px; }
.xf-track { position: absolute; left: 0; top: 0; width: 0; height: 2px; background: var(--line-2); pointer-events: none; }
.xf-fill { position: absolute; inset: 0; background: var(--signal); transform-origin: 0 0; transition: scale .9s var(--ease-io); }
.xf-dot { display: none; position: absolute; left: 1px; top: 1px; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 4px rgba(26, 75, 255, .18); transition: translate .9s var(--ease-io); }
.js .xf-dot { display: block; }
.xf-steps { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.xf-s { transition: opacity .35s ease; }
.xf-n { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--signal); border-radius: 4px; background: var(--signal); color: #fff; transition: background-color .25s ease, border-color .25s ease, color .25s ease; }
.xf-n .i { width: 20px; height: 20px; }
.xf-t { margin-top: 16px; font: 600 12px/1 var(--mono); letter-spacing: .05em; color: var(--signal); }
.xf-s h3 { margin-top: 8px; font-size: 1.12rem; letter-spacing: -.015em; }
.xf-s p:last-child { margin-top: 8px; font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.js .xf:not(.is-in) .xf-n, .xf.is-playing .xf-s:not(.is-on) .xf-n { background: var(--card); border-color: var(--line-2); color: var(--steel); }
.js .xf:not(.is-in) .xf-s, .xf.is-playing .xf-s:not(.is-on) { opacity: .45; }
.xf-s.is-now .xf-n { box-shadow: 0 0 0 4px rgba(26, 75, 255, .16); }
.xf-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px 24px; margin-top: 24px; padding: 18px clamp(20px, 3vw, 32px) 22px; border-top: 1px solid var(--line); }
.xf-foot .hint { max-width: 62ch; }
@media (max-width: 899.98px) {
  .xf-ticket { grid-template-columns: auto minmax(0, 1fr); }
  .xf-what { grid-column: 1 / -1; grid-row: 1; }
  .xf-state { justify-self: end; }
  .xf-steps { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .xf-s { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 0 18px; padding-bottom: 26px; }
  .xf-n { grid-row: span 3; }
  .xf-t { margin-top: 4px; }
  .xf-s h3 { margin-top: 6px; }
}
@media (max-width: 479.98px) { .xf-ticket { grid-template-columns: minmax(0, 1fr) auto; } .xf-clock { grid-column: 1; } .xf-id { grid-column: 1 / -1; } }

/* ── Service levels: escalation ladder ─────────────────────────────── */
.cc-ladder { margin-top: clamp(40px, 5vw, 64px); }
.cc-ladder .list-check { margin-top: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 48px; }
.cc-ladder .list-check li { color: var(--on-navy); }
@media (max-width: 767.98px) { .cc-ladder .list-check { grid-template-columns: minmax(0, 1fr); } }

/* ── Integrations + webhook sample ─────────────────────────────────── */
.cc-int { display: grid; border-top: 1px solid var(--line); }
.cc-int li { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 16px; align-items: start; padding: 18px 0; border-bottom: 1px solid var(--line); }
.cc-int .i { width: 24px; height: 24px; margin-top: 1px; color: var(--signal); }
.cc-int h3 { font-size: 1.08rem; letter-spacing: -.015em; line-height: 1.25; }
.cc-int p { margin-top: 4px; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.cc-hook { min-width: 0; }
.cc-hook-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 10px 10px 10px 16px; border: 1px solid var(--navy-line); border-bottom: 0; border-radius: var(--r) var(--r) 0 0; background: var(--navy-2); color: var(--on-navy-2); font: 500 12px/1 var(--mono); }
.cc-hook-top b { color: var(--signal-hi); font-weight: 600; }
.cc-hook-ok { margin-right: auto; color: #4fd88b; }
.cc-hook-top .btn { height: 40px; }
.cc-hook .code { border-radius: 0 0 var(--r) var(--r); font-size: 12.5px; }
.cc-hook .hint { margin-top: 12px; }
.cc-code .ln { transition: opacity .3s ease; transition-delay: calc(.2s + var(--i, 0) * 22ms); }
.js .cc-hook:not(.is-in) .cc-code .ln { opacity: 0; }
@media (max-width: 479.98px) { .cc-int li { grid-template-columns: 26px minmax(0, 1fr); } .cc-int .tag { display: none; } .cc-hook .code { font-size: 10.5px; padding: 14px 12px; } }

/* ── Reporting: weekly on-time chart (line draws, points follow) ───── */
@media (min-width: 900px) { .cc-chart { order: -1; } }
.cc-chart { padding: clamp(18px, 2.6vw, 28px); border: 1px solid var(--line); border-radius: var(--r); background: var(--card); }
.cc-chart-h { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; margin-bottom: 16px; font-size: 14px; color: var(--ink-2); }
.cc-chart-h b { color: var(--ink); }
.cc-plot { position: relative; }
.cc-plot svg { width: 100%; height: auto; overflow: visible; }
.ch-grid path { fill: none; stroke: var(--line); stroke-width: 1; }
.ch-grid .ch-base { stroke: var(--line-2); }
.ch-grid text, .ch-x text { font: 500 11px var(--mono); fill: var(--steel); }
.ch-target { fill: none; stroke: var(--ink); stroke-width: 1.2; stroke-dasharray: 4 4; opacity: .5; }
.ch-target-t { font: 600 11px var(--mono); fill: var(--ink-2); }
.ch-line { fill: none; stroke: var(--signal); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; transition: stroke-dashoffset 1.1s linear .2s; } /* constant speed: plotted, not thrown */
.ch-pts circle { fill: var(--card); stroke: var(--signal); stroke-width: 2; transform-box: fill-box; transform-origin: center; transition: opacity .25s ease, scale .35s var(--ease-out); transition-delay: calc(.2s + var(--i, 0) * .157s); } /* each point pops as the line reaches it */
.ch-pts .is-last { fill: var(--signal); stroke: var(--card); stroke-width: 2.5; }
.ch-lbl text { font: 700 15px var(--sans); fill: var(--ink); letter-spacing: -.01em; }
.ch-lbl .ch-low { font: 500 11px var(--mono); fill: var(--steel); letter-spacing: 0; }
.ch-lbl { transition: opacity .3s ease 1.4s; }
.js .cc-chart:not(.is-in) .ch-line { stroke-dashoffset: 1; }
.js .cc-chart:not(.is-in) .ch-pts circle { opacity: 0; scale: .4; }
.js .cc-chart:not(.is-in) .ch-lbl { opacity: 0; }
@media (max-width: 599.98px) {
  .ch-grid text, .ch-x text { font-size: 19px; }
  .ch-target-t { font-size: 18px; }
  .ch-lbl text { font-size: 24px; }
  .ch-lbl .ch-low { font-size: 18px; }
  .ch-line { stroke-width: 3.6; }
  .ch-pts circle { r: 6px; stroke-width: 3; }
  .ch-pts .is-last { r: 9px; }
  .ch-x text:nth-child(even) { display: none; }
}
.cc-hits { position: absolute; left: 0; right: 0; top: 0; bottom: 12%; }
.cc-hits span { position: absolute; top: 0; bottom: 0; width: 11%; left: calc(var(--x) / 560 * 100%); translate: -50% 0; }
.cc-hits span::before { content: ""; position: absolute; left: 50%; top: 10%; bottom: 0; border-left: 1px dashed var(--line-2); opacity: 0; transition: opacity .15s ease; }
.cc-hits span::after { content: attr(data-tip); position: absolute; left: 50%; top: 0; translate: -50% -100%; padding: 6px 8px; border-radius: 3px; background: var(--ink); color: #fff; font: 500 11.5px/1 var(--mono); white-space: nowrap; opacity: 0; transition: opacity .15s ease; pointer-events: none; }
.cc-hits span:last-child::after, .cc-hits span:nth-last-child(2)::after { left: auto; right: 50%; translate: 0 -100%; }
@media (hover: hover) and (pointer: fine) { .cc-hits span:hover::before, .cc-hits span:hover::after { opacity: 1; } }
.cc-mini { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 18px; border-top: 1px solid var(--line); }
.cc-mini > div { padding: 14px 12px 0 0; }
.cc-mini > div + div { padding-left: 14px; border-left: 1px solid var(--line); }
.cc-mini dt { font: 500 10.5px/1.35 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--steel); }
.cc-mini dd { margin-top: 6px; font: 700 1.35rem/1 var(--sans); letter-spacing: -.02em; }
@media (max-width: 479.98px) {
  .cc-mini { grid-template-columns: minmax(0, 1fr); }
  .cc-mini > div, .cc-mini > div + div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 0; border-left: 0; border-bottom: 1px dashed var(--line); }
  .cc-mini dd { margin-top: 0; font-size: 1.15rem; }
}

/* ── Case example ──────────────────────────────────────────────────── */
.cc-quote { margin: 28px 0 0; padding-top: 22px; border-top: 1px solid var(--line); }
.cc-quote p { font: 600 clamp(1.12rem, 1.6vw, 1.32rem)/1.42 var(--sans); letter-spacing: -.015em; max-width: 46ch; }
.cc-quote footer { display: flex; align-items: center; gap: 12px; margin-top: 16px; font-size: 14px; color: var(--steel); }
.cc-quote footer b { display: block; color: var(--ink); }
.cc-av { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 4px; background: var(--ink); color: var(--on-navy); font: 700 14px/1 var(--mono); letter-spacing: .04em; }
.cc-case { display: grid; gap: 18px; align-content: start; padding: clamp(22px, 3vw, 34px); border-radius: var(--r); background: var(--navy) var(--grid-dark); }
.cc-case dl { display: grid; border-top: 1px solid var(--navy-line); }
.cc-case dl > div { display: grid; gap: 8px; padding: 16px 0; border-bottom: 1px solid var(--navy-line); }
.cc-case dt { font-size: 14px; color: var(--on-navy-2); }
.cc-case dd { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.cc-case s { position: relative; font: 500 1rem/1 var(--mono); color: var(--on-navy-2); text-decoration: none; }
.cc-case s i { position: absolute; left: -3px; right: -3px; top: 50%; height: 1.5px; margin-top: -1px; background: currentColor; transform-origin: 0 50%; transition: scale .42s var(--ease-out); transition-delay: calc(.3s + var(--i, 0) * .12s); }
.cc-case dd b, .cc-case dd .i { transition: opacity .4s var(--ease-out), translate .5s var(--ease-out); transition-delay: calc(.62s + var(--i, 0) * .12s); }
.js .cc-case:not(.is-in) s i { scale: 0 1; }
.js .cc-case:not(.is-in) dd b { opacity: 0; translate: -10px 0; }
.js .cc-case:not(.is-in) dd .i { opacity: 0; translate: -6px 0; }
.cc-case dd .i { width: 18px; height: 18px; color: var(--signal-hi); }
.cc-case dd b { font: 700 clamp(1.8rem, 3vw, 2.4rem)/1 var(--sans); letter-spacing: -.04em; }
.cc-case .btn { justify-self: start; margin-top: 4px; }

/* ── Reduced motion ────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .cc-al, .cc-row, .cc-case s i, .cc-case dd b, .cc-case dd .i, .xf-s, .xf-n, .xf-fill, .xf-dot, .xf-state, .cc-code .ln, .ch-line, .ch-pts circle, .ch-lbl { transition: none !important; }
  .js .xf:not(.is-in) .xf-n { background: var(--signal); border-color: var(--signal); color: #fff; }
  .js .xf:not(.is-in) .xf-s { opacity: 1; }
  .js .cc-hook:not(.is-in) .cc-code .ln { opacity: 1; }
  .js .cc-chart:not(.is-in) .ch-line { stroke-dashoffset: 0; }
  .js .cc-chart:not(.is-in) .ch-pts circle { opacity: 1; scale: 1; }
  .js .cc-chart:not(.is-in) .ch-lbl { opacity: 1; }
  .js .cc-case:not(.is-in) s i { scale: 1 1; }
  .js .cc-case:not(.is-in) dd b, .js .cc-case:not(.is-in) dd .i { opacity: 1; translate: none; }
  .cc-live i::after { display: none; }
}
