/* AI team page (#/team): your team first; roles are added from a pop-up. Dashboard tokens from styles.css:
   white cards that lift on hover, selected = var(--sel-raise) + var(--sel-edge), black primary buttons, soft copper,
   Inter Tight for names. Motion: transforms and opacity only. Layers (pop-up, panel, Pro sheet) are rendered into body. */
.team-page { min-width: 0; }

/* header: title + soft line, stats and the Add button on the right */
.team-head { display: flex; align-items: center; justify-content: space-between; gap: 10px 20px; flex-wrap: wrap; margin-bottom: 16px; }
.team-head h1 { margin: 0; font: 500 24px/1.2 var(--display); letter-spacing: -.025em; display: flex; align-items: baseline; gap: 4px 12px; flex-wrap: wrap; min-width: 0; }
.team-head h1 span { font: 400 14px var(--font); letter-spacing: -.005em; color: var(--ink-3); }
.team-head-r { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.team-strip { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--ink-3); min-width: 0; }
.team-strip > span { white-space: nowrap; }
.team-strip b { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.team-strip .hot b { color: var(--brand-ink); }

/* shared bits */
.team-em { --ac: var(--brand); width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; color: var(--ac); background: color-mix(in srgb, var(--ac) 10%, var(--panel)); }
.team-top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.team-name { flex: 1; min-width: 0; display: grid; gap: 1px; }
.team-name b { display: flex; align-items: baseline; gap: 6px; min-width: 0; font: 500 15px/1.3 var(--display); letter-spacing: -.01em; }
.team-name b > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.team-name small { font-size: 12px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-seats { flex: none; font: 500 12px var(--font); font-style: normal; color: var(--ink-3); }
.team-run { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; min-width: 0; }
.team-ai { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.team-run em { font-style: normal; color: var(--brand-ink); font-size: 11.5px; white-space: nowrap; }
.team-tools { display: inline-flex; gap: 3px; flex: none; }
.team-meta { display: flex; align-items: center; gap: 8px; min-width: 0; }
.team-step { display: inline-flex; align-items: center; padding: 2px; border-radius: 10px; background: var(--raised); box-shadow: inset 0 0 0 1px var(--line); flex: none; }
.team-step button { width: 28px; height: 28px; border-radius: 8px; font-size: 16px; line-height: 1; color: var(--ink-2); transition: background-color .15s var(--ease), color .15s var(--ease); }
.team-step button:hover:not(:disabled) { background: var(--sel-raise); box-shadow: var(--sel-edge); color: var(--ink); }
.team-step button:disabled { opacity: .35; cursor: default; }
.team-step b { min-width: 22px; text-align: center; font-size: 13px; font-variant-numeric: tabular-nums; font-weight: 500; }
.team-rm { height: 28px; padding: 0 6px; border-radius: 8px; font-size: 12.5px; color: var(--ink-3); transition: color .15s var(--ease), background-color .15s var(--ease); }
.team-rm:hover { color: var(--bad); background: var(--hover); }
.team-x { width: 32px; height: 32px; flex: none; border-radius: 10px; display: grid; place-items: center; color: var(--ink-3); transition: background-color .15s var(--ease), color .15s var(--ease); }
.team-x:hover { background: var(--hover); color: var(--ink); }
.team-page button:focus-visible, #team-add-host button:focus-visible, #team-panel-host button:focus-visible, #team-sheet-host button:focus-visible, #team-panel-host summary:focus-visible { outline: 2px solid var(--sel-ic); outline-offset: 2px; }
.meter.team-prog { height: 4px; display: block; }
.team-prog i { background: var(--brand); transition: transform .9s linear; }

/* empty team */
.team-zero { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 56px 20px 48px; border-radius: var(--r-card); background: var(--panel); box-shadow: var(--shadow-card); }
.team-cluster { display: flex; margin-bottom: 10px; }
.team-cluster > span { margin-left: -10px; transform: rotate(calc((var(--i) - 1.5) * 6deg)) translateY(calc((var(--i) - 1.5) * (var(--i) - 1.5) * 2px)); animation: team-bob 5s var(--ease) infinite alternate; animation-delay: calc(var(--i) * -1.2s); }
.team-cluster > span:first-child { margin-left: 0; }
.team-cluster .team-em { width: 56px; height: 56px; border-radius: 16px; box-shadow: 0 0 0 3px var(--panel), 0 6px 16px -8px rgba(0,0,0,.18); }
@keyframes team-bob { to { translate: 0 -4px; } }
.team-zero-l { margin: 0; font: 500 18px/1.3 var(--display); letter-spacing: -.015em; max-width: 34ch; }
.team-zero-s { margin: 0 0 8px; font-size: 13px; color: var(--ink-3); max-width: 46ch; }
.team-picks { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 14px; max-width: 100%; }
.team-picks button { display: inline-flex; align-items: center; gap: 10px; padding: 10px 14px 10px 12px; border-radius: 14px; text-align: left; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line-2); transition: transform .25s var(--ease), box-shadow .25s var(--ease); max-width: 100%; min-width: 0; }
.team-picks button:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--line-2), 0 10px 22px -14px rgba(0,0,0,.25); }
.team-picks button .ic { color: var(--brand); flex: none; }
.team-picks span { display: grid; min-width: 0; }
.team-picks b { font-weight: 500; font-size: 13px; }
.team-picks small { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* brief composer: one line until focused */
.team-compose { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 8px; border-radius: 16px; background: var(--panel); box-shadow: var(--shadow-card); min-width: 0; transition: box-shadow .2s var(--ease); }
.team-compose:focus-within { box-shadow: var(--shadow-card), 0 0 0 2px color-mix(in srgb, var(--brand) 30%, transparent); }
.team-brief-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, var(--panel)); }
.team-brief-q { flex: 1; min-width: 0; height: 36px; border: 0; outline: none; background: transparent; font-size: 14px; }
.team-compose select { height: 32px; border-radius: 10px; border: 0; padding: 0 10px; background: var(--raised); font-size: 12.5px; max-width: 170px; display: none; }
.team-compose.open select, .team-compose:focus-within select { display: block; }
.team-compose .btn { flex: none; }

