.team-chat {
  --tc-ink: #172827;
  --tc-deep: #182d2a;
  --tc-muted: #526260;
  --tc-border: #d5dcd6;
  --tc-paper: #fffefa;
  --tc-wash: #eef2ec;
  --tc-selected: #e5ede6;
  --tc-champagne: #d7b77a;
  color: var(--tc-ink);
}
.tc-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 18px;
}
.tc-header h1 { margin: 0 0 4px; }
.tc-header p { margin: 0; max-width: 60ch; color: var(--tc-muted); }
.tc-layout {
  display: grid;
  grid-template-columns: minmax(177px, .39fr) minmax(0, 1fr);
  gap: 15px;
  align-items: start;
}
.tc-people, .tc-conversation {
  min-width: 0;
  border: 1px solid var(--tc-border);
  background: var(--tc-paper);
  border-radius: 6px;
}
.tc-people { padding: 15px; }
.tc-people h2 { margin: 0 0 10px; font-size: 1.1rem; }
.tc-contact-list { list-style: none; padding: 0; margin: 11px 0 0; }
.tc-contact-list li + li { border-top: 1px solid var(--tc-border); }
.tc-person {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: center;
  align-items: center;
  width: 100%;
  min-height: 50px;
  padding: 8px 9px;
  gap: 1px 7px;
  color: var(--tc-ink);
  background: transparent;
  border: 1px solid transparent;
  font: inherit;
  text-align: start;
}
.tc-person:hover, .tc-person[aria-current="true"] { background: var(--tc-selected); }
.tc-person[aria-current="true"] { border-color: #afc2b4; }
.tc-person strong, .tc-peer-role, .tc-thread-top h2, .tc-task-card strong { overflow-wrap: anywhere; }
.tc-person strong { font-size: .88rem; }
.tc-person small { grid-row: 2; grid-column: 1; color: var(--tc-muted); font-size: .76rem; }
.tc-person small:empty { display: none; }
.tc-unread {
  grid-area: 1 / 2 / span 2;
  padding: 2px 6px;
  color: #172827;
  background: var(--tc-champagne);
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 720;
}
.tc-no-people, .tc-empty, .tc-peer-role, .tc-read {
  margin: 0;
  color: var(--tc-muted);
  font-size: .85rem;
}
.tc-no-people { margin-top: 12px; }
.tc-thread-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--tc-border);
}
.tc-thread-top h2 { margin: 0; font-size: clamp(1.17rem, 2.4vw, 1.5rem); }
.tc-peer-role { margin-top: 3px; }
.tc-peer-role:empty, .tc-read:empty, .tc-feedback:empty { display: none; }
.tc-feedback {
  margin: 0;
  padding: 9px 15px;
  color: var(--tc-ink);
  background: var(--tc-selected);
  font-size: .84rem;
}
.tc-feed {
  min-height: 175px;
  max-height: min(49dvh, 540px);
  padding: 15px;
  overflow: auto;
  overscroll-behavior: contain;
  background: #f4f6f1;
}
.tc-events { display: grid; gap: 10px; list-style: none; padding: 0; margin: 0; }
.tc-event {
  justify-self: start;
  min-width: 0;
  max-width: min(92%, 38rem);
  padding: 9px 11px;
  border: 1px solid var(--tc-border);
  border-radius: 2px 8px 8px;
  background: white;
}
.tc-event[data-own="true"] { justify-self: end; background: var(--tc-selected); border-radius: 8px 2px 8px 8px; }
.tc-event-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 9px;
  margin-bottom: 3px;
  font-size: .76rem;
}
.tc-event-line time { color: var(--tc-muted); }
.tc-event-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.49; }
.tc-task-card {
  display: grid;
  gap: 3px;
  margin-block: 4px;
  padding: 9px 10px;
  color: var(--tc-ink);
  background: #f5eddb;
  border: 1px solid #e3d6b5;
  font-size: .84rem;
}
.tc-task-card > p { margin: 0; color: #4c5146; line-height: 1.45; }
.tc-task-card button { justify-self: start; }
.tc-read { margin-top: 8px; text-align: end; font-size: .74rem; }
.tc-primary, .tc-secondary, .tc-quiet {
  min-height: 44px;
  border: 1px solid #9aa9a0;
  border-radius: 4px;
  padding: 7px 11px;
  color: var(--tc-ink);
  background: white;
  font: inherit;
  font-size: .85rem;
  font-weight: 680;
}
.tc-primary { color: white; background: var(--tc-deep); border-color: var(--tc-deep); }
.tc-primary:hover { background: #305049; }
.tc-secondary:hover, .tc-quiet:hover { background: var(--tc-wash); }
.tc-quiet { border-color: transparent; background: transparent; text-decoration: underline; text-underline-offset: 3px; }
.tc-task-new { flex: 0 0 auto; }
.tc-latest { display: block; margin: 8px 15px 8px auto; }
.tc-mobile-back { display: none; }
.tc-field {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--tc-ink);
  font-size: .84rem;
  font-weight: 650;
}
.tc-field :is(input, textarea, select) {
  width: 100%;
  min-height: 44px;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid #8d9b92;
  border-radius: 4px;
  color: var(--tc-ink);
  background: white;
  font: inherit;
  font-size: 1rem;
  font-weight: 450;
}
.tc-field textarea { resize: vertical; }
.team-chat :focus-visible { outline: 3px solid #90621b; outline-offset: 2px; }
.tc-composer, .tc-task-panel {
  padding: 13px 15px;
  border-top: 1px solid var(--tc-border);
}
.tc-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}
.tc-task-panel { background: #fbfaf5; }
.tc-task-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tc-task-head h3 { margin: 0; font-size: 1.12rem; overflow-wrap: anywhere; }
.tc-task-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 6px;
}
.tc-task-form .tc-field:has(textarea) { grid-column: 1 / -1; }
.tc-task-form > button { justify-self: start; }
.tc-task-stale { margin: 0; color: #704c11; font-size: .84rem; }
.tc-announce {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
@media (max-width: 810px) {
  .tc-layout { grid-template-columns: minmax(150px, .48fr) minmax(0, 1fr); }
}
@media (max-width: 650px) {
  .tc-layout { grid-template-columns: minmax(0, 1fr); }
  .team-chat:not(.tc-thread-open) .tc-conversation, .tc-thread-open .tc-people { display: none; }
  .tc-mobile-back { display: block; margin: 3px 12px 0; }
  .tc-contact-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
  .tc-contact-list li + li { border-top: 0; }
  .tc-person { border-color: var(--tc-border); }
  .tc-feed { min-height: 160px; }
}
@media (max-width: 380px) {
  .tc-composer, .tc-task-form { grid-template-columns: minmax(0, 1fr); }
  .tc-composer > button { justify-self: end; }
  .tc-event { max-width: 100%; }
  .tc-task-head { align-items: start; }
}
