/* dashboard-workspace.css - page rules for Connections (.conn-), Team (.team-) and Developers (.dev-).
   Layout only: the surfaces, buttons, fields, rows, tables, chips and marks come from dashboard.css. Colours are theme
   tokens. Calm round, 2026-11-26 (u-polish B3): sections sit on the desk with no frames, the page's one primary
   button is its only gold, a row's second actions are quiet text buttons, and what most people never need waits in
   a disclosure. */

/* ---------- shared bits of the three pages ---------- */
.conn-intro,.team-note{margin:0 0 var(--d-gap)}
.conn-section h2:focus:not(:focus-visible),.team-section h2:focus:not(:focus-visible),.dev-section h2:focus:not(:focus-visible),.conn-name:focus:not(:focus-visible){outline:none}
.conn-summary,.team-count,.dev-count{font:400 13px/1.2 var(--d-body);letter-spacing:0;text-transform:none;color:var(--muted)}
.conn-trouble,.team-trouble,.dev-trouble{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px 16px;padding:16px 0}
.conn-trouble p,.team-trouble p,.dev-trouble p{display:flex;align-items:flex-start;gap:8px;margin:0;font-size:13px;color:var(--text)}
.team-people-body > .skeleton,.dev-ai-body > .skeleton,.dev-keys-body > .skeleton{margin:14px 0}

/* A row's second actions: small muted words, underlined, never gold. */
.conn-acts .btn.link,.team-acts .btn.link,.dev-acts-cell .btn.link,.dev-ai-row .btn.link{min-height:28px;padding:0 2px;color:var(--muted);font-size:12.5px}
.conn-acts .btn.link:hover,.team-acts .btn.link:hover,.dev-acts-cell .btn.link:hover,.dev-ai-row .btn.link:hover{color:var(--text)}

/* Disclosures: a quiet line with a chevron that turns when it opens. */
.conn-more,.team-roles-more,.dev-setup,.dev-ref,.dev-new-key{margin:0}
.conn-more > summary,.team-roles-more > summary,.dev-setup > summary,.dev-ref > summary,.dev-new-key > summary{display:flex;align-items:center;gap:8px;width:max-content;max-width:100%;min-height:40px;color:var(--text);font-size:13px;list-style:none;cursor:pointer}
.conn-more > summary::-webkit-details-marker,.team-roles-more > summary::-webkit-details-marker,.dev-setup > summary::-webkit-details-marker,.dev-ref > summary::-webkit-details-marker,.dev-new-key > summary::-webkit-details-marker{display:none}
.conn-more > summary .icon,.team-roles-more > summary .icon,.dev-setup > summary .icon,.dev-ref > summary .icon,.dev-new-key > summary .icon{color:var(--muted)}
.conn-more[open] > summary .icon,.team-roles-more[open] > summary .icon,.dev-setup[open] > summary .icon,.dev-ref[open] > summary .icon,.dev-new-key[open] > summary .icon{transform:rotate(90deg)}
.conn-more > summary:hover,.team-roles-more > summary:hover,.dev-setup > summary:hover,.dev-ref > summary:hover,.dev-new-key > summary:hover{text-decoration:underline;text-underline-offset:3px}

/* ---------- Connections: large tiles, as on /account ---------- */
.conn-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:32px 24px;margin:0;padding:8px 0 0;list-style:none}
.conn-row{display:flex;flex-direction:column;align-items:center;gap:6px;min-width:0;text-align:center}
/* As tall as YouTube's icon file at 100 px, so every tile's name sits on the same line across a row. */
.conn-mark{display:flex;align-items:center;justify-content:center;width:100%;height:186px;margin:0 0 4px}
/* On a light theme a white mark sits on an ink chip. YouTube's file carries its clear space as a transparent margin,
   so its chip would be the whole file: drawn only over the icon plus the chip's usual edge, it matches the others.
   The layout, and so the clear space, keeps the whole file. The icon fills rows 248 to 826 of 1075 and columns 214 to
   1040 of 1255. */
