/* Hiro Connect extends the existing Customer Account > Connections view. */
.hiro-connect-root{margin-top:18px;padding:18px;border:1px solid var(--acc-line);border-radius:16px;background:var(--acc-card);color:var(--acc-text)}
.hiro-connect-heading h3{margin:0 0 5px;font-size:1.15rem;line-height:1.45}
.hiro-connect-heading p,.hiro-connect-hint,.hiro-connect-footnote{color:var(--acc-muted);font-size:.82rem;line-height:1.8;margin:0 0 14px}
.hiro-connect-label{display:block;font-size:.83rem;font-weight:700;margin:10px 0 6px}
.hiro-connect-root textarea,.hiro-connect-root input[type=search]{box-sizing:border-box;width:100%;max-width:100%;min-height:43px;border:1px solid var(--acc-line);border-radius:11px;padding:11px 12px;background:var(--acc-bg);color:var(--acc-text);font:inherit;font-size:.87rem;resize:vertical}
.hiro-connect-root textarea:focus-visible,.hiro-connect-root input:focus-visible,.hiro-connect-root button:focus-visible,.hiro-connect-action:focus-visible{outline:2px solid var(--acc-accent);outline-offset:2px}
.hiro-connect-controls{margin-top:22px}
.hiro-connect-recommend-title{font-size:.89rem;font-weight:800;margin:16px 0 9px}
.hiro-connect-filters{display:flex;flex-wrap:wrap;gap:7px;margin:13px 0}
.hiro-connect-filters button{border:1px solid var(--acc-line);border-radius:10px;background:var(--acc-bg);color:var(--acc-text);font:inherit;font-size:.79rem;padding:8px 10px;cursor:pointer}
.hiro-connect-filters button.active{background:var(--acc-accent-soft);border-color:var(--acc-accent);color:var(--acc-accent)}
.hiro-connect-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.hiro-connect-card{display:flex;flex-direction:column;min-width:0;gap:9px;padding:13px;border:1px solid var(--acc-line);border-radius:13px;background:var(--acc-bg)}
.hiro-connect-card-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.hiro-connect-card-head strong{overflow-wrap:anywhere;font-size:.88rem}
.hiro-connect-card-head small{color:var(--acc-muted);font-weight:600}
.hiro-connect-card p{font-size:.79rem;line-height:1.55;color:var(--acc-muted);margin:0}
.hiro-connect-card-bottom{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;margin-top:auto}
.hiro-connect-state{font-size:.7rem;line-height:1.5;color:var(--acc-muted)}
.hiro-connect-state.is-available{color:var(--acc-accent)}
.hiro-connect-action{display:inline-flex;align-items:center;min-height:33px;border-radius:9px;padding:7px 11px;background:var(--acc-accent);color:#fff;font-size:.74rem;font-weight:700;text-decoration:none}
.hiro-connect-unavailable{font-size:.69rem;color:var(--acc-muted)}
.hiro-connect-footnote{margin:17px 0 0}
@media(max-width:680px){.hiro-connect-root{padding:13px}.hiro-connect-list{grid-template-columns:1fr}.hiro-connect-filters{flex-wrap:nowrap;overflow-x:auto}.hiro-connect-filters button{flex:0 0 auto}}

/* Optional, bounded Hiro Agent composer recommendations; no OAuth claim here. */
.hiro-connect-context{padding:8px 10px;margin:7px 0 10px;border:1px solid #dae4ee;border-radius:10px;background:#f5f9fd;color:#344c65;font-size:.73rem;line-height:1.5}
.hiro-connect-context-head{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:7px;padding-bottom:5px}
.hiro-connect-context-head b{font-size:.78rem;color:#235b9d}
.hiro-connect-context-head span{color:#607589}
.hiro-connect-context-item{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;padding:4px 0;border-top:1px solid #e0e8f0}
.hiro-connect-context-item span{font-weight:700}
.hiro-connect-context-item small{color:#748494;font-size:.67rem}
.hiro-connect-context-item button{min-height:28px;border:1px solid #a9c9ec;border-radius:8px;padding:4px 8px;background:#e9f3ff;color:#174b82;font:inherit;font-weight:700;cursor:pointer}
.hiro-connect-context-item button:focus-visible{outline:2px solid #166ee8;outline-offset:2px}
@media(max-width:640px){.hiro-connect-context{padding:6px 8px;margin:5px 0 7px;font-size:.69rem}}

/* Customer-owned GitHub App connection and per-project resource binding. */
.hcx-account-github{margin-top:18px;padding:15px;border:1px solid var(--acc-line);border-radius:13px;background:var(--acc-bg)}
.hcx-account-github h4,.hcx-account-github h5{margin:6px 0 12px;font-size:.94rem}
.hcx-account-github p{font-size:.79rem;line-height:1.6;color:var(--acc-muted)}
.hcx-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:space-between;border-top:1px solid var(--acc-line);padding:9px 0;min-width:0}
.hcx-row>span,.hcx-row>b{overflow-wrap:anywhere;min-width:0;max-width:100%;font-size:.81rem}
.hcx-row>small{color:var(--acc-muted)}
.hcx-row select{max-width:min(300px,100%);min-height:35px;border:1px solid var(--acc-line);border-radius:8px;background:var(--acc-card);color:var(--acc-text)}
.hcx-row button{border:1px solid var(--acc-line);border-radius:8px;min-height:34px;background:var(--acc-card);color:var(--acc-text);padding:6px 10px;font:inherit;font-size:.78rem;cursor:pointer}
.hcx-row button:disabled{opacity:.5;cursor:wait}
.hcx-error{color:#b83b44!important;font-weight:650}
@media(max-width:680px){.hcx-account-github{padding:10px}.hcx-row select{width:100%;max-width:100%}}

/* Stable native scoped-key editor: full-width, mobile-sized controls and touch consent. */
.hcx-key-editor{display:flex;flex-direction:column;gap:12px;width:100%;min-width:0;max-width:100%;margin:0}
.hcx-key-field{display:flex;flex-direction:column;gap:6px;min-width:0;font-size:.85rem;font-weight:600}
.hcx-key-editor .hcx-key-field input{display:block;box-sizing:border-box;width:100%;max-width:100%;min-width:0;min-height:48px;border:1px solid var(--acc-line);border-radius:10px;padding:10px 12px;background:var(--acc-card);color:var(--acc-text);font:inherit;font-size:16px;text-align:left;direction:ltr;user-select:text;touch-action:manipulation;pointer-events:auto}
.hcx-key-editor .hcx-key-consent{display:flex;align-items:flex-start;gap:10px;min-height:44px;padding:7px 0;font-size:.82rem;line-height:1.6;cursor:pointer;touch-action:manipulation}
.hcx-key-editor .hcx-key-consent input{appearance:auto;flex:0 0 22px;width:22px;height:22px;margin:2px 0 0;accent-color:var(--acc-accent);pointer-events:auto;touch-action:manipulation}
.hcx-key-editor .hiro-connect-action{min-height:44px;justify-content:center;touch-action:manipulation}

/* HCX-013H: compact normal connection; project controls only on demand. */
.hcx-key-compact{align-items:stretch;flex-direction:column;gap:8px;width:100%;min-width:0}.hcx-key-compact .hiro-connect-action{justify-content:center;min-height:44px}.hcx-key-secondary{background:transparent;color:var(--acc-text);border:1px solid var(--acc-line);border-radius:9px;padding:8px 10px;min-height:40px;font:inherit;font-size:.79rem;cursor:pointer}.hcx-key-secondary:disabled,.hcx-key-compact button:disabled{opacity:.55;cursor:default}.hcx-key-projects{display:grid;gap:10px;padding-top:10px;border-top:1px solid var(--acc-line);min-width:0}.hcx-key-projects select{width:100%;min-width:0;max-width:100%;min-height:44px;padding:8px;border-radius:9px;border:1px solid var(--acc-line);background:var(--acc-card);color:var(--acc-text);font:inherit;font-size:16px}.hcx-key-binding{display:grid;gap:6px;padding-top:8px;border-top:1px solid var(--acc-line);overflow-wrap:anywhere}

/* HCX-014A: catalog surface. Provider controls live only in native modal dialogs. */
.hcx-catalog{padding:clamp(12px,2vw,22px)}.hcx-catalog .hiro-connect-heading{margin-bottom:14px}.hcx-catalog #hiro-connect-search{font-size:16px;min-height:44px}.hcx-catalog-list{display:flex!important;flex-direction:column;gap:8px}.hcx-catalog-row{display:grid!important;grid-template-columns:42px minmax(0,1fr) auto;gap:12px;align-items:center;padding:12px;min-height:80px}.hcx-catalog-row[hidden]{display:none!important}.hcx-provider-mark{width:42px;height:42px;display:grid;place-items:center;background:var(--acc-accent-soft);color:var(--acc-accent);border:1px solid var(--acc-line);border-radius:12px;font-weight:800;font-size:.82rem;direction:ltr}.hcx-provider-mark[data-provider="github"],.hcx-provider-mark[data-provider="vercel"]{background:#242b36;color:#fff}.hcx-provider-mark[data-provider="cloudflare"]{background:#fef1df;color:#c35b0a}.hcx-provider-mark[data-provider="supabase"]{background:#e3f6ed;color:#167d50}.hcx-provider-mark[data-provider="render"]{background:#ede5ff;color:#5d36b5}.hcx-row-info{display:grid;gap:3px;min-width:0}.hcx-row-info strong{font-size:.9rem;overflow-wrap:anywhere}.hcx-row-info p{font-size:.72rem;overflow-wrap:anywhere}.hcx-catalog-status{font-size:.72rem;color:var(--acc-muted);line-height:1.35}.hcx-catalog-status[data-state="connected"]{color:#20834f;font-weight:700}.hcx-catalog-status[data-state="stored"],.hcx-catalog-status[data-state="attention"]{color:var(--acc-text)}.hcx-catalog-actions{display:flex;align-items:center;gap:10px}.hcx-toggle{position:relative;display:block;width:44px;height:26px;padding:0;border:0;border-radius:30px;background:#8793a0;cursor:pointer;flex:none;direction:ltr}.hcx-toggle-knob{position:absolute;top:3px;left:3px;width:20px;height:20px;background:#fff;border-radius:50%;box-shadow:0 1px 3px #0003;transition:transform .16s}.hcx-toggle[data-state="connected"]{background:#228b57}.hcx-toggle[data-state="connected"] .hcx-toggle-knob,.hcx-toggle[data-state="stored"] .hcx-toggle-knob{transform:translateX(18px)}.hcx-toggle[data-state="stored"]{background:#a58c56}.hcx-toggle:disabled,.hcx-manage:disabled{opacity:.48;cursor:default}.hcx-manage,.hcx-dialog-close{font:inherit;font-size:.76rem;color:var(--acc-text);background:var(--acc-card);border:1px solid var(--acc-line);border-radius:9px;padding:8px 12px;min-height:36px;cursor:pointer}.hcx-toggle:focus-visible,.hcx-manage:focus-visible,.hcx-dialog-close:focus-visible{outline:2px solid var(--acc-accent);outline-offset:3px}
.hcx-provider-dialog{width:min(520px,calc(100vw - 24px));max-height:calc(100dvh - 24px);margin:auto;padding:22px;border:1px solid var(--acc-line);border-radius:20px;background:var(--acc-card);color:var(--acc-text);box-shadow:0 24px 80px #0005;overflow:auto;overscroll-behavior:contain;box-sizing:border-box}.hcx-provider-dialog:not([open]){display:none}.hcx-provider-dialog::backdrop{background:#080f1ba0;backdrop-filter:blur(3px)}.hcx-dialog-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}.hcx-dialog-head h3{margin:0;font-size:1.12rem;line-height:1.4}.hcx-dialog-intro{margin:0 0 16px!important;color:var(--acc-muted);font-size:.86rem!important;line-height:1.7!important}.hcx-dialog-body{display:grid;gap:12px;min-width:0}.hcx-dialog-body .hiro-connect-card-bottom{display:flex;flex-direction:column;align-items:stretch;gap:10px;margin:0}.hcx-dialog-body .hiro-connect-action{justify-content:center;min-height:44px;cursor:pointer}.hcx-dialog-body label{display:grid;gap:6px;min-width:0}.hcx-dialog-body select{width:100%;min-width:0;max-width:100%;min-height:44px;font-size:16px}.hcx-dialog-body p,.hcx-dialog-body span{overflow-wrap:anywhere}.hcx-dialog-body .hcx-account-github{margin:0}.hcx-provider-dialog[data-mode="connect"] [data-hcx-mode]:not([data-hcx-mode~="connect"]),.hcx-provider-dialog[data-mode="manage"] [data-hcx-mode]:not([data-hcx-mode~="manage"]),.hcx-provider-dialog[data-mode="disconnect"] [data-hcx-mode]:not([data-hcx-mode~="disconnect"]){display:none!important}
@media(max-width:520px){.hcx-catalog-row{grid-template-columns:36px minmax(0,1fr) auto;gap:8px;padding:10px}.hcx-provider-mark{width:36px;height:36px;border-radius:10px}.hcx-catalog-actions{flex-direction:column;gap:4px}.hcx-manage{min-height:32px;padding:5px 8px;font-size:.71rem}.hcx-provider-dialog{width:calc(100vw - 16px);padding:16px;max-height:calc(100dvh - 16px)}}

.hcx-provider-dialog [data-hcx-mode="legacy"],.hcx-provider-dialog [data-hcx-render-action="close_manage"]{display:none!important}.hcx-catalog-actions .hcx-toggle{min-width:44px;min-height:26px}.hcx-catalog-actions .hcx-toggle::before{content:"";position:absolute;inset:-8px -4px}.hcx-dialog-body .hcx-row{gap:10px}.hcx-dialog-body .hcx-row select{max-width:100%}.hcx-dialog-body .hcx-row button{min-height:40px}

.hcx-dialog-close:disabled{opacity:.5;cursor:default}.hcx-provider-dialog[open]{scrollbar-gutter:stable}.hcx-catalog-status[data-state="checking"]{font-style:italic}.hcx-toggle[aria-busy="true"] .hcx-toggle-knob{opacity:.65}@media(prefers-reduced-motion:reduce){.hcx-toggle-knob{transition:none}}

/* HCX-014D: brand vectors on neutral tiles, fixed optical sizes. */
.hcx-catalog .hcx-catalog-row{grid-template-columns:46px minmax(0,1fr) auto}.hcx-catalog .hcx-provider-mark{width:46px;height:46px;box-sizing:border-box;display:flex;align-items:center;justify-content:center;flex:none;overflow:hidden;background:#fff;color:#181717;border:1px solid #dce0e6;border-radius:12px;padding:8px}.hcx-provider-mark img{display:block;width:28px;height:28px;max-width:100%;object-fit:contain;flex:none}.hcx-catalog .hcx-provider-mark.hcx-brand-group{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:3px;padding:6px}.hcx-brand-group img{width:100%;height:16px;object-fit:contain}.hcx-brand-group img:first-child:nth-last-child(3){grid-column:1/-1;width:16px;justify-self:center}.hcx-dialog-identity{display:flex;align-items:center;gap:12px;min-width:0}.hcx-dialog-identity .hcx-provider-mark{width:44px;height:44px}.hcx-dialog-identity h3{overflow-wrap:anywhere}@media(max-width:520px){.hcx-catalog .hcx-catalog-row{grid-template-columns:42px minmax(0,1fr) auto}.hcx-catalog .hcx-provider-mark{width:42px;height:42px;padding:7px}.hcx-provider-mark img{width:26px;height:26px}.hcx-catalog .hcx-provider-mark.hcx-brand-group{padding:5px;gap:2px}.hcx-brand-group img{width:100%;height:15px}}

/* HCX-018J: native mobile Gmail text entry inside the existing dialog. */
.hcx-dialog-body .hcx-gmail-field{display:flex;flex-direction:column;gap:6px;width:100%;min-width:0}.hcx-dialog-body .hcx-gmail-field input,.hcx-dialog-body .hcx-gmail-field textarea{display:block;box-sizing:border-box;width:100%;max-width:100%;min-width:0;min-height:48px;border:1px solid var(--acc-line);border-radius:10px;padding:10px 12px;background:var(--acc-card);color:var(--acc-text);font:inherit;font-size:16px;user-select:text;-webkit-user-select:text;touch-action:manipulation;pointer-events:auto;caret-color:var(--acc-text)}.hcx-dialog-body .hcx-gmail-field textarea{min-height:112px;resize:vertical}

/* HCX consolidated: a single calm list; provider configuration remains in dialogs. */
.hcx-catalog{display:grid;gap:12px;padding:clamp(12px,2vw,20px)}
.hcx-catalog .hiro-connect-heading{margin:0}
.hcx-catalog .hiro-connect-heading h3{margin:0 0 4px;font-size:1.25rem}
.hcx-catalog .hiro-connect-heading p{margin:0;font-size:.86rem}
.hcx-catalog .hcx-catalog-row{grid-template-columns:44px minmax(0,1fr) auto;min-height:84px;gap:12px;padding:12px 14px;border-radius:14px;background:var(--acc-card);box-sizing:border-box}
.hcx-catalog .hcx-provider-mark{width:44px;height:44px;flex-shrink:0}
.hcx-catalog .hcx-row-info{gap:4px}
.hcx-catalog .hcx-row-info strong{font-size:.96rem;line-height:1.35}
.hcx-catalog .hcx-row-info p{font-size:.8rem;line-height:1.55}
.hcx-catalog .hcx-catalog-status{font-size:.77rem;line-height:1.45}
.hcx-catalog .hcx-catalog-status[data-state="connected"]{color:#20834f}
.hcx-catalog .hcx-manage{min-height:44px;max-width:118px;white-space:normal;overflow-wrap:anywhere}
.hcx-catalog .hcx-toggle{min-width:44px;min-height:26px;margin-block:9px}
.hcx-catalog .hcx-upcoming{border:1px solid var(--acc-line);border-radius:14px;padding:0 12px}
.hcx-catalog .hcx-upcoming summary{cursor:pointer;min-height:44px;padding:12px 0;box-sizing:border-box;font:inherit;font-weight:650;color:var(--acc-text)}
.hcx-catalog .hcx-upcoming[open]{padding-bottom:12px}
.hcx-catalog .hcx-upcoming[open]>summary{margin-bottom:4px}
.hcx-catalog .hcx-upcoming .hcx-catalog-row{background:var(--acc-bg);min-height:76px}
.hcx-catalog .hcx-catalog-actions:has(>[hidden]:first-child):has(>[hidden]:last-child){display:none}
.hcx-catalog .hcx-catalog-row[data-hcx-release-mode="coming_soon"]{grid-template-columns:44px minmax(0,1fr)}
.hcx-catalog .hcx-empty{color:var(--acc-muted);font-size:.85rem;padding:8px 0;margin:0}
.hcx-catalog :is(summary,button,input):focus-visible{outline:2px solid var(--acc-accent);outline-offset:3px}
.hcx-catalog [hidden]{display:none!important}
@media(max-width:520px){.hcx-catalog{padding:12px;gap:10px}.hcx-catalog .hcx-catalog-row{grid-template-columns:40px minmax(0,1fr) auto;gap:8px;padding:10px;min-height:80px}.hcx-catalog .hcx-catalog-row[data-hcx-release-mode="coming_soon"]{grid-template-columns:40px minmax(0,1fr)}.hcx-catalog .hcx-provider-mark{width:40px;height:40px}.hcx-catalog .hcx-manage{min-height:44px;max-width:92px}.hcx-catalog .hcx-upcoming{padding-inline:8px}}

/* Cloudflare in-dialog selectors: no native popup or external overlay. */
.hcx-cf-picker{display:grid;gap:6px;min-width:0;margin:10px 0}.hcx-cf-picker-toggle,.hcx-cf-picker-option{box-sizing:border-box;width:100%;min-width:0;min-height:44px;padding:10px 12px;border:1px solid var(--acc-line);border-radius:8px;background:var(--acc-card);color:var(--acc-text);font:inherit;text-align:start;overflow-wrap:anywhere;cursor:pointer;touch-action:manipulation}.hcx-cf-picker-toggle::after{content:'▾';float:inline-end;margin-inline-start:8px}.hcx-cf-picker-toggle[aria-expanded=true]::after{content:'▴'}.hcx-cf-picker-list{display:grid;gap:4px;max-height:240px;overflow:auto;overscroll-behavior:contain}.hcx-cf-picker-list[hidden]{display:none}.hcx-cf-picker-option[aria-pressed=true]{border-color:var(--acc-accent);outline:1px solid var(--acc-accent)}.hcx-cf-picker button:disabled{opacity:.55;cursor:default}
