/* TRACE - time and activity tracker. Indigo accent, scoped to #trace-root. */
#trace-root { --tr: #6366f1; --tr-soft: rgba(99,102,241,.12); }

.tr-off {
  display: flex; align-items: center; gap: 9px;
  padding: 11px 14px; margin-bottom: 14px; border-radius: var(--radius-sm);
  font-size: 13px; color: var(--amber); background: var(--amber-soft);
  border: 1px solid color-mix(in srgb, var(--amber) 28%, transparent);
}
.tr-off svg { flex: none }

.tr-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }

/* live */
.tr-live-row {
  display: flex; align-items: center; gap: 10px; padding: 11px 4px;
  border-bottom: 1px solid var(--border); font-size: 13.5px;
}
.tr-live-row:last-child { border-bottom: none }
.tr-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); flex: none;
          box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 22%, transparent); }
.tr-live-proj { color: var(--text-dim); font-size: 12.5px }
.tr-live-since { color: var(--text-faint); font-size: 12px }

/* team board */
.tr-team { display: flex; flex-direction: column; gap: 6px; }
.tr-row {
  display: grid; grid-template-columns: 30px 28px minmax(120px,1.4fr) 110px 1fr;
  align-items: center; gap: 12px; padding: 11px 12px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.tr-row:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--tr) 34%, var(--border));
  box-shadow: 0 12px 26px -20px color-mix(in srgb, var(--tr) 60%, transparent); }
.tr-rank { width: 24px; height: 24px; display: grid; place-items: center; justify-self: center;
  font-size: 12px; font-weight: 700; color: var(--text-faint); background: var(--surface-2); border-radius: 7px; }
.tr-name { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.tr-hours { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums }
.tr-hours span { display: block; font-size: 10px; font-weight: 500; color: var(--text-faint) }
.tr-actwrap { display: flex; align-items: center; gap: 10px }
.tr-actbar { flex: 1; height: 7px; background: var(--surface-3); border-radius: 4px; overflow: hidden }
.tr-actbar span { display: block; height: 100%; border-radius: 4px }
.tr-actpct { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap }
.tr-actpct small { font-weight: 500; color: var(--text-faint); margin-left: 3px; font-size: 10px }
@media (max-width: 720px) { .tr-row { grid-template-columns: 24px 24px 1fr 70px } .tr-actwrap { display: none } }

/* person detail */
.tr-person-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px }
.tr-person-head h3 { font-size: 17px; font-weight: 650 }
.tr-person-head span { font-size: 12px; color: var(--text-faint) }
.tr-cols { display: flex; gap: 16px; align-items: flex-start }
@media (max-width: 820px) { .tr-cols { flex-direction: column } .tr-cols > div:last-child { width: 100% !important } }

.tr-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); gap: 10px }
.tr-shot { position: relative; display: block; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--border); background: var(--surface-2); aspect-ratio: 16/10; }
.tr-shot img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s }
.tr-shot:hover img { transform: scale(1.04) }
.tr-shot-meta { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between;
  padding: 4px 7px; font-size: 10.5px; font-weight: 600; color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,.72)); }

.tr-app { display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 13px }
.tr-app:last-child { border-bottom: none }
.tr-app span { color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.tr-app b { font-variant-numeric: tabular-nums }

/* devices + codes */
.tr-codebox { text-align: center; padding: 14px; border-radius: 10px; background: var(--tr-soft);
  border: 1px solid color-mix(in srgb, var(--tr) 24%, transparent); }
.tr-codebox span { display: block; font-size: 12px; color: var(--text-dim) }
.tr-codebox b { display: block; font-size: 30px; font-weight: 750; letter-spacing: .18em; margin: 6px 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--tr); }
.tr-codebox small { color: var(--text-faint); font-size: 11px }

/* settings */
.tr-set { display: flex; flex-direction: column; gap: 4px }
.tr-toggle { display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px 0; border-bottom: 1px solid var(--border) }
.tr-toggle span { display: flex; flex-direction: column }
.tr-toggle small { font-size: 11.5px; color: var(--text-faint); font-weight: 400; margin-top: 2px }
.tr-toggle input { width: 20px; height: 20px }
.tr-field { display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 11px 0; border-bottom: 1px solid var(--border); font-size: 13.5px }
.tr-field:last-of-type { border-bottom: none }
.tr-field > div { color: var(--text-dim); font-size: 13px }