.conn-mark .mark-chip > .mark-yt{clip-path:inset(15.1% 10.2%)}
.conn-row[data-state="unavailable"] .conn-mark,.conn-row[data-state="loading"] .conn-mark{opacity:.6}
.section h3.conn-name{margin:0;font-size:16px;line-height:1.25;color:var(--text)}
.conn-state{margin:0}
.conn-who{max-width:100%;margin:0;font-size:13px;line-height:1.4;color:var(--text);overflow-wrap:anywhere}
.conn-note{max-width:34ch;margin:0;font-size:12.5px;line-height:1.45;color:var(--muted)}
.conn-note a{color:var(--text)}
.conn-before{max-width:34ch;font-size:12.5px;color:var(--muted)}
.conn-before > summary{width:max-content;max-width:100%;margin:0 auto;cursor:pointer}
.conn-before > summary:hover{color:var(--text)}
.conn-before p{margin:6px 0 0}
.conn-acts{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px 16px;margin-top:6px}
.conn-details{margin-top:var(--d-section)}
.conn-d-list > li{flex-wrap:wrap;align-items:baseline;gap:2px 24px}
.conn-d-name{flex:0 0 140px;color:var(--text)}
.conn-d-facts{flex:1 1 360px;min-width:0;max-width:110ch;font-size:13px;color:var(--muted)}
.conn-dialog p{margin:0 0 8px}
.conn-dialog p:last-child{margin-bottom:0}

/* ---------- Team ---------- */
.team-meta{margin:0 0 var(--d-gap);font-size:14px;color:var(--muted)}
.team-ws-name{color:var(--text)}
.team-people td{overflow-wrap:anywhere}
.team-email{color:var(--text)}
.team-role-cell{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
/* A role reads as words with a chevron; its box shows on hover and focus. */
.team-people .team-role{width:auto;min-width:128px;margin-left:-11px;border-color:transparent;background-color:transparent}
.team-people .team-role:hover{border-color:var(--d-edge)}
.team-people .team-role:focus{border-color:var(--accent)}
.team-status{color:var(--muted)}
.team-acts{display:flex;flex-wrap:nowrap;justify-content:flex-end;align-items:center;gap:20px}
.team-acts-cell{width:1%;white-space:nowrap}
.team-invite-wrap{margin-top:var(--d-gap)}
.team-invite{display:grid;grid-template-columns:minmax(0,360px) minmax(0,160px) auto;align-items:end;gap:12px 16px}
.team-invite .field{margin:0}
.team-form-err{grid-column:1 / -1;margin:0;font:600 12.5px/1.35 var(--d-body);color:var(--text)}
.team-invite-result:empty{display:none}
.team-invite-result{max-width:640px;margin-top:16px}
.team-invite-result .note{margin:0 0 8px}
.team-link,.dev-copyrow{display:flex;align-items:center;gap:8px;min-width:0}
.team-link input,.dev-copyrow input{flex:1 1 auto;min-width:0;width:100%}
.team-settings{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,260px),360px));align-items:start;gap:0 40px}
.team-settings .field{margin:0 0 20px}
.team-approval .check{min-height:36px}
.team-form-acts,.dev-form-acts{grid-column:1 / -1;display:flex;flex-wrap:wrap;gap:8px}
.team-facts{display:flex;flex-wrap:wrap;gap:16px 48px}
.team-fact{display:grid;gap:6px;font-size:14px}
.team-roles td{vertical-align:top}
.team-role-name{width:120px;white-space:nowrap;color:var(--text)}
.team-roles-more .table-wrap{margin:8px 0 0}
.team-grid{align-items:start}
.team-ws-list > li{justify-content:space-between}
.team-ws-main{display:grid;gap:2px;min-width:0}
.team-ws-title{font-size:14px;color:var(--text);overflow-wrap:anywhere}
.team-ws.is-picked .micro{color:var(--text)}

