/* =============================================================================================
   AGENTIC AI - RESULT CARD (src/components/agmap-result.js)
   Shown over the map when the agent's answer is revealed: a Grid Agent AI pill with a glowing orb and a voice
   wave, the question bubble, the glass result card, cluster markers with labels and leader lines on the map,
   follow-up chips and an ask bar.
   It wears the same finish as the assistant chat box (app.css "Grid Agent Assistant - glossy finish"): the theme's
   glass, a top gloss, a light that travels round the card's edge, the user bubble and the glossy send button.
   Every colour is a theme token (--accent, --accent-2, --accent-strong, --on-accent, --bad, --text, --glass-*),
   so all six themes, light included, get it in their own palette. The map graphics (boundaries, transformer dots)
   take the same tokens in JS. Rounded corners are kept on purpose (they override "18. sharp geometry" here only).
   ============================================================================================= */
.ar-root {
  --ar-shine: rgba(255, 255, 255, .16); --ar-shine-soft: rgba(255, 255, 255, .06);
  --ar-glass:
    linear-gradient(180deg, var(--glass-hi), transparent 120px),
    linear-gradient(125deg, rgba(255, 255, 255, .13) 0%, rgba(255, 255, 255, .04) 20%, transparent 38%),
    radial-gradient(130% 70% at 100% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 62%),
    radial-gradient(120% 60% at 0% 100%, color-mix(in srgb, var(--accent-2) 10%, transparent), transparent 60%),
    var(--glass-strong);
  --ar-edge: color-mix(in srgb, var(--accent) 22%, var(--glass-edge));
  --ar-ease: var(--ease-out, cubic-bezier(.2, .8, .2, 1));
  position: absolute; inset: 0; z-index: 8; pointer-events: none; color: var(--text); font-family: inherit;
}
:where(html[data-theme="light"]) .ar-root { --ar-shine: rgba(255, 255, 255, .85); --ar-shine-soft: rgba(255, 255, 255, .45); }
.ar-root[hidden] { display: none; }
.ar-root *, .ar-root *::before, .ar-root *::after { box-sizing: border-box; }

/* shared glass (the chat box's) */
.ar-pill, .ar-card, .ar-bar, .ar-trail, .ar-root button.ar-tag, .ar-root button.ar-chip {
  background: var(--ar-glass); color: var(--text);
  -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--ar-edge);
  box-shadow: var(--shadow-lg), inset 0 1px 0 var(--ar-shine), inset 0 0 0 1px rgba(255, 255, 255, .03);
}
/* buttons: flat glass (no top shine, no bevel) */
.ar-root button.ar-tag, .ar-root button.ar-chip { background: color-mix(in srgb, var(--surface-solid) 55%, transparent); box-shadow: none; }

/* ---- the stack on the right -------------------------------------------------------------------------- */
.ar-stack { position: absolute; top: 16px; right: 16px; width: min(372px, calc(100% - 32px)); display: grid; gap: 10px; justify-items: end; pointer-events: none; }
.ar-stack > * { pointer-events: auto; }
.ar-in { opacity: 0; transform: translateX(26px) scale(.98); filter: blur(6px); }
.ar-root.is-on .ar-in { animation: ar-in .7s var(--ar-ease) var(--d, 0s) forwards; }
@keyframes ar-in { to { opacity: 1; transform: none; filter: none; } }
.ar-root.is-leaving .ar-stack, .ar-root.is-leaving .ar-dock, .ar-root.is-leaving .ar-marks, .ar-root.is-leaving .ar-lines { opacity: 0; transition: opacity .3s ease; }

/* pill: orb + name + wave */
.ar-pill { display: flex; align-items: center; gap: 12px; padding: 8px 18px 8px 9px; border-radius: 999px !important; width: max-content; max-width: 100%;
  background: linear-gradient(180deg, var(--ar-shine) 0, var(--ar-shine-soft) 46%, transparent 47%),
    linear-gradient(100deg, color-mix(in srgb, var(--accent) 20%, transparent), color-mix(in srgb, var(--accent-2) 10%, transparent) 60%, transparent), var(--glass-strong); }
