/* The work tracker (js/tracker.js): a bar between the title bar and the page, a panel under it, and messages that stay until they are dismissed. It is part of the
   frame (not of any page), so it is always on screen and never scrolls away. It takes no space at all when nothing is running. */
#tracker { flex: none; position: relative; z-index: 28; }
.trk-bar { display: flex; align-items: center; gap: 8px; padding: 4px 12px; background: color-mix(in srgb, var(--bg-2) 86%, var(--accent)); border-bottom: 1px solid var(--line); min-height: 38px; }
.trk-bar[hidden] { display: none; }
.trk-bar.attn { background: color-mix(in srgb, var(--bg-2) 86%, var(--warn)); }
.trk-sum { position: relative; flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 6px 10px 9px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--fg, inherit); font: inherit; font-size: 13px; text-align: left; cursor: pointer; overflow: hidden; }
.trk-sum:hover, .trk-sum[aria-expanded="true"] { background: rgba(255, 255, 255, .05); border-color: var(--line-2); }
.trk-sum:focus-visible, .trk-bar .btn:focus-visible, .trk-row .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.trk-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(108, 140, 255, .55); animation: trk-pulse 1.8s ease-out infinite; }
.trk-count { flex: none; font-weight: 650; white-space: nowrap; }
.trk-main { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.trk-chev { flex: none; opacity: .7; transition: transform .15s; display: inline-flex; }
.trk-sum[aria-expanded="true"] .trk-chev { transform: rotate(180deg); }
.trk-fill { position: absolute; left: 10px; right: 10px; bottom: 3px; height: 3px; border-radius: 3px; background: rgba(120, 140, 255, .2); overflow: hidden; }
.trk-fill i { display: block; height: 100%; width: 0; border-radius: 3px; background: linear-gradient(90deg, #6d7cff, #36d1c4); transition: width .8s ease; }
.trk-sum.indet .trk-fill i { width: 35%; animation: trk-slide 1.6s ease-in-out infinite; }
.trk-open, .trk-all { flex: none; }
@keyframes trk-pulse { 70% { box-shadow: 0 0 0 7px rgba(108, 140, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(108, 140, 255, 0); } }
@keyframes trk-slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(300%); } }

/* the list of everything running, under the bar, over the page */
.trk-panel { position: absolute; left: 0; right: 0; top: 100%; max-height: min(62vh, 460px); overflow: auto; background: var(--bg-2); border-bottom: 1px solid var(--line-2); box-shadow: var(--shadow); padding: 6px 12px 10px; z-index: 29; }
.trk-panel[hidden] { display: none; }
.trk-row { padding: 10px 4px; border-bottom: 1px solid var(--line); display: grid; gap: 6px; }
.trk-rowtop { display: flex; align-items: center; gap: 8px; min-width: 0; }
.trk-ic { flex: none; display: inline-flex; color: var(--accent); }
.trk-t { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13.5px; }
.trk-chip { flex: none; font-size: 11px; padding: 1px 8px; border-radius: 999px; background: rgba(255, 255, 255, .07); color: var(--muted); white-space: nowrap; }
.trk-pct { flex: none; font-variant-numeric: tabular-nums; font-weight: 650; font-size: 13px; min-width: 3.2em; text-align: right; }
.trk-meter { height: 6px; border-radius: 6px; background: rgba(120, 140, 255, .18); overflow: hidden; }
.trk-meter i { display: block; height: 100%; width: 0; border-radius: 6px; background: linear-gradient(90deg, #6d7cff, #36d1c4); transition: width .8s ease; }
.trk-meter.indet i { width: 35%; animation: trk-slide 1.6s ease-in-out infinite; }
.trk-meter.idle { opacity: .5; }
.trk-meta { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.4; }
.trk-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.trk-acts:empty { display: none; }
.trk-foot { padding-top: 8px; display: flex; justify-content: flex-end; }

/* messages that stay: under the bar, at the right, above the page */
.trk-toasts { position: absolute; top: calc(100% + 8px); right: 12px; width: min(420px, calc(100vw - 24px)); display: flex; flex-direction: column; gap: 8px; z-index: 31; pointer-events: none; }
.trk-toast { pointer-events: auto; display: flex; align-items: flex-start; gap: 10px; background: var(--panel-3); border: 1px solid var(--line-2); border-left: 4px solid var(--ok); border-radius: 10px; padding: 10px 10px 10px 12px; box-shadow: var(--shadow); opacity: 0; transform: translateY(-6px); transition: opacity .18s, transform .18s; }
.trk-toast.in { opacity: 1; transform: none; }
.trk-toast.bad { border-left-color: var(--danger); }
.trk-toast-ic { flex: none; display: inline-flex; margin-top: 1px; color: var(--ok); } .trk-toast.bad .trk-toast-ic { color: var(--danger); }
.trk-toast-b { flex: 1 1 auto; min-width: 0; display: grid; gap: 4px; font-size: 13px; }
.trk-toast-b b { overflow-wrap: anywhere; }
.trk-toast-b p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.4; overflow-wrap: anywhere; }
.trk-toast-acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.trk-toast-x { flex: none; }
.trk-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* a progress card inside a page, pinned to the top of the page when it has scrolled out of sight */
.trk-pinmini { position: sticky; top: 0; z-index: 6; margin: 0 0 8px; padding: 6px 10px 8px; background: var(--panel-3); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: var(--shadow); display: grid; gap: 6px; }
.trk-pinmini[hidden] { display: none; }
.trk-pin-row { display: flex; align-items: center; gap: 8px; }
.trk-pin-t { flex: 1 1 auto; min-width: 0; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trk-pinmini.indet .trk-meter i { width: 35%; animation: trk-slide 1.6s ease-in-out infinite; }

@media (max-width: 700px) {
  .trk-bar { padding: 3px 8px; gap: 4px; }
  .trk-all span, .trk-open span { display: none; }
  .trk-all, .trk-open { padding-left: 8px; padding-right: 8px; }
  .trk-main { font-size: 12px; }
  .trk-toasts { left: 8px; right: 8px; width: auto; }
}
/* a phone: the title bar must fit the width (the work bar under it already does), so the least needed pieces give way */
@media (max-width: 480px) {
  .topnav { gap: 2px; overflow: hidden; }
  #top-credits .btn { display: none; }
  .acct-btn > svg { display: none; }
  #top-brand .chip-btn { max-width: 96px; }
}
@media (max-width: 420px) { .trk-chev { display: none; } .trk-count { font-size: 12.5px; } }
@media (prefers-reduced-motion: reduce) { .trk-dot, .trk-sum.indet .trk-fill i, .trk-meter.indet i, .trk-pinmini.indet .trk-meter i { animation: none; } .trk-fill i, .trk-meter i, .trk-toast { transition: none; } }

/* 24 Oct 2026: a slimmer strip - one line, no extra height */
.trk-bar { padding: 2px 10px; min-height: 30px; }
.trk-sum { padding: 3px 8px 6px; }