/* ---------- Developers ---------- */
.dev-mcp-field{max-width:640px;margin:0 0 12px}
.dev-mcp-state p{margin:0 0 12px}
.dev-ok{display:flex;flex-wrap:wrap;align-items:center;gap:8px;font-size:13px;color:var(--muted)}
.dev-warn{display:flex;align-items:flex-start;gap:8px;max-width:72ch;margin:12px 0 0;font-size:13px;line-height:1.45;color:var(--text)}
.dev-warn .icon{margin-top:1px}
.dev-setup .note{margin:4px 0 0}
.dev-setup h3{margin:16px 0 8px}
.dev-snippet{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:8px}
.dev-snippet pre,.dev-brief pre{min-width:0;max-width:100%;margin:0;padding:12px 14px;overflow:auto;background:var(--field);border:0;color:var(--text);line-height:1.5}
.dev-snippet pre{white-space:pre-wrap;overflow-wrap:anywhere}
.dev-snippet code,.dev-brief code{font:inherit;color:inherit}
.dev-none{margin:12px 0 0}
.dev-ai > li{justify-content:space-between}
.dev-ai-main{display:grid;gap:2px;min-width:0}
.dev-ai-name{font-size:14px;color:var(--text);overflow-wrap:anywhere}
.dev-keys-body > .table-wrap{margin:8px 0 0}
.dev-keys td{overflow-wrap:anywhere}
.dev-key-name{color:var(--text)}
.dev-prefix{white-space:nowrap}
.dev-acts-cell{width:1%;text-align:right;white-space:nowrap}
.dev-new-key{margin-top:16px}
.dev-key-form{padding:8px 0 0}
.dev-key-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 var(--d-gap)}
.dev-scopes{display:grid;gap:10px}
.dev-scope{align-items:flex-start}
.dev-scope input{margin-top:2px}
.dev-scope > span{display:grid;gap:1px}
.dev-scope-title{font-size:14px;color:var(--text)}
.dev-scope .hint{font-size:12px;color:var(--muted)}
.dev-secret p{margin:0 0 10px}
.dev-secret .dev-warn{margin:12px 0 0}
.dev-ref{border-top:1px solid var(--line)}
.dev-ref:last-of-type{border-bottom:1px solid var(--line)}
.dev-ref > .table-wrap,.dev-ref > .dev-list{margin:4px 0 16px}
.dev-routes h3{margin:12px 0 4px;font-size:14px}
.dev-brief-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 16px;margin:4px 0 12px}
.dev-brief-head .note{margin:0}
.dev-brief pre{max-height:320px;margin:0 0 16px;white-space:pre-wrap;overflow-wrap:anywhere}
.dev-ref-table td{vertical-align:top}
.dev-ref-table code{white-space:nowrap}
.dev-list{max-width:80ch;padding-left:18px;list-style:square;font-size:13px}
.dev-list li{margin:0 0 6px;overflow-wrap:anywhere}
.dev-list li::marker{color:var(--muted)}
.dev-later{margin:16px 0 0}

/* ---------- phone width ---------- */
@media (max-width:640px){
  .team-invite{grid-template-columns:minmax(0,1fr)}
  .team-acts{flex-wrap:wrap;justify-content:flex-start}
  .team-acts-cell,.dev-acts-cell{width:100%;text-align:left;white-space:normal}
  .table.stack td.team-acts-cell:empty{display:none}
  .team-people .team-role{flex:1 1 auto;min-width:0}
  .team-ws-list > li,.dev-ai > li{flex-wrap:wrap}
  .team-roles thead,.dev-ref-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
  .team-roles,.team-roles tbody,.team-roles tr,.team-roles td,.dev-ref-table,.dev-ref-table tbody,.dev-ref-table tr,.dev-ref-table td{display:block;width:100%}
  .team-roles tr,.dev-ref-table tr{padding:8px 0;border-bottom:1px solid var(--line)}
  .team-roles tbody tr:last-child,.dev-ref-table tbody tr:last-child{border-bottom:0}
  .team-roles td,.dev-ref-table td{height:auto;padding:2px 0;border:0}
  .dev-ref-table td:not(:last-child){display:inline-block;width:auto;margin-right:8px}
  .dev-ref-table code{white-space:normal;overflow-wrap:anywhere}
  .dev-snippet{grid-template-columns:minmax(0,1fr)}
  .dev-snippet-acts{display:flex;justify-content:flex-end}
  .dev-key-grid{grid-template-columns:minmax(0,1fr)}
  .dev-copyrow{flex-wrap:wrap}
}
@media (max-width:540px){
  .conn-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:32px 16px}
  .conn-row[data-platform="youtube"]{grid-column:1 / -1}
  /* Bluesky's mark with its clear space is 186 px square; zoom scales the logo and the space together, never one
     without the other, to fit a half-width column. */
  .conn-row[data-platform="bluesky"] .conn-mark > .mark{zoom:.83}
}
