/* Team sessions for the self-check forms (HAL-1333). Linked only when team.enabled. */
:root{--tm-ink:#1d2a3d;--tm-green:#4ca044;--tm-line:#d7dee8;--tm-navy:#1d3252}
.tm-two{display:grid;grid-template-columns:1fr 1fr;gap:20px;width:100%;margin:28px 0}
.tm-card{background:#fff;border:1px solid var(--tm-line);border-left:5px solid var(--tm-green);box-shadow:0 2px 10px rgba(29,50,82,.08);padding:24px 28px}
.tm-card--solo{border-left-color:var(--tm-navy)}
.tm-card h3{margin:0 0 8px;font-size:22px;color:var(--tm-ink)}
.tm-card p{margin:0 0 14px;line-height:1.5;font-size:16px}
.tm-row{display:flex;gap:12px;flex-wrap:wrap}
.tm-card .tm-row{flex-wrap:nowrap}
.tm-card .btn{white-space:nowrap}
.tm-note{max-width:none;font-size:15px;color:#5b6676;margin:6px 0}
.tm-on .tm-two,.tm-on .tm-note,.tm-on .scstore{display:none}

.tm-dlg{border:0;padding:0;background:transparent;max-width:none;width:100%;max-height:none}
.tm-dlg::backdrop{background:rgba(18,28,44,.55)}
.tm-dlg[open]{display:flex;align-items:center;justify-content:center;position:fixed;inset:0;padding:20px}
.tm-modal{background:#fff;border-radius:10px;max-width:620px;width:100%;padding:30px 34px;box-shadow:0 20px 60px rgba(0,0,0,.35);max-height:92vh;overflow:auto;color:var(--tm-ink)}
.tm-modal h3{margin:0 0 6px;font-size:26px;color:var(--tm-ink)}
.tm-modal p{margin:0 0 14px;line-height:1.5;font-size:16px}
.tm-code{font-size:44px;font-weight:800;letter-spacing:2px;text-align:center;background:#f3f5f9;border:2px dashed #9aa6b6;border-radius:10px;padding:18px 10px;margin:14px 0 10px;color:var(--tm-navy);font-variant-numeric:tabular-nums}
.tm-sub{font-size:14px;color:#5b6676}
.tm-c{text-align:center;min-height:1.4em}
.tm-b{margin-bottom:4px!important;font-weight:700}
.tm-row--c{justify-content:center}
.tm-col{display:flex;flex-direction:column;gap:10px;margin:12px 0 18px}
.tm-field{display:grid;gap:6px;margin:12px 0;font-weight:700;font-size:15px}
.tm-field input{font:inherit;font-weight:400;padding:13px 14px;border:1px solid #aeb8c6;border-radius:6px;font-size:18px}
.tm-field small{font-weight:400;color:#5b6676}
.tm-big{font-size:28px!important;text-align:center;letter-spacing:2px;font-variant-numeric:tabular-nums}
.tm-err{background:#fdecec;border:1px solid #e4a3a3;color:#8c1d1d;padding:10px 14px;border-radius:6px;margin:8px 0;font-size:15px}
.tm-ok{background:#eef6ec;border:1px solid #b9d8b2;border-radius:8px;padding:10px 14px;margin:12px 0;font-size:15px}
.tm-list{list-style:disc;padding-left:22px;margin:6px 0 14px;display:grid;gap:4px}

.tm-bar{position:sticky;top:205px;z-index:40;background:#fff;border-bottom:1px solid var(--tm-line);box-shadow:0 2px 6px rgba(29,50,82,.08)}
.tm-bar__in{max-width:1168px;margin:0 auto;padding:10px 20px;display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.tm-live{display:flex;align-items:center;gap:8px;font-weight:700;color:var(--tm-ink)}
.tm-count{font-weight:700;color:var(--tm-ink)}
.tm-saved{font-size:14px;color:#5b6676}
.tm-dot{width:10px;height:10px;border-radius:50%;background:#2fa04a;box-shadow:0 0 0 4px rgba(47,160,74,.2)}
.tm-dot--off{background:#c05621;box-shadow:0 0 0 4px rgba(192,86,33,.2)}
/* One row, always. These used to wrap: with nine people in a session the chips
   stacked into six rows, the sticky bar grew to 465px, and it sat on top of the
   questions for the whole class (2026-10-30, live session). A bar pinned over
   the content cannot be allowed to grow with the number of people in the room,
   so the row scrolls sideways instead of growing downwards. min-width:0 is what
   lets it shrink inside the flex row; without it the chips refuse to give up
   space and push the buttons onto another line. */
.tm-chips{display:flex;gap:8px;flex-wrap:nowrap;flex:1 1 0;min-width:0;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;scroll-snap-type:x proximity}
.tm-chips::-webkit-scrollbar{height:6px}
.tm-chips::-webkit-scrollbar-thumb{background:#c9d2de;border-radius:3px}
.tm-chip{flex:0 0 auto;scroll-snap-align:start;max-width:260px;display:flex;align-items:center;gap:8px;border-radius:999px;padding:5px 14px 5px 6px;background:#f3f5f9;font-size:14px;white-space:nowrap}
.tm-chip>span:not(.tm-av){overflow:hidden;text-overflow:ellipsis}
.tm-chip small{color:#5b6676}
.tm-av{width:26px;height:26px;border-radius:50%;color:#fff;font-weight:800;font-size:13px;display:flex;align-items:center;justify-content:center}
.tm-av--s{width:22px;height:22px;font-size:11px}
.tm-off{display:block;max-width:1168px;margin:0 auto;padding:6px 20px;font-size:14px;background:#fff3e8;color:#7a3a10}
.tm-off[hidden]{display:none}
.tm-flash{max-width:1168px;margin:0 auto;padding:6px 20px;font-size:14px;color:#5b6676;background:#f3f5f9}
.tm-flash:empty{display:none}
.tm-flag{display:inline-flex;align-items:center;gap:6px;margin-left:12px;padding:3px 12px 3px 4px;border-radius:999px;background:#f3f5f9;font-size:14px;font-weight:700;vertical-align:middle;color:var(--tm-ink)}
.tm-edit{outline:3px solid var(--c);outline-offset:3px;border-radius:6px;position:relative}
.tm-edit::after{content:attr(data-tm-who);position:absolute;right:0;top:-14px;background:var(--c);color:#fff;font-size:12px;font-weight:800;padding:2px 10px;border-radius:999px}

@media(max-width:700px){
  .tm-two{grid-template-columns:1fr}
  .tm-card .btn{width:100%}
  .tm-card .tm-row{flex-direction:column}
  .tm-lg{display:none}
  .tm-chips{display:none}
  .tm-bar{top:182px}
  .tm-bar__in{padding:8px 12px;gap:8px;flex-wrap:wrap}
  .tm-bar__in>.tm-count{flex:1}
  .tm-bar__in>.btn{padding:6px 12px;font-size:13px}
  .tm-modal{padding:22px 18px}
  .tm-code{font-size:32px}
}
