.tr-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.tr-chips { display: flex; gap: 5px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.tr-chips::-webkit-scrollbar { display: none; }
.tr-chips button {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted);
  padding: 6px 10px; border-radius: 999px; font-size: 0.82rem; cursor: pointer;
}
.tr-chips button span { font-size: 0.75rem; opacity: 0.8; }
.tr-chips button[aria-selected="true"] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.tr-chips button.has-due:not([aria-selected="true"]) { border-color: var(--accent); color: var(--accent); }
.tr-add {
  flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font-size: 1.2rem; line-height: 1; cursor: pointer;
}

.tr-list { display: grid; gap: 10px; }

.tr-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); border-left: 4px solid var(--line); overflow: hidden;
}
.tr-card summary {
  list-style: none; display: grid; grid-template-columns: auto 1fr auto; gap: 12px;
  align-items: start; padding: 12px 14px; cursor: pointer;
}
.tr-card summary::-webkit-details-marker { display: none; }

.tr-fit {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  font-weight: 700; font-size: 0.9rem; background: var(--line); color: var(--ink);
}
.fit-5 { background: #b8e0c2; color: #1d4a2a; }
.fit-4 { background: #d6ecc4; color: #34502a; }
.fit-3 { background: #fbefc0; color: #5e4b12; }
.fit-2, .fit-1 { background: #f5d2d2; color: #6b2a2a; }

.tr-main { display: grid; gap: 2px; min-width: 0; }
.tr-title { font-weight: 600; line-height: 1.3; }
.tr-company { color: var(--ink); font-size: 0.9rem; }
.tr-meta { color: var(--muted); font-size: 0.8rem; }
.tr-side { display: grid; gap: 4px; justify-items: end; }
.tr-pill {
  font-size: 0.72rem; padding: 3px 8px; border-radius: 999px; white-space: nowrap;
  background: var(--bg); color: var(--muted); border: 1px solid var(--line);
}
.tr-due { font-size: 0.72rem; color: var(--accent); font-weight: 600; white-space: nowrap; }

/* Status colors match the sheet */
.status-interested { border-left-color: #f2d675; }
.status-applied { border-left-color: #8fb8ef; }
.status-recruiter-screen { border-left-color: #b9a3ea; }
.status-interviewing { border-left-color: #8fcf9c; }
.status-offer { border-left-color: #3f9d58; }
.status-rejected { border-left-color: #e3a3a3; opacity: 0.75; }
.status-passed, .status-closed { opacity: 0.6; }

.tr-body { padding: 0 14px 14px; border-top: 1px solid var(--line); }
.tr-why { margin: 12px 0 6px; line-height: 1.45; }
.tr-flags { margin: 0 0 8px; font-size: 0.85rem; color: var(--muted); line-height: 1.4; }
.tr-facts { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 8px 0 12px; font-size: 0.8rem; }
.tr-facts div { display: flex; gap: 4px; }
.tr-facts dt { color: var(--muted); }
.tr-facts dd { margin: 0; }

.tr-resume {
  margin: 0 0 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg); font-size: 0.85rem;
}
.tr-resume-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tr-resume-head span { flex: 1; min-width: 0; }
.tr-resume-head a { text-decoration: none; }
.tr-resume .link {
  border: 0; background: none; padding: 0; color: var(--muted);
  font: inherit; text-decoration: underline; cursor: pointer;
}
.tr-gaps-label { margin: 8px 0 4px; color: var(--muted); font-size: 0.8rem; }
.tr-gaps { margin: 0; padding-left: 18px; display: grid; gap: 2px; }

.tr-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tr-form label { display: grid; gap: 4px; font-size: 0.8rem; color: var(--muted); }
.tr-form .wide { grid-column: 1 / -1; }
.tr-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; }
.tr-actions a { text-decoration: none; display: inline-flex; align-items: center; }

.tr-refresh {
  display: block; margin: 18px auto 0; border: 0; background: none; color: var(--muted);
  font-size: 0.85rem; text-decoration: underline; cursor: pointer;
}

@media (prefers-color-scheme: dark) {
  .fit-5, .fit-4 { background: #2c4a36; color: #c6ecd0; }
  .fit-3 { background: #4a4224; color: #f3e3a6; }
  .fit-2, .fit-1 { background: #4a2a2a; color: #f2c6c6; }
}
