/* Support triage board (includes/visuals/triage.php) */
.tr { min-width: 0; }

/* incoming queue */
.tr-in { text-align: center; }
.tr-in .vz-label { margin: 0 0 12px; }
.tr-queue { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, auto); justify-content: center; gap: 8px; }
.tr-q { justify-self: start; }
.tr-q { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: 999px; background: var(--white); border: 1px solid var(--line); min-width: 0; }
.section--paper .tr-q { background: var(--paper); border-color: transparent; }
.tr-q-n { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--forest); color: var(--white); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tr-q-t { display: inline-flex; align-items: baseline; gap: 7px; min-width: 0; text-align: left; }
.tr-q-ch { font-size: 11px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--ink-2); }
.tr-q-m { font-size: 13.5px; font-weight: 600; color: var(--forest); }
.tr-q-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.tr-to--auto .tr-q-dot { background: var(--green-2); }
.tr-to--ticket .tr-q-dot { background: #8fc7ab; }
.tr-to--human .tr-q-dot { background: var(--forest); }

/* triage step and fork */
.tr-router { position: relative; margin: 30px 0 0; text-align: center; }
.tr-router::before { content: ""; position: absolute; left: 50%; top: -30px; width: 2px; height: 30px; margin-left: -1px; background: linear-gradient(to bottom, #7d8a80 50%, transparent 0) 0 0 / 2px 8px; }
.tr-router span { display: inline-block; padding: 9px 20px; border-radius: 999px; background: var(--forest); color: var(--white); font-size: 14.5px; font-weight: 600; line-height: 1.35; }
.tr-fork { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 20px; height: 40px; }
.tr-fork::before { content: ""; position: absolute; top: 50%; left: calc((100% - 40px) / 6); right: calc((100% - 40px) / 6); height: 2px; margin-top: -1px; background: linear-gradient(to right, #7d8a80 50%, transparent 0) 0 0 / 8px 2px; }
.tr-fork span { position: relative; }
.tr-fork span::before { content: ""; position: absolute; left: 50%; top: 50%; bottom: 0; width: 2px; margin-left: -1px; background: linear-gradient(to bottom, #7d8a80 50%, transparent 0) 0 0 / 2px 8px; }
.tr-fork span:nth-child(2)::before { top: 0; }

/* lanes */
.tr-lanes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: start; }
.tr-lane { min-width: 0; border-top: 3px solid var(--green-2); padding-top: 14px; }
.tr-lane--ticket { border-top-color: #8fc7ab; }
.tr-lane--human { border-top-color: var(--forest); }
.tr-lane-head { margin-bottom: 14px; }
.tr-lane-t { display: flex; align-items: center; gap: 9px; margin: 0; font-family: var(--font-sans); font-size: 17px; font-weight: 700; line-height: 1.3; color: var(--forest); }
.tr-lane-key { flex: none; width: 12px; height: 12px; border-radius: 3px; background: var(--green-2); }
.tr-lane--ticket .tr-lane-key { background: #8fc7ab; }
.tr-lane--human .tr-lane-key { background: var(--forest); }
.tr-lane-sub { margin: 4px 0 0 21px; font-size: 13.5px; line-height: 1.4; color: var(--ink-2); }

.tr-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.tr-card { min-width: 0; padding: 14px 16px 15px; border-radius: 10px; background: var(--white); border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(12, 43, 21, .04); }
.section--paper .tr-lane--auto .tr-card, .section--paper .tr-lane--ticket .tr-card { background: var(--paper); border-color: transparent; }
.tr-card-h { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; min-width: 0; }
.tr-num { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--forest); color: var(--forest); font-size: 11.5px; font-weight: 700; }
.tr-motif { min-width: 0; font-size: 14.5px; font-weight: 700; color: var(--forest); }
.tr-ch { margin-left: auto; flex: none; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); }
.tr-msg { margin: 0; font-family: var(--font-serif); font-size: 16px; line-height: 1.4; color: var(--ink); }
.tr-out { display: flex; align-items: flex-start; gap: 7px; margin: 10px 0 0; font-size: 14px; line-height: 1.4; color: var(--ink); }
.tr-i { flex: none; width: 16px; height: 16px; margin-top: 1px; color: var(--green-text); }
.tr-src { margin: 6px 0 0 23px; font-size: 12.5px; font-weight: 600; line-height: 1.35; color: var(--green-text); }

.tr-ticket { margin: 11px 0 0; padding: 10px 12px; display: grid; gap: 6px; border-radius: 8px; background: var(--paper); border-left: 3px solid #8fc7ab; }
.section--paper .tr-ticket { background: var(--white); }
.tr-ticket div { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 8px; align-items: baseline; }
.tr-ticket dt { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-2); }
.tr-ticket dd { margin: 0; font-size: 13.5px; line-height: 1.4; color: var(--ink); }

/* urgent lane: dark cards */
.tr-lane--human .tr-card { background: var(--forest); border-color: var(--forest); color: var(--white); }
.tr-lane--human .tr-num { border-color: var(--green); color: var(--green); }
.tr-lane--human .tr-motif { color: var(--white); }
.tr-lane--human .tr-ch { color: rgba(255, 255, 255, .78); }
.tr-lane--human .tr-msg { color: var(--white); }
.tr-lane--human .tr-out { color: var(--white); font-weight: 600; }
.tr-lane--human .tr-i { color: var(--green); }
.tr-signals { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tr-signals li { padding: 3px 9px; border-radius: 999px; background: rgba(150, 248, 120, .14); border: 1px solid rgba(150, 248, 120, .35); color: var(--green); font-size: 12.5px; font-weight: 600; }

/* indicators */
.tr-kpi { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--line); }
.tr-kpi .vz-label { margin: 0; }
.tr-kpis { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }

@media (max-width: 1100px) {
  .tr-lanes { gap: 14px; }
  .tr-fork { gap: 0 14px; }
  .tr-fork::before { left: calc((100% - 28px) / 6); right: calc((100% - 28px) / 6); }
  .tr-card { padding: 13px 13px 14px; }
  .tr-ticket div { grid-template-columns: minmax(0, 1fr); gap: 1px; }
}
@media (max-width: 760px) {
  .tr-fork { display: none; }
  .tr-router { margin-bottom: 22px; }
  .tr-lanes { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .tr-ticket div { grid-template-columns: 74px minmax(0, 1fr); gap: 8px; }
  .tr-queue { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .tr-q-t { flex-direction: column; gap: 0; flex: 1; }
  .tr-q { border-radius: 12px; padding: 6px 10px 6px 6px; }
  .tr-q-m { font-size: 13px; line-height: 1.25; }
  .tr-kpi { margin-top: 26px; }
}

/* animation: the queue appears, the triage step, then each card drops into its lane in arrival order,
   while its queue chip takes the colour of that lane; the fork lines keep flowing */
.js .vz-figure .tr-q { opacity: 0; transform: translateY(8px); transition: opacity .45s ease, transform .45s ease; }
.js .vz-figure .tr-q-dot { transition: background-color .3s ease; }
.js .vz-figure .tr-router span { opacity: 0; transform: scale(.94); transition: opacity .45s ease .75s, transform .45s ease .75s; }
.js .vz-figure .tr-lane-head { opacity: 0; transition: opacity .5s ease .9s; }
.js .vz-figure .tr-card { opacity: 0; transform: translateY(-22px); transition: opacity .5s ease, transform .55s cubic-bezier(.2, .7, .2, 1); }
.js .vz-figure .tr-kpi { opacity: 0; transition: opacity .6s ease 2.6s; }
.js .vz-figure:not(.is-visible) .tr-q-dot { background: var(--line); }
.js .vz-figure.is-visible .tr-q, .js .vz-figure.is-visible .tr-card { opacity: 1; transform: none; }
.js .vz-figure.is-visible .tr-router span { opacity: 1; transform: none; }
.js .vz-figure.is-visible .tr-lane-head, .js .vz-figure.is-visible .tr-kpi { opacity: 1; }
.js .vz-figure.is-visible .tr-q--2 { transition-delay: .08s; }
.js .vz-figure.is-visible .tr-q--3 { transition-delay: .16s; }
.js .vz-figure.is-visible .tr-q--4 { transition-delay: .24s; }
.js .vz-figure.is-visible .tr-q--5 { transition-delay: .32s; }
.js .vz-figure.is-visible .tr-q--6 { transition-delay: .4s; }
.js .vz-figure.is-visible .tr-card--1, .js .vz-figure.is-visible .tr-q--1 .tr-q-dot { transition-delay: 1.1s; }
.js .vz-figure.is-visible .tr-card--2, .js .vz-figure.is-visible .tr-q--2 .tr-q-dot { transition-delay: 1.35s; }
.js .vz-figure.is-visible .tr-card--3, .js .vz-figure.is-visible .tr-q--3 .tr-q-dot { transition-delay: 1.6s; }
.js .vz-figure.is-visible .tr-card--4, .js .vz-figure.is-visible .tr-q--4 .tr-q-dot { transition-delay: 1.85s; }
.js .vz-figure.is-visible .tr-card--5, .js .vz-figure.is-visible .tr-q--5 .tr-q-dot { transition-delay: 2.1s; }
.js .vz-figure.is-visible .tr-card--6, .js .vz-figure.is-visible .tr-q--6 .tr-q-dot { transition-delay: 2.35s; }
.js .vz-figure.is-visible .tr-fork span::before { animation: tr-flow .9s linear infinite; }
@keyframes tr-flow { to { background-position: 0 8px; } }