.ar-orb { position: relative; flex: none; width: 40px; height: 40px; border-radius: 50% !important;
  background: radial-gradient(circle at 34% 28%, #fff 0 7%, color-mix(in srgb, var(--accent-2) 70%, #fff) 20%, var(--accent) 52%, var(--accent-strong) 80%, color-mix(in srgb, var(--accent-strong) 60%, #000));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 50%, transparent), 0 0 18px 2px color-mix(in srgb, var(--accent) 55%, transparent), inset 0 -4px 8px rgba(0, 0, 0, .35);
  animation: ar-breathe 3.2s ease-in-out infinite; }
.ar-orb::before { content: ""; position: absolute; inset: 0; border-radius: 50% !important;
  background: conic-gradient(from 0deg, transparent 0 60%, color-mix(in srgb, var(--accent-2) 70%, #fff) 72%, transparent 84%); mix-blend-mode: soft-light; animation: ar-spin 4s linear infinite; }
.ar-orb::after { content: ""; position: absolute; inset: -6px; border-radius: 50% !important; border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent); animation: ar-ripple 2.6s ease-out infinite; }
.ar-orb i { position: absolute; left: 22%; top: 14%; width: 30%; height: 20%; border-radius: 50% !important; background: rgba(255, 255, 255, .75); filter: blur(2px); transform: rotate(-25deg); }
@keyframes ar-breathe { 50% { box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 60%, transparent), 0 0 28px 6px color-mix(in srgb, var(--accent) 70%, transparent), inset 0 -4px 8px rgba(0, 0, 0, .35); transform: scale(1.04); } }
@keyframes ar-spin { to { transform: rotate(360deg); } }
@keyframes ar-ripple { from { transform: scale(.9); opacity: .9; } to { transform: scale(1.35); opacity: 0; } }
.ar-pill-text { display: grid; line-height: 1.2; min-width: 0; }
.ar-pill-text b { font-size: 15px; font-weight: 700; letter-spacing: .1px; }
.ar-pill-text small { font-size: 11.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ar-wave { display: flex; align-items: center; gap: 3px; height: 22px; margin-left: 6px; }
.ar-wave i { width: 3px; height: 100%; border-radius: 3px !important; background: linear-gradient(180deg, var(--accent-2), var(--accent)); transform-origin: center;
  animation: ar-wave 1.1s ease-in-out calc(var(--w) * -.18s) infinite; }
.ar-wave i:nth-child(3) { animation-duration: .9s; } .ar-wave i:nth-child(2), .ar-wave i:nth-child(4) { animation-duration: 1.25s; }
@keyframes ar-wave { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }

/* the question: the chat's own user bubble */
.ar-q { justify-self: stretch; max-width: 100%; padding: 13px 18px; border-radius: 16px !important; font-size: 14px; font-weight: 600; line-height: 1.45;
  color: var(--on-accent); border: 1px solid color-mix(in srgb, var(--accent) 70%, #fff 10%);
  background: linear-gradient(180deg, rgba(255, 255, 255, .32) 0, rgba(255, 255, 255, .10) 48%, transparent 50%), linear-gradient(160deg, var(--accent), var(--accent-strong));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 10px 26px -12px color-mix(in srgb, var(--accent) 70%, transparent); }

/* the result card: the chat box's glass, with the same light travelling round its edge */
@property --ar-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.ar-card { position: relative; justify-self: stretch; padding: 18px 20px; border-radius: 20px !important; isolation: isolate; }
.ar-card::before, .ar-card::after { content: ""; position: absolute; inset: -1px; border-radius: 21px !important; pointer-events: none;
  background: conic-gradient(from var(--ar-angle), transparent 0 52%, color-mix(in srgb, var(--accent) 80%, transparent) 70%, var(--accent-2) 82%, #fff 86%, transparent 90%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: ar-border 6s linear infinite; }
.ar-card::before { padding: 1.5px; z-index: 2; }
.ar-card::after { z-index: -1; inset: -3px; padding: 6px; filter: blur(14px); opacity: .5; }
@keyframes ar-border { to { --ar-angle: 360deg; } }
.ar-sheen { position: absolute; inset: 0; border-radius: 20px !important; overflow: hidden; pointer-events: none; z-index: 1; }
.ar-sheen::before { content: ""; position: absolute; inset: 0; transform: translateX(-120%);
  background: linear-gradient(110deg, transparent 30%, color-mix(in srgb, var(--accent-2) 16%, transparent) 46%, transparent 62%); }
.ar-root.is-on .ar-sheen::before { animation: ar-sheen 1.6s var(--ar-ease) .7s; }
@keyframes ar-sheen { to { transform: translateX(120%); } }
.ar-card > :not(.ar-sheen) { position: relative; z-index: 3; }
.ar-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ar-eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: 1.1px; color: var(--text-3); }
.ar-root button.ar-x { flex: none; width: 26px; height: 26px; min-height: 0; padding: 4px; border-radius: 50% !important; margin: -4px -6px -4px 0;
  background: transparent; border: 0; color: var(--text-3); box-shadow: none; }
.ar-root button.ar-x:hover { background: var(--accent-soft); color: var(--accent); border: 0; }
.ar-headline { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin: 10px 0 8px; }
.ar-big { font-size: 46px; line-height: 1; font-weight: 300; letter-spacing: -1px; font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, var(--text), color-mix(in srgb, var(--accent) 55%, var(--text))); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ar-of { font-size: 16px; color: var(--text-2); }
.ar-summary { margin: 0 0 14px; font-size: 13.5px; line-height: 1.5; color: var(--text-2); }
.ar-risk { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; margin-bottom: 14px; border-radius: 12px !important;
  background: linear-gradient(180deg, var(--ar-shine-soft), transparent 70%), color-mix(in srgb, var(--surface-sunken) 70%, transparent);
  border: 1px solid var(--ar-edge); box-shadow: inset 0 1px 0 var(--ar-shine-soft); }
.ar-risk span { font-size: 13px; font-weight: 600; color: var(--text-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ar-risk b { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ar-risk.is-risk { background: linear-gradient(180deg, var(--ar-shine-soft), transparent 60%), color-mix(in srgb, var(--bad) 22%, transparent);
  border-color: color-mix(in srgb, var(--bad) 50%, transparent); animation: ar-glow 2.8s ease-in-out 1.4s infinite; }
.ar-risk.is-risk span { color: var(--text); }
.ar-risk.is-risk b { color: color-mix(in srgb, var(--bad) 35%, var(--text)); }
@keyframes ar-glow { 50% { box-shadow: 0 0 22px -4px color-mix(in srgb, var(--bad) 70%, transparent), inset 0 0 0 1px color-mix(in srgb, var(--bad) 40%, transparent); } }
.ar-acts { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 10px; }
.ar-root button.ar-act { min-height: 50px; padding: 8px 10px; border-radius: 14px !important; font-size: 13.5px; font-weight: 600; line-height: 1.25; color: var(--text);
  background: color-mix(in srgb, var(--surface-solid) 40%, transparent);   /* flat glass */
  border: 1px solid color-mix(in srgb, var(--text) 14%, transparent); box-shadow: none;
  opacity: 0; transform: translateY(8px); transition: background .2s, border-color .2s, color .2s; }
.ar-root.is-on button.ar-act { animation: ar-up .5s var(--ar-ease) calc(.75s + var(--i) * .08s) forwards; }
.ar-root button.ar-act:hover { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 70%, transparent); color: var(--accent); }
@keyframes ar-up { to { opacity: 1; transform: none; } }

/* ---- the clusters on the map ----------------------------------------------------------------------- */
.ar-marks { position: absolute; inset: 0; pointer-events: none; }
.ar-root button.ar-ring { position: absolute; transform: translate(-50%, -50%) scale(.4); opacity: 0; min-height: 0; padding: 0; pointer-events: auto; cursor: pointer;
  border-radius: 50% !important; border: 1.5px dashed color-mix(in srgb, var(--accent) 80%, #fff 20%); box-shadow: none;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 34%, transparent), color-mix(in srgb, var(--accent) 14%, transparent) 60%, color-mix(in srgb, var(--accent) 4%, transparent)); }
.ar-root.is-on button.ar-ring { animation: ar-pop .8s var(--ar-ease) calc(.35s + var(--i) * .15s) forwards; }
.ar-root button.ar-ring:hover { background: radial-gradient(circle, color-mix(in srgb, var(--accent) 45%, transparent), color-mix(in srgb, var(--accent) 18%, transparent) 60%, transparent); border-color: var(--accent-2); }
.ar-root button.ar-ring[hidden], .ar-root button.ar-tag[hidden] { display: none; }
@keyframes ar-pop { to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
.ar-ring .ar-ping { position: absolute; inset: -2px; border-radius: 50% !important; border: 2px solid color-mix(in srgb, var(--accent-2) 60%, transparent); animation: ar-ping 2.4s ease-out calc(1.1s + var(--i) * .3s) infinite; opacity: 0; }
@keyframes ar-ping { 0% { transform: scale(.85); opacity: .9; } 100% { transform: scale(1.3); opacity: 0; } }
.ar-ring .ar-core { position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50% !important;
  background: #fff; box-shadow: 0 0 0 4px var(--bad), 0 0 0 7px rgba(255, 255, 255, .85), 0 0 14px 6px color-mix(in srgb, var(--bad) 60%, transparent); }
/* a cluster outlined by its real admin boundary (drawn on the map itself): only the pulsing marker shows here */
.ar-root button.ar-ring.is-poly, .ar-root button.ar-ring.is-poly:hover { border: 0; background: none; }
.ar-ring.is-poly .ar-ping { inset: 2px; }
.ar-root button.ar-tag { position: absolute; display: inline-flex; align-items: center; gap: 8px; min-height: 0; padding: 6px 13px; pointer-events: auto; white-space: nowrap;
  border-radius: 10px !important; font-size: 13px; font-weight: 600; opacity: 0; transform: translateY(6px); }
.ar-root button.ar-tag b { color: var(--accent); font-weight: 700; }
.ar-root.is-on button.ar-tag { animation: ar-up .55s var(--ar-ease) calc(.8s + var(--i) * .15s) forwards; }
.ar-root button.ar-tag:hover, .ar-root button.ar-tag.is-open { border-color: var(--accent); color: var(--text); }

.ar-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.ar-line { fill: none; stroke: color-mix(in srgb, var(--accent) 85%, #fff 15%); stroke-width: 1.6; stroke-dasharray: 5 6; stroke-linecap: round; opacity: 0;
  filter: drop-shadow(0 0 3px color-mix(in srgb, var(--accent) 60%, transparent)); }
.ar-root.is-on .ar-line { animation: ar-fade .6s ease calc(.9s + var(--i) * .15s) forwards, ar-march 1.2s linear infinite; }
@keyframes ar-fade { to { opacity: 1; } }
@keyframes ar-march { to { stroke-dashoffset: -22; } }

/* ---- chips and the ask bar (the chat's composer) ----------------------------------------------------- */
.ar-dock { position: absolute; left: 50%; bottom: 40px; transform: translateX(-50%); width: min(640px, calc(100% - 32px)); display: grid; gap: 12px; justify-items: center; pointer-events: none; }
.ar-dock > * { pointer-events: auto; }
.ar-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.ar-chips:empty { display: none; }
.ar-root button.ar-chip { min-height: 0; padding: 7px 15px; border-radius: 999px !important; font-size: 13px; font-weight: 600; opacity: 0; transform: translateY(10px); }
.ar-root.is-on button.ar-chip { animation: ar-up .5s var(--ar-ease) calc(1s + var(--i) * .09s) forwards; }
.ar-root button.ar-chip:hover { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--glass-strong)); }
.ar-bar { width: 100%; display: flex; align-items: center; gap: 10px; padding: 7px 7px 7px 18px; border-radius: 999px !important; opacity: 0; transform: translateY(16px);
  background: linear-gradient(180deg, var(--ar-shine-soft), transparent 50%), var(--glass-strong); }
.ar-root.is-on .ar-bar { animation: ar-up .6s var(--ar-ease) .55s forwards; }
.ar-bar:focus-within { border-color: var(--accent); box-shadow: inset 0 1px 0 var(--ar-shine), 0 0 0 3px var(--accent-soft), 0 0 22px color-mix(in srgb, var(--accent) 28%, transparent); }
.ar-ico { display: inline-flex; width: 18px; height: 18px; flex: none; }
.ar-ico svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ar-bar-spark { color: var(--accent); }
.ar-bar-spark svg { fill: currentColor; stroke: none; }
.ar-root .ar-input { flex: 1; min-width: 0; height: 36px; padding: 0; border: 0; outline: 0; background: transparent; box-shadow: none; color: var(--text); font: inherit; font-size: 14.5px; }
.ar-root .ar-input::placeholder { color: var(--text-3); }
.ar-kbd { flex: none; padding: 3px 8px; border-radius: 7px !important; font-family: inherit; font-size: 11.5px; font-weight: 600; line-height: 1.3; color: var(--text-2);
  background: color-mix(in srgb, var(--surface-sunken) 70%, transparent); border: 1px solid var(--border-strong); }
.ar-root button.ar-round { flex: none; width: 44px; height: 44px; min-height: 0; padding: 12px; display: inline-grid; place-items: center; border-radius: 50% !important; color: var(--text);
  background: color-mix(in srgb, var(--surface-solid) 40%, transparent);
  border: 1px solid color-mix(in srgb, var(--text) 14%, transparent); box-shadow: none; }
.ar-root button.ar-round .ar-ico { width: 19px; height: 19px; }
.ar-root button.ar-send { color: var(--on-accent); border: 1px solid color-mix(in srgb, var(--accent) 92%, #fff 8%);
  background: color-mix(in srgb, var(--accent) 84%, transparent); box-shadow: none; }
.ar-root button.ar-send:hover { filter: none; color: var(--on-accent); background: color-mix(in srgb, var(--accent) 96%, transparent); box-shadow: none; }
.ar-root button.ar-mic:hover { border-color: var(--accent); color: var(--accent); }
.ar-root button.ar-mic.is-listening { color: #fff; background: color-mix(in srgb, var(--bad) 70%, transparent); border-color: var(--bad); animation: ar-listen 1.2s ease-out infinite; }
@keyframes ar-listen { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--bad) 60%, transparent); } 100% { box-shadow: 0 0 0 12px transparent; } }
.ar-root button:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }

/* narrow screens: the card goes full width at the top, no leader lines */
@media (max-width: 760px) {
  .ar-stack { top: 10px; right: 10px; width: calc(100% - 20px); }
  .ar-pill { display: none; }
  .ar-big { font-size: 36px; }
  .ar-dock { bottom: 34px; width: calc(100% - 20px); }
  .ar-kbd { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ar-root *, .ar-root *::before, .ar-root *::after { animation: none !important; transition: none !important; }
  .ar-in, .ar-root button.ar-act, .ar-root button.ar-chip, .ar-bar, .ar-line, .ar-root button.ar-tag { opacity: 1; transform: none; filter: none; }
  .ar-root button.ar-ring { opacity: 1; transform: translate(-50%, -50%); }
}

/* wide screens: the top bar and the layers panel float over the map (app.css "FLOATING MAP LAYOUT"):
   the card starts under the bar, and the chips and ask bar centre in the part of the map the panel leaves visible */
@media (min-width: 1001px) {
  .ag .ar-stack { top: var(--ag-top, 16px); }
  .ag:not(.ag-no-left) .ar-dock { left: calc(50% + 170px); width: min(640px, calc(100% - 380px)); }
}
@media (min-width: 1001px) and (max-width: 1280px) {
  .ag:not(.ag-no-left) .ar-dock { left: calc(50% + 150px); width: min(640px, calc(100% - 340px)); }
}

/* ---- the theft trail panel (opened from the map bubble): Region > Zone > Circle > Division > Feeder > DTC > Consumers ---- */
.ar-trail { position: absolute; top: 16px; right: calc(16px + min(372px, 100% - 32px) + 12px); width: min(340px, calc(100% - 32px));
  max-height: calc(100% - 180px); display: flex; flex-direction: column; padding: 14px 14px 10px 16px; border-radius: 18px !important; pointer-events: auto;
  animation: ar-in .35s var(--ar-ease) both; }
.ar-trail[hidden] { display: none; }
.ar-trail-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.ar-tl { list-style: none; margin: 0; padding: 0 4px 0 0; overflow-y: auto; scrollbar-width: thin; }
.ar-tl-row { position: relative; padding: 0 0 8px 22px; }
/* the timeline: a dot in the level's colour, joined to the next step by a line */
.ar-tl-row::before { content: ""; position: absolute; left: 6px; top: 16px; bottom: -2px; width: 2px; border-radius: 2px !important;
  background: linear-gradient(180deg, var(--c), color-mix(in srgb, var(--c) 25%, transparent)); opacity: .7; }
.ar-tl-row.is-last::before { display: none; }
.ar-tl-dot { position: absolute; left: 1px; top: 8px; width: 12px; height: 12px; border-radius: 50% !important; background: var(--c);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 25%, transparent); }
.ar-root button.ar-tl-step { display: grid; gap: 2px; width: 100%; min-height: 0; padding: 6px 10px; text-align: left; font: inherit; color: var(--text); cursor: pointer;
  border-radius: 10px !important; border: 1px solid transparent; background: transparent; box-shadow: none; transition: background .15s, border-color .15s; }
.ar-root button.ar-tl-step:hover:not(:disabled) { background: color-mix(in srgb, var(--c) 12%, transparent); border-color: color-mix(in srgb, var(--c) 45%, transparent); }
.ar-root button.ar-tl-step:disabled { cursor: default; opacity: 1; }
.ar-tl-kind { font-size: 10.5px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: color-mix(in srgb, var(--c) 75%, var(--text)); }
.ar-tl-name { font-size: 14px; font-weight: 650; line-height: 1.3; overflow-wrap: anywhere; }
.ar-tl-facts { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 12px; line-height: 1.4; color: var(--text-2); font-variant-numeric: tabular-nums; }
.ar-tl-facts span:not(:last-child)::after { content: "·"; margin-left: 10px; opacity: .6; }
.ar-tl-note { font-size: 11.5px; color: var(--text-3); font-style: italic; }
.ar-tl-items { list-style: none; margin: 4px 0 0; padding: 0 0 0 10px; display: grid; gap: 2px; }
.ar-root button.ar-tl-item { display: grid; gap: 1px; width: 100%; min-height: 0; padding: 5px 8px; text-align: left; font: inherit; color: var(--text); cursor: pointer;
  border-radius: 8px !important; border: 0; background: color-mix(in srgb, var(--surface-sunken) 55%, transparent); box-shadow: none; }
.ar-root button.ar-tl-item:hover { background: color-mix(in srgb, var(--c) 14%, transparent); }
.ar-tl-item b { font-size: 12.5px; font-weight: 650; font-variant-numeric: tabular-nums; }
.ar-tl-item span { font-size: 11.5px; color: var(--text-2); line-height: 1.35; }
.ar-trail-foot { margin: 6px 0 0; font-size: 11.5px; color: var(--text-3); }
@media (min-width: 1001px) { .ag .ar-trail { top: var(--ag-top, 16px); max-height: calc(100% - var(--ag-top, 16px) - 170px); } }
/* narrow screens: the panel sits over the top of the map, full width */
@media (max-width: 760px) { .ar-trail { top: 10px; right: 10px; left: 10px; width: auto; max-height: 55%; z-index: 2; } }
/* the app's global button glass (backdrop blur) would make each row a dark box: the rows sit flat on the panel's glass */
.ar-root button.ar-tl-step, .ar-root button.ar-tl-item { -webkit-backdrop-filter: none; backdrop-filter: none; }

/* the theft trail breakdown docks in the right-hand column in place of the summary card (agmap-result.js setTrailOpen),
   so it never covers the map, the highlighted outlines or the DTC labels */
.ar-stack > .ar-trail { position: relative; top: auto; right: auto; left: auto; width: 100%; justify-self: stretch;
  max-height: calc(100vh - var(--ag-top, 16px) - 250px); animation: ar-in .35s var(--ar-ease) both; }
.ar-root .ar-card[hidden] { display: none; }
@media (max-width: 760px) { .ar-stack > .ar-trail { max-height: 50vh; } }
