.portal-home-brand:has(.portal-contact-entry) .company-logo-home{margin-bottom:0}
.tc-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.7rem;max-width:32rem;margin:.85rem auto}
.tc-choices button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.6rem;min-height:6.5rem;background:#fff;color:#18543e;border:1px solid #c5d8cc;border-radius:1rem;font:inherit;font-size:1.1rem;font-weight:700;cursor:pointer}
.tc-choices button:hover{background:#edf5f0}
.tc-choices button:focus-visible{outline:3px solid #267c62;outline-offset:2px}
.portal-home-brand:has(.portal-contact-entry){margin-bottom:.8rem}
.portal-contact-entry{display:block;align-self:center;width:min(64%,21rem);min-height:44px;padding:.35rem 1rem;border:0;border-radius:.85rem;background:#2168a4;color:#fff;font:inherit;font-size:1.08rem;font-weight:700;cursor:pointer}
.portal-contact-entry:hover{background:#195785}
.portal-contact-entry:focus-visible{outline:3px solid #162f43;outline-offset:3px}
.tc-tabs,.tc-card,.tc-thread,.tc-back{max-width:50rem;margin-inline:auto;font-family:inherit}
.tc-tabs{display:flex;padding:.3rem;background:#edf3f1;border-radius:1rem;margin-block:0 1rem;gap:.35rem}
.tc-tabs button{display:flex;align-items:center;justify-content:center;gap:.5rem;flex:1;padding:.7rem;border:0;border-radius:.75rem;background:transparent;color:#35534a;font:inherit;cursor:pointer}
.tc-tabs button[aria-pressed=true]{background:white;color:#125b46;font-weight:700;box-shadow:0 1px 5px #183c3520}
.tc-card,.tc-thread{background:#fff;border:1px solid #d6e2dd;border-radius:1.15rem;overflow:hidden;color:#193f35}
.tc-card h2{font-size:1.15rem;margin:1.2rem 1.3rem .5rem}
.tc-person{display:flex;align-items:center;gap:.85rem;width:100%;padding:.85rem 1.2rem;border:0;border-bottom:1px solid #e9efeb;background:white;text-align:start;font:inherit;cursor:pointer;color:inherit}
.tc-person:hover,.tc-person:focus-visible{background:#f4f9f6}
.tc-person:last-child{border-bottom:0}.tc-person-text{display:grid;gap:.15rem;min-width:0;flex:1}
.tc-person-text span{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;color:#52695f;font-size:.92rem}
.tc-person time,.tc-bubble time{font-size:.78rem;color:#516960}
.tc-count,.tc-person-text .tc-count{display:inline-grid;place-items:center;min-width:1.5rem;height:1.5rem;padding-inline:.2rem;box-sizing:border-box;border-radius:999px;background:#b4232b;color:white;font-size:.85rem;font-weight:700;line-height:1;vertical-align:middle}
.tc-home-alert{display:flex;align-items:center;justify-content:center;gap:.5rem;margin:.5rem auto 0;padding:.55rem .85rem;border:1px solid #bad5c6;border-radius:.65rem;color:#17513b;background:#f0f8f2;font:inherit;cursor:pointer}
.tc-home-alert[hidden]{display:none}
.tc-avatar{display:grid;place-items:center;flex:none;width:2.75rem;height:2.75rem;border-radius:50%;background:#e0ede7;color:#285545;font-weight:bold}
.tc-group{background:#c5e5d8;color:#07553e}
.tc-thread{display:flex;flex-direction:column;height:min(43rem,calc(100dvh - 12rem));min-height:min(19rem,68dvh)}
.tc-thread > .tc-head,.tc-thread > .tc-composer{flex:none}
.tc-write{flex-direction:row-reverse;align-items:flex-end}
.tc-sheet{justify-content:flex-end}
.tc-head,.tc-write,.tc-sheet,.tc-attachment{display:flex;align-items:center;gap:.65rem}
.tc-head{padding:.7rem 1rem;background:#f6faf7;border-bottom:1px solid #d6e2dd}
.tc-head h2{font-size:1.12rem;margin:0;flex:1}.tc-head .tc-avatar{width:2.35rem;height:2.35rem}
.tc-icon,.tc-send{height:2.75rem;width:2.75rem;border:0;display:grid;place-items:center;border-radius:50%;background:transparent;color:#1a624b;cursor:pointer;flex:none}
.tc-phone{color:#fff}
.tc-phone[data-chat-call=audio]{background:#28599e}
.tc-phone[data-chat-call=video]{background:#70459d}
.tc-phone[data-chat-call=audio]:hover{background:#204983}
.tc-phone[data-chat-call=video]:hover{background:#5c3784}
.tc-head .tc-phone:focus-visible{outline:3px solid #fff;outline-offset:-5px}.tc-send{background:#17694e;color:white}
.tc-log{display:flex;flex-direction:column;gap:.45rem;overflow:auto;overscroll-behavior:contain;flex:1;min-height:0;padding:.85rem 1rem;background:#edf1e9}
.tc-bubble{border-radius:.85rem;max-width:82%;min-width:4rem;padding:.45rem .7rem;box-shadow:0 1px 2px #213d2319;overflow-wrap:anywhere}
.tc-bubble p{margin:0;white-space:pre-wrap;color:#172e24;font-size:1rem;line-height:1.6}
.tc-bubble b{font-size:.85rem;color:#1b674c}.tc-bubble time{display:block;text-align:end}
.tc-mine{align-self:flex-start;background:#d8f0ce;border-start-start-radius:.15rem}
.tc-theirs{align-self:flex-end;background:white;border-start-end-radius:.15rem}
.tc-date,.tc-older,.tc-empty{align-self:center}.tc-date{background:#fff9;padding:.15rem .65rem;color:#4b6154;border-radius:1rem;font-size:.8rem}
.tc-empty{margin:auto;color:#53685c}.tc-file{display:block;color:#175d46}.tc-file img{display:block;width:min(14rem,100%);max-height:14rem;object-fit:contain;border-radius:.5rem}
.tc-composer{padding:.55rem .7rem;background:#f8faf8}.tc-composer textarea{font:inherit;line-height:1.5;border:1px solid #cfddd4;border-radius:1.4rem;padding:.55rem 1rem;min-height:2.75rem;max-height:min(7.5rem,25dvh);resize:none;overflow-y:auto;text-align:start;flex:1;min-width:0;color:#183d30;background:#fff}
.tc-sheet,.tc-attachment{flex-wrap:wrap;padding:.5rem .3rem .8rem}.tc-attachment span{max-width:55%;overflow-wrap:anywhere}.tc-attachment img{height:6rem;max-width:65%;object-fit:contain;border-radius:.5rem}
.tc-sheet button,.tc-attachment button,.tc-back,.tc-older{border:1px solid #c5d8cc;background:#fff;color:#18543e;font:inherit;border-radius:.65rem;padding:.5rem .8rem;cursor:pointer}
.tc-back{display:block;margin-bottom:.8rem}.tc-status{font-size:.9rem;margin:.4rem .8rem;color:#66451a}.tc-status:empty{display:none}
.tc-thread [hidden]{display:none!important}.tc-tabs :focus-visible,.tc-thread :focus-visible,.tc-card :focus-visible{outline:3px solid #267c62;outline-offset:-3px}
@media(max-width:560px){.tc-head,.tc-log,.tc-composer{padding-inline:.5rem}.tc-card,.tc-thread{border-radius:.85rem}.tc-write{gap:.2rem}}

/* Entry screens share a palette with the team meeting room. */
@media screen {
  body:has(.tc-choices, .tc-card, .call-panel[data-team-room]) {
    --portal-page: #11172a;
    --tc-panel: #1d2540;
    --tc-raised: #303a61;
    --tc-line: #49577d;
    --tc-text: #f6f5ff;
    --tc-muted: #c4cbe3;
    --tc-accent: #cec4ff;
    color: var(--tc-text);

    & #app .transfer-appbar {
      background: #1a2138;
      border-color: #394361;
      color: var(--tc-text);
    }
    & .transfer-brand h1 { color: var(--tc-text); }
    & .company-logo-header:not(.arsm-logo) { filter: invert(1) hue-rotate(180deg); mix-blend-mode: screen; }
    & .company-logo-header.arsm-logo { background: #e8eaf3; border-radius: .5rem; padding: .2rem; }
    & #app .transfer-app [data-back] {
      background: var(--tc-panel);
      border-color: var(--tc-line);
      color: var(--tc-text);
    }
    & #app .transfer-app [data-back]:hover { background: var(--tc-raised); }
    & :is(.tc-choices, .tc-tabs, .tc-card, .transfer-appbar) :focus-visible {
      outline: 3px solid var(--tc-accent);
      outline-offset: -3px;
    }
    & .tc-choices button {
      background: var(--tc-raised);
      color: var(--tc-text);
      border-color: #58678e;
    }
    & .tc-choices button svg { color: var(--tc-accent); }
    & .tc-choices button:hover { background: #3c4770; }
    & .tc-tabs, & .tc-card {
      background: var(--tc-panel);
      color: var(--tc-text);
      border: 1px solid var(--tc-line);
    }
    & .tc-tabs button { color: var(--tc-muted); }
    & .tc-tabs button[aria-pressed=true] {
      background: #48476e;
      color: #fff;
      box-shadow: inset 0 -2px var(--tc-accent);
    }
    & .tc-person { background: var(--tc-panel); border-color: #3c4766; }
    & .tc-person:is(:hover,:focus-visible) { background: var(--tc-raised); }
    & .tc-person time, & .tc-person-text > span { color: var(--tc-muted); }
    & .tc-avatar { background: #374364; color: #e5e9ff; }
    & .tc-group { background: #49426d; color: #e8dfff; }
    & .tc-status { color: #f4d095; }
  }

  .call-panel[data-team-room] {
    --call-mint: #cec4ff;
    background: linear-gradient(145deg,#30395a,#232b46 60%,#20263f);
    color: var(--tc-text);
    border-color: #505d80;
    box-shadow: 0 12px 36px #080b192e;
  }
  .call-panel[data-team-room]:not([data-active=true]) {
    margin-block-start: clamp(1.25rem,7svh,5rem);
  }
  .call-panel[data-team-room] .call-mark {
    background: #49456d;
    color: #e1dbff;
    box-shadow: 0 0 0 .45rem #b8aaf514;
  }
  .call-panel[data-team-room] :is([data-call-roster],.call-settings,.call-identity small) { color: var(--tc-muted); }
  .call-panel[data-team-room] .call-settings { border-color: var(--tc-line); }
  #app .call-panel[data-team-room] :is(.button.secondary,select) {
    color: var(--tc-text);
    background: #343d5b;
    border-color: #697497;
  }
  #app .call-panel[data-team-room] .button.primary {
    color: #251e41;
    background: var(--tc-accent);
    border-color: var(--tc-accent);
  }
  .call-panel[data-team-room] .call-tile { background: #2b3551; border-color: var(--tc-line); }
  .call-panel[data-team-room] .call-tile[data-speaking=true] { border-color: var(--tc-accent); box-shadow: inset 0 0 0 2px var(--tc-accent); }
  .call-panel[data-team-room] .call-avatar { background: #49456d; color: var(--tc-text); }
  .call-panel[data-team-room] .call-tile[data-speaking=true] .call-avatar { outline-color: var(--tc-accent); }
  .call-panel[data-team-room] [data-has-video=true] .call-identity { background: #181d32de; }
  @media (max-height:560px) {
    .call-panel[data-team-room]:not([data-active=true]) { margin-block-start: .85rem; }
    .call-panel[data-team-room]:not([data-active=true]) .call-heading { padding-block: .65rem; }
  }
}