/* sections */
.team-sec { display: flex; align-items: baseline; gap: 8px; margin: 24px 0 10px; }
.team-sec h2 { margin: 0; font: 500 15px var(--display); letter-spacing: -.01em; display: flex; gap: 8px; align-items: baseline; }
.team-sec h2 span { font: 400 12.5px var(--font); color: var(--ink-3); }

/* members */
.team-mems { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.team-mem { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 14px 14px 12px; border-radius: 20px; background: var(--panel); box-shadow: var(--shadow-card); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.team-mem:hover, .team-card:hover, .team-work:hover { transform: translateY(-2px); box-shadow: var(--shadow-card), 0 14px 32px -16px rgba(0,0,0,.18); }
.team-mem:has(.team-menu) { position: relative; z-index: 3; }
.team-menu-wrap { position: relative; flex: none; align-self: flex-start; }
.team-dots { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: var(--ink-3); transition: background-color .15s var(--ease), color .15s var(--ease); }
.team-dots:hover, .team-dots[aria-expanded="true"] { background: var(--hover); color: var(--ink); }
.team-menu { position: absolute; right: 0; top: 36px; z-index: 5; width: 220px; padding: 6px; border-radius: 14px; background: var(--panel); box-shadow: var(--shadow-2), 0 0 0 1px var(--line); display: grid; gap: 2px; animation: team-in .18s var(--ease); }
.team-menu-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 4px 4px 8px; font-size: 13px; }
.team-menu-rm { text-align: left; height: 34px; padding: 0 8px; border-radius: 8px; font-size: 13px; color: var(--bad); }
.team-menu-rm:hover { background: var(--hover); }
.team-stat-l { display: grid; gap: 6px; min-height: 22px; }
.team-status { display: flex; align-items: center; gap: 8px; font-size: 13px; min-width: 0; }
.team-status span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.team-status i { width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--ink-3); opacity: .5; }
.team-status.working i { background: var(--brand); opacity: 1; animation: team-pulse 1.4s ease-in-out infinite; }
.team-status.review { color: var(--ink); font-weight: 500; }
.team-status.review i { background: #3b82f6; opacity: 1; }
.team-status.planned i { background: var(--brand); opacity: .5; }
.team-status.idle { color: var(--ink-3); }
@keyframes team-pulse { 50% { opacity: .35; } }
.team-last { margin: 0; font-size: 12.5px; line-height: 18px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 36px; }
.team-last span { color: var(--ink-3); margin-right: 6px; }
.team-mem-f { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.team-mem-a { display: inline-flex; gap: 6px; flex: none; }
.team-mem-a .btn { height: 30px; padding: 0 10px; }

/* work */
.team-works { display: grid; gap: 12px; }
.team-nowork { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-radius: 16px; border: 1.5px dashed var(--line-2); color: var(--ink-3); font-size: 13px; }
.team-nowork .ic { flex: none; }
.team-work { display: grid; gap: 12px; padding: 14px 16px; border-radius: 20px; background: var(--panel); box-shadow: var(--shadow-card); min-width: 0; transition: transform .3s var(--ease), box-shadow .3s var(--ease); animation: team-in .35s var(--ease); }
.team-work-h { display: flex; align-items: center; gap: 12px; min-width: 0; }
.team-who { display: inline-flex; flex: none; }
.team-who .team-em { width: 30px; height: 30px; border-radius: 9px; box-shadow: 0 0 0 2px var(--panel); }
.team-who .team-em + .team-em { margin-left: -8px; }
.team-work-t { flex: 1; min-width: 0; display: grid; gap: 1px; }
.team-work-t b { font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-work-t small { font-size: 12px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-state { flex: none; font-size: 11.5px; font-weight: 500; line-height: 22px; padding: 0 9px; border-radius: 99px; background: var(--hover); color: var(--ink-2); white-space: nowrap; }
.team-state.s-working { color: var(--brand-ink); background: color-mix(in srgb, var(--brand) 10%, var(--panel)); }
.team-state.s-review { color: #2557c7; background: color-mix(in srgb, #3b82f6 10%, var(--panel)); }
.team-state.s-done { color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, var(--panel)); }
.team-line { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.team-line li { display: grid; gap: 6px; font-size: 12px; color: var(--ink-3); min-width: 0; }
.team-line li i { height: 3px; border-radius: 99px; background: var(--raised); }
.team-line li.done i { background: color-mix(in srgb, var(--brand) 45%, var(--raised)); }
.team-line li.on i { background: var(--brand); }
.team-line li.on { color: var(--ink); font-weight: 500; }
.team-line li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.team-steps li { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-3); min-width: 0; }
.team-steps li > i { width: 12px; height: 12px; flex: none; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line-2); }
.team-steps li .ic { color: var(--ok); }
.team-steps li.done { color: var(--ink-2); }
.team-steps li.now { color: var(--ink); font-weight: 500; }
.team-steps li.now > i { box-shadow: inset 0 0 0 1.5px var(--brand); background: radial-gradient(circle, var(--brand) 0 3px, transparent 3.5px); animation: team-pulse 1.4s ease-in-out infinite; }
.team-steps li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* result */
.team-result { display: grid; gap: 10px; min-width: 0; }
.team-result-h { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 12px; flex-wrap: wrap; }
.team-result-h b { font-weight: 500; font-size: 14px; }
.team-sample { font-size: 11.5px; color: var(--ink-3); }
.team-notes { display: flex; flex-wrap: wrap; gap: 6px; }
.team-notes span { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--ink-2); background: var(--hover); padding: 3px 8px; border-radius: 8px; }
.team-md { padding: 12px 14px; border-radius: 14px; background: var(--raised); font-size: 13px; line-height: 19px; color: var(--ink-2); max-height: 300px; overflow: auto; overflow-wrap: anywhere; }
.team-md h5 { margin: 12px 0 2px; font: 500 12px var(--font); color: var(--ink); }
.team-md h5:first-child { margin-top: 0; }
.team-md p { margin: 0 0 4px; }
.team-md ul { margin: 2px 0 6px; padding-left: 18px; }
.team-md b { color: var(--ink); font-weight: 500; }
.team-result-a { display: flex; flex-wrap: wrap; gap: 6px; }
.team-result-a .btn { height: 32px; padding: 0 12px; }
.team-result-a .btn:disabled { opacity: .6; cursor: default; }
.team-change { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.team-change-q { flex: 1 1 200px; min-width: 0; height: 34px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel); padding: 0 12px; outline: none; font-size: 13px; }
.team-change-q:focus { border-color: var(--brand); }

/* done */
.team-done { display: grid; gap: 8px; }
.team-done-row { padding: 10px 12px; border-radius: 16px; background: var(--panel); box-shadow: var(--shadow-card); display: grid; gap: 10px; min-width: 0; }
.team-done-h { display: flex; align-items: center; gap: 10px; min-width: 0; }
.team-done-h .team-em { width: 30px; height: 30px; border-radius: 9px; }
.team-done-h .btn { height: 30px; padding: 0 10px; flex: none; }
.team-note { font-size: 12px; margin-top: 20px; }

/* the Add pop-up (catalogue) */
.team-scrim { position: fixed; inset: 0; background: rgba(10,10,12,.32); z-index: 80; animation: team-fade .2s var(--ease); }
.team-scrim.soft { background: rgba(10,10,12,.16); }
.team-scrim.top { z-index: 90; }
.team-modal { position: fixed; z-index: 81; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(1080px, calc(100vw - 48px)); height: min(820px, calc(100dvh - 48px)); display: flex; flex-direction: column; border-radius: var(--r-card); background: var(--bg); box-shadow: var(--shadow-2); overflow: hidden; animation: team-pop .3s var(--ease); }
.team-modal-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 22px 12px; }
.team-modal-h h3 { margin: 0; font: 500 20px/1.2 var(--display); letter-spacing: -.02em; }
.team-modal-h small { display: block; margin-top: 4px; font-size: 13px; color: var(--ink-3); }
.team-modal-bar { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 22px; min-width: 0; }
.team-modal .cl-filters { background: var(--tab-track); }
.team-presets { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 22px 12px; }
.team-presets button { height: 30px; padding: 0 12px 0 10px; border-radius: 99px; font-size: 12.5px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; box-shadow: inset 0 0 0 1px var(--line-2); transition: background-color .2s var(--ease), color .2s var(--ease); white-space: nowrap; }
.team-presets button .ic { color: var(--brand); }
.team-presets button:hover { background: var(--hover); color: var(--ink); }
.team-modal-b { flex: 1; overflow: auto; padding: 4px 22px 22px; overscroll-behavior: contain; }

/* catalogue cards */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 272px), 1fr)); gap: 14px; align-items: stretch; }
.team-card { display: flex; flex-direction: column; gap: 12px; min-width: 0; height: 100%; padding: 16px 16px 14px; border-radius: 20px; background: var(--panel); box-shadow: var(--shadow-card); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.team-tier { flex: none; align-self: flex-start; font-size: 11.5px; font-weight: 500; line-height: 20px; padding: 0 8px; border-radius: 6px; white-space: nowrap; }
.team-tier.free { color: var(--ink-3); padding: 0 2px; }
.team-tier.pro { color: var(--brand-ink); background: var(--sel); }
.team-tier.inc { color: var(--ok); padding: 0 2px; }
.team-promise { margin: 0; font-size: 13px; line-height: 19px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 38px; }
.team-skills { display: flex; flex-wrap: wrap; gap: 4px; }
.team-skill { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; color: var(--ink-2); background: var(--hover); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.team-skill.locked, .team-skill.locked .ic { color: var(--ink-3); }
.team-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.team-act { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 32px; }
.team-price { font-size: 12px; color: var(--ink-3); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-price b { color: var(--ink); font-weight: 500; }
.team-act .btn { flex: none; height: 32px; }
.team-added { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 500; color: var(--ok); animation: team-in .25s var(--ease); }
.team-ctl { display: inline-flex; align-items: center; gap: 4px; flex: none; }
.team-unlock .ic { color: var(--brand); }

/* member panel */
.team-panel { position: fixed; z-index: 81; top: 12px; right: 12px; bottom: 12px; width: min(440px, calc(100vw - 24px)); overflow: auto; overscroll-behavior: contain; border-radius: var(--r-card); background: var(--panel); box-shadow: var(--shadow-2); padding: 18px 20px 0; display: flex; flex-direction: column; animation: team-slide .32s var(--ease); }
.team-panel-h { display: flex; align-items: center; gap: 12px; }
.team-panel-h .team-em { width: 48px; height: 48px; border-radius: 14px; }
.team-panel-p { margin: 12px 0 0; font-size: 13.5px; line-height: 20px; color: var(--ink-2); }
.team-panel h4 { margin: 20px 0 8px; font: 500 12.5px var(--font); color: var(--ink); display: flex; gap: 6px; align-items: baseline; }
.team-panel h4 span { color: var(--ink-3); font-weight: 400; }
.team-method { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 6px; }
.team-method li { counter-increment: s; display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--ink-2); }
.team-method li::before { content: counter(s); width: 22px; height: 22px; flex: none; border-radius: 7px; display: grid; place-items: center; font-size: 11.5px; font-weight: 500; color: var(--brand-ink); background: color-mix(in srgb, var(--brand) 10%, var(--panel)); }
.team-panel-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.team-panel-row > span { display: grid; min-width: 0; font-size: 13px; }
.team-panel-row small { color: var(--ink-3); font-size: 12px; }
.team-panel-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.team-panel-tools > span { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 4px 10px 4px 4px; border-radius: 10px; background: var(--hover); }
.team-panel-tasks { display: grid; gap: 8px; }
.team-ptask { border-radius: 14px; box-shadow: inset 0 0 0 1px var(--line); padding: 10px 12px; }
.team-ptask summary { display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; min-width: 0; font-size: 13px; }
.team-ptask summary::-webkit-details-marker { display: none; }
.team-ptask summary b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.team-ptask[open] summary { margin-bottom: 10px; }
.team-panel-f { position: sticky; bottom: 0; margin-top: auto; padding: 14px 0 18px; background: linear-gradient(to bottom, transparent, var(--panel) 30%); }
.team-panel-f .btn { width: 100%; justify-content: center; }

/* Pro sheet */
.team-sheet { position: fixed; z-index: 91; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(440px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; border-radius: var(--r-card); background: var(--panel); box-shadow: var(--shadow-2); padding: 24px; animation: team-pop .3s var(--ease); }
.team-sheet > .team-em { width: 48px; height: 48px; border-radius: 14px; }
.team-sheet h3 { margin: 12px 0 6px; font: 500 22px/1.2 var(--display); letter-spacing: -.025em; }
.team-sheet-sub { margin: 0 0 16px; font-size: 13px; line-height: 19px; color: var(--ink-2); }
.team-sheet-x { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--ink-3); }
.team-sheet-x:hover { background: var(--hover); color: var(--ink); }
.team-sheet-h { font-size: 12.5px; font-weight: 500; margin: 14px 0 8px; display: flex; gap: 8px; align-items: baseline; }
.team-sheet-h small { color: var(--ink-3); font-weight: 400; }
.team-sheet-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.team-sheet-list li { display: flex; align-items: center; gap: 10px; font-size: 13px; padding: 6px 10px 6px 6px; border-radius: 12px; background: var(--raised); }
.team-sheet-list li .team-em { width: 28px; height: 28px; border-radius: 8px; }
.team-sheet-list li span { flex: 1; min-width: 0; }
.team-sheet-list li b { font-weight: 500; font-variant-numeric: tabular-nums; }
.team-sheet-f { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; flex-wrap: wrap; }
.team-sheet-f small { color: var(--ink-3); font-size: 12px; }
.team-link { color: var(--brand-ink); text-decoration: underline; text-underline-offset: 2px; font-size: 12px; }

/* toast with Undo */
.team-toast { display: flex; align-items: center; gap: 12px; }
.team-toast button { font-weight: 500; color: #f3a87f; padding: 2px 4px; border-radius: 6px; }

@keyframes team-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes team-fade { from { opacity: 0; } }
@keyframes team-pop { from { opacity: 0; transform: translate(-50%, calc(-50% + 10px)); } }
@keyframes team-slide { from { opacity: 0; transform: translateX(24px); } }
@keyframes team-up { from { transform: translateY(24px); opacity: 0; } }

@media (max-width: 860px) {
  .team-head-r { width: 100%; justify-content: space-between; }
}
@media (max-width: 640px) {
  .team-head h1 { font-size: 21px; }
  .team-strip { gap: 2px 10px; font-size: 12px; }
  .team-zero { padding: 40px 16px 32px; }
  .team-picks { display: grid; width: 100%; }
  .team-compose { flex-wrap: wrap; }
  .team-brief-q { flex-basis: calc(100% - 44px); }
  .team-compose select { flex: 1; max-width: none; }
  .team-mem-f { flex-wrap: wrap; }
  .team-work { padding: 12px; }
  .team-work-h { flex-wrap: wrap; }
  .team-state { order: -1; margin-left: auto; }
  .team-modal { left: 0; right: 0; top: auto; bottom: 0; transform: none; width: auto; height: calc(100dvh - 24px); border-radius: 24px 24px 0 0; animation: team-up .3s var(--ease); }
  .team-modal-h, .team-modal-bar, .team-presets { padding-left: 16px; padding-right: 16px; }
  .team-modal-b { padding: 4px 16px calc(16px + env(safe-area-inset-bottom)); }
  .team-presets { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .team-presets::-webkit-scrollbar { display: none; }
  .team-presets button { flex: none; }
  .team-panel { top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: calc(100dvh - 24px); border-radius: 24px 24px 0 0; animation: team-up .3s var(--ease); }
  .team-sheet { left: 0; right: 0; top: auto; bottom: 0; transform: none; width: auto; border-radius: 24px 24px 0 0; padding: 20px 16px calc(16px + env(safe-area-inset-bottom)); animation: team-up .3s var(--ease); }
}
@media (prefers-reduced-motion: reduce) {
  .team-mem, .team-card, .team-work, .team-sheet, .team-scrim, .team-modal, .team-panel, .team-menu, .team-added, .team-cluster > span, .team-status i, .team-steps li.now > i { transition: none; animation: none; }
  .team-mem:hover, .team-card:hover, .team-work:hover, .team-picks button:hover { transform: none; }
  .team-prog i { transition: none; }
}

/* Same Microooo tab bar as the rest of the app: one track, raised active chip, no separate pills or rings */
.team-seg, .team-tabs { display: inline-flex; flex: none; align-items: center; gap: 2px; padding: 4px; margin: 0; border-radius: 14px; background: var(--tab-track); box-shadow: inset 0 0 0 1px var(--line), 0 1px 2px rgba(0,0,0,.03); overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.team-tabs { flex: 0 1 auto; }
.team-seg button, .team-tabs button { height: 32px; padding: 0 12px; border-radius: 10px; background: transparent; box-shadow: none; outline-offset: -2px; }
.team-tabs button { background: transparent; box-shadow: none; }
.team-seg button:hover, .team-tabs button:hover { background: var(--hover); color: var(--ink); }
.team-seg button.on, .team-tabs button.on { background: var(--sel-raise); box-shadow: var(--sel-edge); color: var(--ink); font-weight: 500; }
.team-seg button:focus-visible, .team-tabs button:focus-visible { outline: 2px solid var(--sel-ic); outline-offset: -2px; }
/* Calmer header: title with one quiet line of numbers under it; the Add button alone on the right */
.team-head { align-items: center; margin: 6px 0 18px; }
.team-head-l { display: grid; gap: 6px; min-width: 0; }
.team-strip { gap: 0; font-size: 12.5px; }
.team-strip > span + span::before { content: "·"; margin: 0 8px; color: var(--line-2); }
.team-head-r .btn { height: 38px; padding: 0 16px; }

/* search in the Add to your team pop-up (owner 2026-11-11: "need a search option here") */
.team-modal-bar { flex-direction: column; align-items: stretch; gap: 10px; }
.team-modal-tabs { display: flex; gap: 8px; flex-wrap: wrap; min-width: 0; }
.team-search { display: block; }
.team-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3, #8a8a8a); pointer-events: none; }
.team-search input { width: 100%; height: 38px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel); padding: 0 12px 0 36px; outline: none; box-shadow: none; transition: border-color .15s, box-shadow .15s; }
.team-search input:focus, .team-search input:focus-visible { outline: none; border-color: var(--line-2); box-shadow: 0 0 0 3px rgba(224, 104, 47, .14); }
.team-search input::-webkit-search-cancel-button { cursor: pointer; }
.team-none { display: grid; justify-items: center; gap: 6px; padding: 48px 16px; text-align: center; color: var(--ink-2); }
.team-none svg { color: var(--ink-3, #8a8a8a); }
.team-none b { color: var(--ink); font-weight: 600; }
.team-none small { color: var(--ink-3, #8a8a8a); }
.team-none .btn { margin-top: 8px; }

/* Teams per project (owner 2026-11-12): one tab per team (All projects + each project) in the app's own tab bar; a project's
   header line, the "OK this team" bar, why / first on each card, the grouped catalogue, your own agent, working hours.
   No hover lift or pop on any of it. */
.team-pbar .st-tabs { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.team-pbar .st-tabs::-webkit-scrollbar { display: none; }
.team-pbar .st-tabs > button { white-space: nowrap; flex: none; }
.team-proj { display: flex; align-items: center; gap: 12px; min-width: 0; margin: 0 0 14px; }
.team-proj > :first-child { flex: none; }
.team-proj-t { flex: 1; min-width: 0; display: grid; gap: 1px; }
.team-proj-t b { font: 500 15px/1.3 var(--display); letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-proj-t small { font-size: 12.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-proj .btn { flex: none; }
.team-okbar { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; padding: 12px 14px; border-radius: 16px; background: var(--panel); box-shadow: var(--shadow-card); }
.team-okbar-t { display: flex; align-items: flex-start; gap: 10px; min-width: 0; flex: 1 1 320px; }
.team-okbar-t > .ic { color: var(--brand); flex: none; margin-top: 1px; }
.team-okbar-t > span { display: grid; gap: 2px; min-width: 0; font-size: 13px; }
.team-okbar-t b { font-weight: 500; }
.team-okbar-t small { font-size: 12.5px; line-height: 18px; color: var(--ink-3); }
.team-okbar-a { display: inline-flex; gap: 6px; flex-wrap: wrap; flex: none; }
.team-why span, .team-first span { color: var(--ink-3); }
.team-first { color: var(--ink); min-height: 0; -webkit-line-clamp: 2; }
.team-mem .team-why { min-height: 0; }
.team-name small .team-hrs-l { display: inline-flex; align-items: center; gap: 3px; vertical-align: -1px; }
.team-name small .team-hrs-l .ic { flex: none; }
.team-menu-it { display: flex; align-items: center; gap: 8px; text-align: left; height: 34px; padding: 0 8px; border-radius: 8px; font-size: 13px; color: var(--ink-2); }
.team-menu-it:hover { background: var(--hover); color: var(--ink); }
.team-nowork .btn { margin-left: auto; flex: none; }
.team-prows { display: grid; gap: 8px; }
.team-prow { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 10px 12px; border-radius: 16px; background: var(--panel); box-shadow: var(--shadow-card); }
.team-prow-i { flex: none; display: inline-flex; }
.team-prow .btn { flex: none; height: 30px; padding: 0 10px; }
.team-wf { margin: 20px 0 0; }
.team-wait { margin: 0; display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.team-wait .ic { color: var(--brand); flex: none; }
.team-sent { border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); padding: 0 12px; min-width: 0; }
.team-sent summary { display: flex; align-items: center; gap: 6px; height: 34px; cursor: pointer; list-style: none; font-size: 12.5px; color: var(--ink-2); }
.team-sent summary::-webkit-details-marker { display: none; }
.team-sent summary .ic { color: var(--ink-3); }
.team-sent pre { margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; background: var(--raised); font: 12px/18px var(--mono, ui-monospace, monospace); color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 260px; overflow: auto; }
.team-ptask .team-sent { margin-top: 8px; }
.team-grp { margin: 18px 0 10px; font: 500 13px var(--font); color: var(--ink); display: flex; gap: 6px; align-items: baseline; }
.team-grp:first-child { margin-top: 4px; }
.team-grp span { color: var(--ink-3); font-weight: 400; font-size: 12px; }
.team-new { box-shadow: inset 0 0 0 1.5px var(--line-2); background: transparent; }
.team-none-a { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.team-panel-p.tight { margin-top: 0; }
/* your own agent / working hours */
.team-cform { display: grid; gap: 12px; width: min(520px, calc(100vw - 32px)); }
.team-cform h3 { margin: 4px 0 0; }
.team-cform .team-sheet-sub { margin: 0; }
.team-cform .team-sheet-f { margin-top: 4px; }
.team-fl { display: grid; gap: 6px; font-size: 12.5px; font-weight: 500; color: var(--ink); min-width: 0; }
.team-fl > span { font-weight: 500; }
.team-fl textarea.input { height: auto; min-height: 92px; padding: 10px 12px; line-height: 19px; resize: vertical; font: inherit; font-weight: 400; font-size: 13.5px; }
.team-fl .input { font-weight: 400; }
.team-fl2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.team-tchecks { display: flex; flex-wrap: wrap; gap: 6px; }
.team-tchecks label, .team-days label { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px 0 8px; border-radius: 10px; background: var(--raised); font-size: 12.5px; font-weight: 400; cursor: pointer; }
.team-tchecks label:has(input:checked), .team-days label:has(input:checked) { background: var(--sel-raise); box-shadow: var(--sel-edge); color: var(--ink); }
.team-tchecks input, .team-days input { accent-color: var(--brand); margin: 0; }
.team-hrs-f { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; min-width: 0; }
.team-hrs-f legend { padding: 0; margin-bottom: 6px; font-size: 12.5px; font-weight: 500; }
.team-hrs-mode { display: inline-flex; width: max-content; max-width: 100%; }
.team-hrs-mode label { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 10px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.team-hrs-mode label.on { background: var(--sel-raise); box-shadow: var(--sel-edge); color: var(--ink); font-weight: 500; }
.team-hrs-mode input { position: absolute; opacity: 0; pointer-events: none; }
.team-hrs-mode label:has(input:focus-visible) { outline: 2px solid var(--sel-ic); outline-offset: -2px; }
.team-hrs-set { display: grid; gap: 8px; transition: opacity .15s var(--ease); }
.team-hrs-f:has(input[name=mode][value=any]:checked) .team-hrs-set { opacity: .45; pointer-events: none; }
.team-days { display: flex; flex-wrap: wrap; gap: 6px; }
.team-times { display: flex; gap: 10px; flex-wrap: wrap; }
.team-times label { display: grid; gap: 4px; font-size: 12px; color: var(--ink-3); width: 140px; }
.team-hrs-f small { font-size: 12px; }
@media (max-width: 640px) {
  .team-proj { flex-wrap: wrap; }
  .team-proj-t { flex-basis: calc(100% - 60px); }
  .team-okbar-a { width: 100%; }
  .team-okbar-a .btn { flex: 1; justify-content: center; }
  .team-prow { flex-wrap: wrap; }
  .team-prow .team-work-t { flex-basis: calc(100% - 48px); }
  .team-prow .team-who { margin-left: 44px; }
  .team-prow .btn { margin-left: auto; }
  .team-fl2 { grid-template-columns: 1fr; }
  .team-cform { width: auto; }
  .team-nowork { flex-wrap: wrap; }
}
/* Role avatars (owner 2026-11-12): gradient tile, white glyph, glossy light, fine edge; same at every size */
.team-em.av { position: relative; overflow: hidden; color: #fff; background: linear-gradient(145deg, var(--a0) 0%, var(--a1) 78%); box-shadow: inset 0 0 0 1px rgba(255,255,255,.22), inset 0 -6px 12px -6px rgba(0,0,0,.18), 0 4px 10px -6px var(--a1); }
.team-em.av::before { content: ""; position: absolute; left: -20%; top: -45%; width: 120%; height: 80%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255,255,255,.45), rgba(255,255,255,0)); pointer-events: none; }
.team-em.av::after { content: ""; position: absolute; right: -18%; bottom: -30%; width: 70%; height: 70%; border-radius: 50%; background: rgba(255,255,255,.10); pointer-events: none; }
.team-em.av .ic { position: relative; z-index: 1; color: #fff; filter: drop-shadow(0 1px 1px rgba(0,0,0,.18)); }
.team-cluster .team-em.av, .team-who .team-em.av { box-shadow: 0 0 0 2px var(--panel), inset 0 0 0 1px rgba(255,255,255,.22), 0 6px 16px -8px var(--a1); }
/* Project teams as small cards; a team opens in a pop-up (owner 2026-11-12) */
.team-pcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 10px; margin-bottom: 20px; }
.team-pcard { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 12px 14px; border: 0; border-radius: 16px; background: var(--panel); box-shadow: var(--shadow-card, 0 1px 2px rgba(0,0,0,.04)); font: inherit; color: inherit; text-align: left; cursor: pointer; }
.team-pcard:hover { box-shadow: var(--shadow-card, 0 1px 2px rgba(0,0,0,.04)), inset 0 0 0 1px var(--line-2); transform: none; }
.team-pcard .team-work-t { flex: 1; min-width: 0; } .team-pcard .team-work-t b { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .team-pcard .team-work-t small { font-size: 12px; color: var(--ink-3); }
.team-pcard-i { flex: none; }
.team-popm { width: min(980px, calc(100vw - 32px)); max-height: calc(100vh - 64px); display: flex; flex-direction: column; padding: 0 !important; overflow: hidden; }
.team-pop-h { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.team-pop-h .team-work-t b { display: block; font-weight: 500; font-size: 15px; } .team-pop-h .team-work-t small { font-size: 12px; color: var(--ink-3); }
.team-pop-b { overflow: auto; padding: 14px 16px 18px; }
.team-pbar { margin-bottom: 8px; }
.team-popm .team-pop-b > .team-proj, .team-pop-b .team-proj:first-child { display: none; }
