/* ════════════════════════════════════════════════════════════
   LOOP PAGES · visuals for Deploy / Expand / Govern
   Rides shared/site.css tokens + shared/cpq.css page architecture.
   Adds: per-loop hue (--lp), 8 new animated visuals, cross-loop strip.
   ════════════════════════════════════════════════════════════ */

.cq { --lp: var(--accent); }
.cq[data-loop="deploy"] { --lp: #4F7A5B; }
.cq[data-loop="expand"] { --lp: #8A6E3B; }
.cq[data-loop="govern"] { --lp: #B33B1F; }
.cq-lp { color: var(--lp); }

/* loop hue drives the badge + feature index, aubergine stays the brand */
.cq[data-loop] .cq-badge { color: var(--lp); background: color-mix(in srgb, var(--lp) 12%, transparent); }
.cq[data-loop] .cq-badge .d { background: var(--lp); }
.cq[data-loop] .cq-feat-ix .n { color: var(--lp); }

/* ═══════════════ DEPLOY · V1 route dispatch map ═══════════════ */
.cq-map { position: relative; border-radius: var(--r-2); overflow: hidden; background: linear-gradient(160deg, #F0EDE3, #E7E2D4); aspect-ratio: 16 / 9; }
.cq-map-grid { position: absolute; inset: 0; background-image: linear-gradient(to right, #0E0E0C0A 1px, transparent 1px), linear-gradient(to bottom, #0E0E0C0A 1px, transparent 1px); background-size: 34px 34px; }
.cq-map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.cq-map .rt { fill: none; stroke: var(--lp); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 900; stroke-dashoffset: 900; animation: cqDraw 7s var(--ease) infinite; }
@keyframes cqDraw { 0%, 4% { stroke-dashoffset: 900; } 46%, 88% { stroke-dashoffset: 0; } 97%, 100% { stroke-dashoffset: 900; } }
.cq-map .rt-ghost { fill: none; stroke: #0E0E0C1A; stroke-width: 2.5; stroke-dasharray: 4 6; }
.cq-map .truck { fill: var(--lp); stroke: #FAFAF7; stroke-width: 2; }
.cq-map .stop { fill: #FAFAF7; stroke: var(--lp); stroke-width: 2.5; }
.cq-map .stop-hit { fill: var(--lp); opacity: 0; animation: cqStop 7s var(--ease) infinite; }
@keyframes cqStop { 0%, 10% { opacity: 0; } 20%, 88% { opacity: 1; } 97%, 100% { opacity: 0; } }
.cq-map-tag {
  position: absolute; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-1);
  padding: 8px 11px; box-shadow: 0 8px 22px -12px #0E0E0C55; min-width: 128px;
}
.cq-map-tag .h { font: 500 10px/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); }
.cq-map-tag .m { display: flex; gap: 9px; margin-top: 6px; font: 500 9px/1 var(--font-mono); letter-spacing: 0.06em; color: var(--ink-3); }
.cq-map-tag .m b { color: var(--lp); font-weight: 500; }
.cq-map-foot { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; padding: 10px 14px; background: linear-gradient(to top, #0E0E0C14, transparent); font: 500 9px/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); }

/* ═══════════════ DEPLOY · V2 crew day timeline ═══════════════ */
.cq-tl { position: relative; }
.cq-tl-hours { display: grid; grid-template-columns: 92px 1fr; gap: 14px; margin-bottom: 10px; }
.cq-tl-hours .sp { }
.cq-tl-hours .hs { display: grid; grid-template-columns: repeat(6, 1fr); font: 500 9px/1 var(--font-mono); letter-spacing: 0.08em; color: var(--ink-3); }
.cq-tl-row { display: grid; grid-template-columns: 92px 1fr; gap: 14px; align-items: center; padding: 7px 0; }
.cq-tl-row .who { font: 500 10px/1.3 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.cq-tl-track { position: relative; height: 30px; background: var(--bg-2); border-radius: var(--r-1); overflow: hidden; }
.cq-tl-job {
  position: absolute; top: 4px; bottom: 4px; border-radius: 4px;
  background: color-mix(in srgb, var(--lp) 22%, transparent); border-left: 2px solid var(--lp);
  display: flex; align-items: center; padding: 0 8px; overflow: hidden;
  font: 500 9px/1 var(--font-mono); letter-spacing: 0.06em; color: var(--ink);
  transform: scaleX(0); transform-origin: left; animation: cqJobIn 8s var(--ease) infinite;
}
@keyframes cqJobIn { 0% { transform: scaleX(0); } 14%, 88% { transform: scaleX(1); } 97%, 100% { transform: scaleX(0); } }
.cq-tl-now { position: absolute; top: 0; bottom: 22px; width: 1px; background: var(--accent); z-index: 3; animation: cqNow 8s linear infinite; }
.cq-tl-now::after { content: "NOW"; position: absolute; top: -2px; left: 4px; font: 500 8px/1 var(--font-mono); letter-spacing: 0.1em; color: var(--accent); }
@keyframes cqNow { 0% { left: 0; } 88%, 100% { left: 100%; } }
.cq-tl-legend { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--rule); display: flex; gap: 22px; flex-wrap: wrap; font: 500 10px/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.cq-tl-legend b { color: var(--ink); font-weight: 500; }

/* ═══════════════ DEPLOY · V3 estimate-vs-actual waterfall ═══════════════ */
.cq-wf { display: grid; gap: 14px; }
.cq-wf-row { display: grid; grid-template-columns: 84px 1fr 66px; gap: 12px; align-items: center; }
.cq-wf-row .k { font: 500 10px/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.cq-wf-pair { display: grid; gap: 4px; }
.cq-wf-bar { height: 11px; border-radius: 3px; background: var(--bg-2); overflow: hidden; }
.cq-wf-bar i { display: block; height: 100%; border-radius: 3px; width: 0; animation: cqGrow 7s var(--ease) infinite; }
.cq-wf-bar.est i { background: #0E0E0C26; }
.cq-wf-bar.act i { background: var(--lp); }
.cq-wf-bar.act.over i { background: var(--alert, #B33B1F); }
.cq-wf-row .v { font: 500 11px/1 var(--font-mono); text-align: right; color: var(--ink); }
.cq-wf-row .v.over { color: var(--alert, #B33B1F); }
.cq-wf-row:nth-child(1) .est i { animation-delay: .1s; --w: 70%; } .cq-wf-row:nth-child(1) .act i { animation-delay: .3s; --w: 66%; }
.cq-wf-row:nth-child(2) .est i { animation-delay: .4s; --w: 52%; } .cq-wf-row:nth-child(2) .act i { animation-delay: .6s; --w: 58%; }
.cq-wf-row:nth-child(3) .est i { animation-delay: .7s; --w: 40%; } .cq-wf-row:nth-child(3) .act i { animation-delay: .9s; --w: 37%; }
.cq-wf-row:nth-child(4) .est i { animation-delay: 1s; --w: 24%; }  .cq-wf-row:nth-child(4) .act i { animation-delay: 1.2s; --w: 23%; }
.cq-wf-key { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--rule); display: flex; justify-content: space-between; align-items: baseline; }
.cq-wf-key .k { font: 500 10px/1 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.cq-wf-key .v { font-size: 20px; font-weight: 500; letter-spacing: -0.03em; color: var(--lp); }

/* ═══════════════ DEPLOY · centerpiece · the loop cycle ═══════════════ */
.cq-cycle-svg { position: relative; width: 100%; height: auto; }
.cq-cycle-svg .orbit { fill: none; stroke: #0E0E0C1A; stroke-width: 1.5; stroke-dasharray: 5 7; }
.cq-cycle-svg .arc { fill: none; stroke: var(--lp); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 754; stroke-dashoffset: 754; animation: cqArc 9s var(--ease) infinite; }
@keyframes cqArc { 0%, 3% { stroke-dashoffset: 754; } 60%, 90% { stroke-dashoffset: 0; } 98%, 100% { stroke-dashoffset: 754; } }
.cq-cycle-svg .runner { fill: var(--lp); }
.cq-cycle-svg .n-box { fill: var(--surface); stroke: var(--rule-strong); }
.cq-cycle-svg .n-t { font-family: var(--font-mono); font-size: 10px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; fill: var(--ink); }
.cq-cycle-svg .n-s { font-family: var(--font-mono); font-size: 9px; fill: var(--ink-3); }
.cq-cycle-svg .n-i { font-family: var(--font-mono); font-size: 9px; font-weight: 500; letter-spacing: 0.1em; fill: var(--lp); }
.cq-cycle-svg .hub { fill: var(--surface); stroke: var(--rule-strong); }
.cq-cycle-svg .hub-t { font-family: var(--font); font-size: 15px; font-weight: 500; fill: var(--ink); letter-spacing: -0.02em; }
.cq-cycle-svg .hub-s { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 0.14em; fill: var(--ink-3); }

/* ═══════════════ EXPAND · V1 unbuilt-address inference ═══════════════ */
.cq-infer svg .built { fill: var(--accent); }
.cq-infer svg .link { stroke: var(--lp); stroke-width: 1.5; stroke-dasharray: 3 4; opacity: 0; animation: cqFade 8s var(--ease) infinite; }
.cq-infer svg .cand { fill: none; stroke: var(--lp); stroke-width: 2; opacity: 0; transform-box: fill-box; transform-origin: center; animation: cqPop 8s var(--ease) infinite; }
@keyframes cqFade { 0%, 16% { opacity: 0; } 30%, 86% { opacity: 1; } 96%, 100% { opacity: 0; } }
@keyframes cqPop { 0%, 18% { opacity: 0; transform: scale(.4); } 34%, 86% { opacity: 1; transform: scale(1); } 96%, 100% { opacity: 0; transform: scale(.4); } }
.cq-infer-key { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--rule); display: flex; gap: 24px; flex-wrap: wrap; font: 500 10px/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.cq-infer-key i { display: inline-block; width: 9px; height: 9px; border-radius: 999px; margin-right: 7px; vertical-align: middle; }

/* ═══════════════ EXPAND · V2 ranked lead queue ═══════════════ */
.cq-queue { display: grid; }
.cq-q-row { display: grid; grid-template-columns: 22px 1fr 120px 84px; gap: 14px; align-items: center; padding: 13px 0; border-top: 1px solid var(--rule); animation: cqRowIn 9s var(--ease) infinite; }
.cq-q-row:first-child { border-top: none; }
.cq-q-row:nth-child(1) { animation-delay: .1s; } .cq-q-row:nth-child(2) { animation-delay: .45s; }
.cq-q-row:nth-child(3) { animation-delay: .8s; } .cq-q-row:nth-child(4) { animation-delay: 1.15s; }
.cq-q-row .rk { font: 500 11px/1 var(--font-mono); color: var(--ink-3); }
.cq-q-row .nm { font-size: 13px; color: var(--ink); font-weight: 500; letter-spacing: -0.01em; }
.cq-q-row .nm span { display: block; font: 500 9px/1.4 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); font-weight: 400; margin-top: 3px; }
.cq-q-bars { display: grid; gap: 3px; }
.cq-q-bar { display: grid; grid-template-columns: 26px 1fr; gap: 7px; align-items: center; font: 500 8px/1 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.cq-q-bar .t { height: 7px; background: var(--bg-2); border-radius: 999px; overflow: hidden; }
.cq-q-bar .t i { display: block; height: 100%; border-radius: 999px; }
.cq-q-bar.now .t i { background: var(--accent); }
.cq-q-bar.exp .t i { background: var(--lp); }
.cq-q-row .act { font: 500 9px/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; text-align: right; padding: 5px 8px; border-radius: var(--r-pill); }
.cq-q-row .act.chase { background: var(--accent); color: var(--accent-ink); }
.cq-q-row .act.fill { background: var(--accent-soft); color: var(--accent); }
.cq-q-row .act.build { background: color-mix(in srgb, var(--lp) 18%, transparent); color: var(--lp); }
.cq-q-row .act.skip { background: var(--bg-2); color: var(--ink-3); }

/* ═══════════════ EXPAND · V3 renewal / expansion windows ═══════════════ */
.cq-win { display: grid; gap: 10px; position: relative; }
.cq-win-row { display: grid; grid-template-columns: 108px 1fr; gap: 14px; align-items: center; }
.cq-win-row .who { font: 500 10px/1.3 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.cq-win-track { position: relative; height: 26px; background: var(--bg-2); border-radius: var(--r-1); }
.cq-win-block { position: absolute; top: 3px; bottom: 3px; border-radius: 4px; display: flex; align-items: center; padding: 0 8px; font: 500 9px/1 var(--font-mono); letter-spacing: 0.06em; white-space: nowrap; transform: scaleX(0); transform-origin: left; animation: cqJobIn 8s var(--ease) infinite; }
.cq-win-block.renew { background: var(--accent-soft); border-left: 2px solid var(--accent); color: var(--accent); }
.cq-win-block.expand { background: color-mix(in srgb, var(--lp) 20%, transparent); border-left: 2px solid var(--lp); color: var(--lp); }
.cq-win-block.risk { background: #E8643D1F; border-left: 2px solid var(--alert, #B33B1F); color: var(--alert, #B33B1F); }
.cq-win-axis { display: grid; grid-template-columns: 108px 1fr; gap: 14px; margin-top: 6px; }
.cq-win-axis .qs { display: grid; grid-template-columns: repeat(4, 1fr); font: 500 9px/1 var(--font-mono); letter-spacing: 0.08em; color: var(--ink-3); }

/* ═══════════════ EXPAND · centerpiece · 2×2 occupancy triage ═══════════════ */
.cq-matrix-wrap { display: grid; grid-template-columns: 26px 1fr; gap: 12px; position: relative; z-index: 1; }
.cq-matrix-y { writing-mode: vertical-rl; transform: rotate(180deg); text-align: center; font: 500 10px/1 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.cq-matrix { position: relative; aspect-ratio: 3 / 2; border: 1px solid var(--rule-strong); border-radius: var(--r-2); background: var(--surface); display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; overflow: hidden; }
.cq-mq { position: relative; border-right: 1px dashed var(--rule-strong); border-bottom: 1px dashed var(--rule-strong); padding: 14px; }
.cq-mq:nth-child(2), .cq-mq:nth-child(4) { border-right: none; }
.cq-mq:nth-child(3), .cq-mq:nth-child(4) { border-bottom: none; }
.cq-mq .lb { font: 500 10px/1 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.cq-mq .ct { font-size: 15px; font-weight: 500; letter-spacing: -0.02em; margin-top: 5px; color: var(--ink); }
.cq-mq.build { background: color-mix(in srgb, var(--lp) 7%, transparent); }
.cq-mq.chase { background: var(--accent-soft); }
.cq-mq.chase .lb, .cq-mq.chase .ct { color: var(--accent); }
.cq-mq.build .lb, .cq-mq.build .ct { color: var(--lp); }
.cq-dot {
  position: absolute; width: 13px; height: 13px; border-radius: 999px; z-index: 2;
  background: var(--accent); border: 2px solid var(--surface); box-shadow: 0 2px 6px #0E0E0C33;
  opacity: 0; margin: -7px 0 0 -7px; animation: cqDotIn 9s var(--ease) infinite;
}
.cq-dot.lp { background: var(--lp); }
.cq-dot.mut { background: var(--ink-3); }
.cq-dot.big { width: 19px; height: 19px; }
@keyframes cqDotIn { 0% { opacity: 0; transform: scale(.3); } 12%, 88% { opacity: 1; transform: scale(1); } 97%, 100% { opacity: 0; transform: scale(.3); } }
.cq-matrix-x { grid-column: 2; text-align: center; font: 500 10px/1 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); margin-top: 12px; }
.cq-matrix-note { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--rule-strong); display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.cq-matrix-note div { border-left: 2px solid var(--c, var(--ink-3)); padding-left: 13px; }
.cq-matrix-note .n { font: 500 10px/1 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--c, var(--ink-3)); }
.cq-matrix-note .d { font-size: 13px; color: var(--ink-2); margin-top: 7px; line-height: 1.45; }

/* ═══════════════ GOVERN · V1 MSA clause extraction ═══════════════ */
.cq-doc { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.cq-doc-page { background: var(--bg-2); border: 1px solid var(--rule); border-radius: var(--r-1); padding: 16px; display: grid; gap: 7px; align-content: start; }
.cq-doc-page .ln { height: 6px; border-radius: 3px; background: #0E0E0C14; }
.cq-doc-page .ln.sh { width: 62%; }
.cq-doc-page .ln.md { width: 84%; }
.cq-doc-page .cl { border-radius: 3px; padding: 5px 7px; margin: 3px -7px; background: transparent; animation: cqHi 9s var(--ease) infinite; }
.cq-doc-page .cl .t { font: 500 9px/1.4 var(--font-mono); letter-spacing: 0.04em; color: var(--ink-2); }
.cq-doc-page .cl:nth-of-type(1) { animation-delay: .3s; } .cq-doc-page .cl:nth-of-type(2) { animation-delay: 1.5s; } .cq-doc-page .cl:nth-of-type(3) { animation-delay: 2.7s; }
@keyframes cqHi { 0%, 4% { background: transparent; } 10%, 34% { background: color-mix(in srgb, var(--lp) 16%, transparent); } 44%, 100% { background: color-mix(in srgb, var(--lp) 6%, transparent); } }
.cq-doc-out { display: grid; gap: 8px; align-content: start; }
.cq-doc-f { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-1); padding: 10px 12px; animation: cqRowIn 9s var(--ease) infinite; }
.cq-doc-f:nth-of-type(1) { animation-delay: 1s; } .cq-doc-f:nth-of-type(2) { animation-delay: 2.2s; } .cq-doc-f:nth-of-type(3) { animation-delay: 3.4s; }
.cq-doc-f .k { font: 500 9px/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.cq-doc-f .v { font: 500 12px/1.3 var(--font-mono); color: var(--ink); margin-top: 5px; }
.cq-doc-f .v em { font-style: normal; color: var(--lp); }

/* ═══════════════ GOVERN · V2 vendor concentration ═══════════════ */
.cq-conc-bar { display: flex; height: 40px; border-radius: var(--r-1); overflow: hidden; border: 1px solid var(--rule); }
.cq-conc-seg { display: flex; align-items: center; justify-content: center; font: 500 9px/1 var(--font-mono); letter-spacing: 0.06em; color: #FAFAF7; width: 0; animation: cqGrow 7s var(--ease) infinite; overflow: hidden; white-space: nowrap; }
.cq-conc-seg:nth-child(1) { --w: 58%; background: var(--alert, #B33B1F); animation-delay: .1s; }
.cq-conc-seg:nth-child(2) { --w: 22%; background: var(--accent); animation-delay: .35s; }
.cq-conc-seg:nth-child(3) { --w: 13%; background: #6B6B66; animation-delay: .6s; }
.cq-conc-seg:nth-child(4) { --w: 7%; background: #A8A8A2; animation-delay: .85s; }
.cq-conc-warn { margin-top: 16px; display: flex; align-items: center; gap: 9px; background: #E8643D14; border: 1px solid #E8643D40; border-radius: var(--r-1); padding: 11px 13px; font: 500 10px/1.4 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--alert, #B33B1F); opacity: 0; animation: cqFade 7s var(--ease) infinite; animation-delay: .9s; }
.cq-conc-rows { margin-top: 20px; display: grid; gap: 0; }
.cq-conc-row { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; padding: 11px 0; border-top: 1px solid var(--rule); font-size: 13px; color: var(--ink-2); }
.cq-conc-row .sk { font: 500 11px/1 var(--font-mono); color: var(--ink-3); }
.cq-conc-row .st { font: 500 9px/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 8px; border-radius: var(--r-pill); }
.cq-conc-row .st.ok { background: var(--accent-soft); color: var(--accent); }
.cq-conc-row .st.low { background: #E8643D1A; color: var(--alert, #B33B1F); }

/* ═══════════════ GOVERN · V3 compliance grid ═══════════════ */
.cq-cgrid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; }
.cq-cell { aspect-ratio: 1; border-radius: var(--r-1); background: var(--bg-2); border: 1px solid var(--rule); display: grid; place-items: center; font: 500 9px/1 var(--font-mono); color: var(--ink-3); animation: cqCell 8s var(--ease) infinite; }
@keyframes cqCell { 0%, 6% { background: var(--bg-2); color: var(--ink-3); border-color: var(--rule); } 14%, 88% { background: var(--accent-soft); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 30%, transparent); } 96%, 100% { background: var(--bg-2); color: var(--ink-3); border-color: var(--rule); } }
.cq-cell.pend { animation: cqCellP 8s var(--ease) infinite; }
@keyframes cqCellP { 0%, 6% { background: var(--bg-2); color: var(--ink-3); } 14%, 88% { background: #E8643D1A; color: var(--alert, #B33B1F); border-color: #E8643D40; } 96%, 100% { background: var(--bg-2); color: var(--ink-3); } }
.cq-cgrid-key { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--rule); display: flex; gap: 22px; flex-wrap: wrap; font: 500 10px/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.cq-cgrid-key i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 7px; vertical-align: middle; }

/* ═══════════════ GOVERN · centerpiece · risk radar ═══════════════ */
.cq-radar-svg { width: 100%; height: auto; max-width: 420px; margin: 0 auto; display: block; position: relative; z-index: 1; }
.cq-radar-svg .web { fill: none; stroke: #0E0E0C1A; stroke-width: 1; }
.cq-radar-svg .spoke { stroke: #0E0E0C14; stroke-width: 1; }
.cq-radar-svg .poly { fill: color-mix(in srgb, var(--accent) 18%, transparent); stroke: var(--accent); stroke-width: 2; transform-origin: 170px 140px; animation: cqRadar 9s var(--ease) infinite; }
@keyframes cqRadar { 0%, 5% { transform: scale(.1); opacity: 0; } 34%, 58% { transform: scale(1); opacity: 1; } 66%, 88% { transform: scale(1); opacity: 0; } 96%, 100% { transform: scale(.1); opacity: 0; } }
.cq-radar-svg .poly-alert { fill: #E8643D26; stroke: var(--alert, #B33B1F); stroke-width: 2; transform-origin: 170px 140px; opacity: 0; animation: cqRadarA 9s var(--ease) infinite; }
@keyframes cqRadarA { 0%, 60% { opacity: 0; } 70%, 88% { opacity: 1; } 96%, 100% { opacity: 0; } }
.cq-radar-svg .ax { font-family: var(--font-mono); font-size: 9px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; fill: var(--ink-2); }
.cq-radar-svg .vt { font-family: var(--font-mono); font-size: 9px; font-weight: 500; letter-spacing: 0.1em; fill: var(--alert, #B33B1F); opacity: 0; animation: cqRadarA 9s var(--ease) infinite; }
.cq-radar-legend { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--rule-strong); display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.cq-radar-legend div { }
.cq-radar-legend .n { font: 500 9px/1.3 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.cq-radar-legend .v { font-size: 19px; font-weight: 500; letter-spacing: -0.02em; color: var(--ink); margin-top: 6px; }
.cq-radar-legend .v.bad { color: var(--alert, #B33B1F); }

/* ═══════════════ 4-MODULE STRIP (every loop page) ═══════════════ */
.cq-mods { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 34px; }
.cq-mod { display: grid; align-content: start; gap: 10px; text-decoration: none; color: inherit; padding: 28px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-3); transition: transform .25s var(--ease), border-color .25s var(--ease); }
.cq-mod:hover { transform: translateY(-2px); border-color: var(--lp); }
.cq-mod .hd { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.cq-mod .num { font: 500 10px/1 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--lp); }
.cq-mod .ar { font-family: var(--font-mono); font-size: 13px; color: var(--ink-3); transition: color .2s var(--ease), transform .2s var(--ease); }
.cq-mod:hover .ar { color: var(--lp); transform: translateX(3px); }
.cq-mod h3 { font-size: 19px; font-weight: 500; letter-spacing: -0.02em; margin: 0; color: var(--ink); line-height: 1.25; }
.cq-mod p { font-size: 13.5px; color: var(--ink-2); line-height: 1.5; margin: 0; }
.cq-mod .mt { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 4px; }
.cq-mod .mt span { font: 500 9px/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); background: var(--bg-2); padding: 5px 8px; border-radius: var(--r-pill); }

/* ═══════════════ CROSS-LOOP STRIP ═══════════════ */
.cq-loops { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 34px; }
.cq-loops a { display: grid; align-content: start; gap: 9px; text-decoration: none; color: inherit; padding: 24px; background: var(--surface); border: 1px solid var(--rule); border-top: 2px solid var(--c); border-radius: var(--r-3); min-height: 168px; transition: transform .25s var(--ease), border-color .25s var(--ease); }
.cq-loops a:hover { transform: translateY(-2px); border-color: var(--c); border-top-color: var(--c); }
.cq-loops a[aria-current="page"] { background: var(--bg-2); }
.cq-loops .lp-n { font: 500 10px/1 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--c); }
.cq-loops h3 { font-size: 21px; font-weight: 500; letter-spacing: -0.02em; margin: 0; color: var(--ink); }
.cq-loops .lp-q { font-size: 13px; color: var(--ink-2); line-height: 1.45; }
.cq-loops .lp-sys { margin-top: auto; font: 500 9px/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }

/* ═══════════════ ROADMAP (what's next) ═══════════════ */
.cq-next { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 34px; }
.cq-next div { padding: 24px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-3); }
.cq-next .st { font: 500 9px/1 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.cq-next h4 { font-size: 17px; font-weight: 500; letter-spacing: -0.02em; margin: 10px 0 0; color: var(--ink); }
.cq-next p { font-size: 13px; color: var(--ink-2); line-height: 1.5; margin: 8px 0 0; }

@media (prefers-reduced-motion: reduce) {
  .cq-map .rt, .cq-map .stop-hit, .cq-tl-job, .cq-tl-now, .cq-wf-bar i, .cq-cycle-svg .arc,
  .cq-infer svg .link, .cq-infer svg .cand, .cq-q-row, .cq-win-block, .cq-dot, .cq-doc-page .cl,
  .cq-doc-f, .cq-conc-seg, .cq-conc-warn, .cq-cell, .cq-radar-svg .poly, .cq-radar-svg .poly-alert,
  .cq-radar-svg .vt { animation: none !important; }
  .cq-map .rt, .cq-cycle-svg .arc { stroke-dashoffset: 0; }
  .cq-tl-job, .cq-win-block { transform: none; }
  .cq-wf-bar i, .cq-conc-seg { width: var(--w); }
  .cq-dot, .cq-q-row, .cq-doc-f, .cq-infer svg .link, .cq-infer svg .cand { opacity: 1; transform: none; }
  .cq-radar-svg .poly { transform: scale(1); opacity: 1; }
  .cq-tl-now { display: none; }
}

@media (max-width: 1000px) {
  .cq-loops, .cq-next, .cq-matrix-note, .cq-radar-legend { grid-template-columns: 1fr 1fr; }
  .cq-doc { grid-template-columns: 1fr; }
  .cq-cgrid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 620px) {
  .cq-loops, .cq-next, .cq-matrix-note, .cq-radar-legend { grid-template-columns: 1fr; }
  .cq-q-row { grid-template-columns: 20px 1fr 84px; } .cq-q-row .act { display: none; }
}
