/* Sitalk app · components.css
 * Shared components: buttons, fields, cards, empty states and type roles.
 * Loaded after the area files so these definitions win ties with area rules.
 * Load order and ownership: docs/APP-CSS.md */

.notification-drawer .pull-refresh-indicator{
 position:sticky;
 top:0;
 width:max-content;
 max-width:100%;
 margin:auto;
 left:50%;
}

.sheet-dragging{
 transition:none!important;
 will-change:transform;
}

.notification-drawer .drawer-header{
 gap:8px;
}

@media (max-width:760px){
 .notification-drawer .drawer-heading{
  min-width:0;
 }
 .notification-drawer .drawer-header>.icon-button{
  flex:0 0 36px;
  width:36px;
 }
}
.more-platforms{
 margin-block-start:12px;
}

.more-platforms>summary svg,
.managed-connection-settings>summary svg{
 inline-size:16px;
 block-size:16px;
}

.more-platforms[open]>.platform-selector{
 margin-block-start:12px;
}

.secondary-platforms button{
 min-block-size:100px;
}

.secondary-platforms small{
 white-space:normal;
 line-height:1.5;
}

.card-checkout-section{
 display:grid;
 grid-template-columns:1fr 1fr;
 gap:28px;
 padding:28px;
 border:1px solid var(--line);
 border-radius:18px;
 background:var(--surface);
 margin-block:32px;
}

.card-checkout-section h2{
 font-size:24px;
 margin-block:8px 12px;
}

.card-checkout-section p{
 font-size:13px;
 line-height:1.7;
 color:var(--muted);
}

.card-checkout-section .button{
 inline-size:100%;
}

.card-checkout-section [role=status]:empty,
.card-checkout-section [role=alert]:empty{
 display:none;
}

@media (max-width:760px){
 .card-checkout-section{
  grid-template-columns:1fr;
  padding:20px;
  gap:16px;
 }
}
.type-heading{
 font-family:var(--font);
 font-weight:600;
 text-wrap:balance;
 overflow-wrap:anywhere;
 margin:0;
}

.account-body :is(main,dialog) .type-page{
 font-size:var(--type-page);
 line-height:1.18;
 letter-spacing:-.025em;
}

.account-body :is(main,dialog) .type-section{
 font-size:var(--type-section);
 line-height:1.4;
 letter-spacing:normal;
}

.account-body :is(main,dialog) .type-subsection,
.account-body :is(main,dialog) .type-compact{
 font-size:var(--type-subsection);
 line-height:1.4;
 letter-spacing:normal;
}

.type-text{
 font-family:var(--font);
 line-height:1.6;
 text-wrap:pretty;
 overflow-wrap:anywhere;
 letter-spacing:normal;
}

.type-body,
.type-description{
 font-size:var(--type-body);
}

.type-description{
 max-inline-size:70ch;
}

.type-caption{
 font-size:var(--type-caption);
 line-height:1.6;
}

.type-muted{
 color:var(--muted);
}

.account-body :is(main,dialog) :is(h2,h3,h4,h5,h6){
 letter-spacing:normal;
}

.account-body .app-heading .type-description{
 font-size:var(--type-body);
 line-height:1.6;
 margin-block-start:12px;
}

.account-body :is(time,.repository-row-meta,.repository-revision,.home-metric,.notification-count){
 font-variant-numeric:tabular-nums;
}

.account-body :is(.section-row,.app-heading,.social-heading)>div{
 min-inline-size:0;
}

@media (max-width:760px){
 .app-location>.sidebar-toggle,
 .social-heading>.sidebar-toggle,
 .workspace-stage>.sidebar-toggle{
  display:none;
 }
}

@media (max-width:1250px){
 /* The existing forum layout omits its secondary column below 1250px. */
 .social-heading>.sidebar-toggle[data-sidebar-toggle=topics]{
  display:none;
 }
}
.account-body .repository-page>.app-heading{
 margin:0;
}

.repository-page .repository-connect-actions .text-link.danger{
 color:var(--danger);
}

.repository-page .repository-list>.section-row{
 display:flex;
 align-items:baseline;
 justify-content:space-between;
 gap:var(--ds-space-3);
 margin:0;
}

.repository-page .repository-list>.section-row>span{
 color:var(--muted);
 font-variant-numeric:tabular-nums;
}

.repository-page .repository-option>.platform-emblem,
.repository-page .repository-option>.repository-brand{
 inline-size:20px;
 block-size:20px;
 display:block;
}

.repository-page .repository-file-panel>.section-row{
 display:flex;
 flex-wrap:wrap;
 align-items:baseline;
 justify-content:space-between;
 gap:var(--ds-space-2) var(--ds-space-3);
 margin:0;
}

.repository-page .repository-review :is(.section-row,.repository-selection-actions){
 display:flex;
 flex-wrap:wrap;
 align-items:baseline;
 justify-content:space-between;
 gap:var(--ds-space-3);
}

/* Buttons: one size and weight scale. Variants change colour only. */
.account-body .button{
 display:inline-flex;
 align-items:center;
 justify-content:center;
 gap:var(--ds-space-2);
 min-block-size:var(--ds-control-md);
 padding:0 var(--ds-space-4);
 border:1px solid var(--accent-solid);
 border-radius:var(--ds-radius-control);
 background:var(--accent-solid);
 color:var(--accent-on);
 font:inherit;
 font-size:var(--ds-font-control);
 font-weight:600;
 line-height:1.2;
 white-space:nowrap;
 text-decoration:none;
 cursor:pointer;
 transition:background var(--motion-fast) var(--ease-out),border-color var(--motion-fast) var(--ease-out),transform var(--motion-fast) var(--ease-out);
}

.account-body .button>.ui-icon{
 inline-size:18px;
 block-size:18px;
 flex-shrink:0;
}

.account-body .button:active{
 transform:translateY(1px);
}

.account-body .button:disabled{
 opacity:.5;
 cursor:not-allowed;
 transform:none;
}

.account-body .button-outline,
.account-body .button-secondary{
 background:var(--surface);
 border-color:var(--control-border);
 color:var(--ink);
}

.account-body .button-small{
 min-block-size:var(--ds-control-sm);
 padding:0 var(--ds-space-3);
 font-size:var(--ds-font-small);
 gap:var(--ds-space-2);
}

.account-body .copy-small{
 min-block-size:var(--ds-control-sm);
 padding:0 var(--ds-space-3);
 border:1px solid var(--line);
 border-radius:var(--ds-radius-control);
 background:var(--surface-soft);
 color:var(--ink);
 font:inherit;
 font-size:var(--ds-font-small);
 font-weight:600;
 line-height:1.2;
 display:inline-flex;
 align-items:center;
 justify-content:center;
 gap:var(--ds-space-2);
 white-space:nowrap;
 cursor:pointer;
}

.account-body .button-small>.ui-icon,
.account-body .copy-small>.ui-icon,
.account-body .quiet-button>.ui-icon{
 inline-size:16px;
 block-size:16px;
 flex-shrink:0;
}

.account-body .quiet-button{
 min-block-size:var(--ds-control-sm);
 padding:0 var(--ds-space-3);
 border:0;
 border-radius:var(--ds-radius-control);
 background:transparent;
 color:var(--muted);
 font:inherit;
 font-size:var(--ds-font-small);
 line-height:1.2;
 display:inline-flex;
 align-items:center;
 justify-content:center;
 gap:var(--ds-space-2);
 cursor:pointer;
}

.account-body .danger{
 color:var(--danger);
}

.account-body .copy-small:disabled,
.account-body .quiet-button:disabled{
 opacity:.5;
 cursor:not-allowed;
}

@media (hover:hover) and (pointer:fine){
 .account-body .button:hover{
  filter:brightness(1.08);
 }
 .account-body .button-outline:hover,
 .account-body .button-secondary:hover{
  background:var(--surface-soft);
  filter:none;
 }
 .account-body .copy-small:hover{
  background:var(--surface-raised);
  filter:none;
 }
 .account-body .quiet-button:hover{
  background:var(--surface-soft);
  color:var(--ink);
 }
}
.account-body :is(a,button,summary,input,select,textarea):focus-visible{
 outline:2px solid var(--focus);
 outline-offset:3px;
}

/* Icon buttons: a single 44px control, used for theme, search, bell and dialogs. */
.account-body .icon-button{
 inline-size:var(--ds-control-md);
 block-size:var(--ds-control-md);
 min-inline-size:var(--ds-control-md);
 display:inline-grid;
 place-items:center;
 border:1px solid var(--line);
 border-radius:50%;
 background:var(--surface);
 color:var(--ink);
 font-size:20px;
 line-height:1;
 cursor:pointer;
}

.account-body .icon-button>.ui-icon{
 inline-size:18px;
 block-size:18px;
}

/* Fields: the same control height, radius and label rhythm everywhere. */
.account-body .field{
 display:flex;
 flex-direction:column;
 gap:var(--ds-space-2);
 min-inline-size:0;
}

.account-body .field label,
.account-body .field-label{
 font-size:var(--ds-font-label);
 font-weight:600;
 line-height:1.4;
}

.account-body .field input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),
.account-body .field select{
 min-block-size:var(--ds-control-md);
}

.account-body .field small,
.account-body .field-help,
.account-body .config-note,
.account-body .account-meta{
 font-size:var(--ds-font-small);
 line-height:1.6;
 color:var(--muted);
}

/* Section rhythm: one heading size and one gap between a heading and its content. */
.account-body .section-row{
 display:flex;
 flex-wrap:wrap;
 align-items:center;
 justify-content:space-between;
 gap:var(--ds-space-3);
 margin-block-end:var(--ds-space-4);
}

.account-body .section-row h2{
 font-size:16px;
 line-height:1.3;
 margin:0;
}

.account-body .section-row>span{
 font-size:var(--ds-font-small);
 color:var(--muted);
}

.account-body .section-caption{
 font-size:12px;
 line-height:1.5;
 font-weight:600;
 color:var(--muted);
}

/* Status pills share height, radius and type with every other badge. */
.account-body .presence-pill{
 display:inline-flex;
 align-items:center;
 gap:8px;
 min-block-size:24px;
 padding:0 var(--ds-space-3);
 border-radius:999px;
 font-size:12px;
 font-weight:600;
 line-height:1;
 white-space:nowrap;
}

/* Empty states: one centred pattern for every list with nothing in it. */
.account-body :is(.empty-workspace,.board-empty,.empty-people){
 display:grid;
 justify-items:center;
 align-content:center;
 gap:var(--ds-space-3);
 min-block-size:240px;
 padding:var(--ds-space-6) var(--ds-space-5);
 text-align:center;
}

.account-body :is(.empty-workspace,.board-empty,.empty-people) p{
 font-size:var(--ds-font-input);
 line-height:1.6;
 max-inline-size:46ch;
 margin:0;
 color:var(--muted);
}

.account-body :is(.empty-workspace,.board-empty,.empty-people) .button{
 margin-block-start:var(--ds-space-2);
}

@media (max-width:760px){
 /* Topbar controls keep the shared size and only compress on small screens. */
 .account-body .app-topbar .button{
  min-block-size:var(--ds-control-sm);
  padding:0 var(--ds-space-3);
  font-size:12px;
  gap:8px;
 }
 .account-body .app-topbar .button>.ui-icon{
  inline-size:16px;
  block-size:16px;
 }
 .account-body :is(.empty-workspace,.board-empty,.empty-people){
  min-block-size:200px;
  padding:var(--ds-space-5) var(--ds-space-4);
 }
}

@media (max-width:360px){
 .account-body .app-topbar .button{
  padding:0 var(--ds-space-2);
  font-size:12px;
 }
 /* The topbar holds the location plus four controls. At this width the 91px
  * wordmark gives way to the view name with ellipsis, and controls compress
  * to 36px, so the 320px viewport never scrolls sideways. The brand remains
  * in the sidebar, the account menu and every larger viewport. */
 .account-body .app-topbar .app-brand{
  display:none;
 }
 .account-body .app-topbar .app-location{
  min-inline-size:0;
  flex:1 1 auto;
 }
 .account-body .app-topbar .app-location-label{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  min-inline-size:0;
  max-inline-size:none;
 }
 .account-body .app-topbar .icon-button,
 .account-body .app-topbar .notification-bell,
 .account-body .app-topbar .topbar-connect,
 .account-body .app-topbar .theme-control{
  inline-size:36px;
  block-size:36px;
  min-inline-size:36px;
  min-block-size:36px;
 }
 .account-body .app-topbar .icon-button>.ui-icon{
  inline-size:16px;
  block-size:16px;
 }
}
/* Scope disclosure: what an agent connection can and cannot do. */
.mcp-scope{
 display:grid;
 gap:var(--ds-space-4);
}

.mcp-scope .scope-intro{
 margin:0;
 font-size:var(--ds-font-input);
 line-height:1.6;
 color:var(--muted);
}

.mcp-scope code{
 font-size:12px;
}

.mcp-scope .scope-groups{
 display:grid;
 gap:var(--ds-space-2);
 list-style:none;
 margin:0;
 padding:0;
}

.mcp-scope .scope-group{
 display:grid;
 gap:var(--ds-space-1);
 padding:var(--ds-space-3) var(--ds-space-4);
 border:1px solid var(--line);
 border-radius:var(--ds-radius-control);
 background:var(--surface);
}

.mcp-scope .scope-group[data-access=public]{
 border-color:var(--control-border);
}

.mcp-scope .scope-group-heading{
 display:flex;
 flex-wrap:wrap;
 align-items:center;
 justify-content:space-between;
 gap:var(--ds-space-2);
}

.mcp-scope .scope-group p{
 margin:0;
 font-size:var(--ds-font-small);
 line-height:1.6;
 color:var(--muted);
}

.mcp-scope .scope-access{
 display:inline-flex;
 align-items:center;
 min-block-size:22px;
 padding:0 var(--ds-space-2);
 border-radius:999px;
 background:var(--surface-soft);
 color:var(--ink);
 font-size:12px;
 font-weight:600;
 white-space:nowrap;
}

.mcp-scope .scope-group[data-access=public] .scope-access{
 background:var(--accent-soft);
}

.mcp-scope .scope-count{
 font-size:12px;
 color:var(--muted);
}

.mcp-scope .scope-boundary-title{
 margin:var(--ds-space-2) 0 0;
 font-size:var(--ds-font-control);
 font-weight:600;
}

.mcp-scope .scope-boundaries{
 display:grid;
 gap:var(--ds-space-2);
 list-style:none;
 margin:0;
 padding:0;
 font-size:var(--ds-font-small);
 line-height:1.6;
 color:var(--muted);
}

.mcp-scope .scope-boundaries li{
 position:relative;
 margin:0;
 padding-inline-start:var(--ds-space-4);
}

.mcp-scope .scope-boundaries li::before{
 content:'×';
 position:absolute;
 inset-inline-start:0;
 color:var(--danger);
 font-weight:600;
}

.mcp-consent .consent-scope{
 display:grid;
 gap:var(--ds-space-3);
 margin-block:var(--ds-space-6) var(--ds-space-5);
}

.mcp-consent .consent-scope>.config-note{
 margin:0;
}

.connection-scope>summary{
 font-weight:600;
}

.connection-scope .mcp-scope{
 margin-block-start:var(--ds-space-3);
}

/* Page header: product title size, not the landing display size. */
.account-body :is(.app-heading,.social-heading) h1,
.account-body #account-root h1.type-page{
 font-size:var(--ds-text-page);
 line-height:1.2;
 letter-spacing:-.01em;
 font-weight:600;
}

.account-body .app-heading{
 margin-block:0 var(--ds-space-6);
 gap:var(--ds-space-4);
}

.account-body :is(.app-heading,.social-heading) p{
 font-size:var(--ds-text-body);
 line-height:1.6;
 margin-block-start:var(--ds-space-2);
}

.account-body :is(.section-caption,.app-eyebrow){
 font-size:var(--ds-text-caption);
 font-weight:500;
 letter-spacing:normal;
 text-transform:none;
 color:var(--muted);
}

/* Top bar: every round control the same size; the primary action matches .button. */
.account-body .app-topbar :is(.icon-button,.theme-control,.notification-bell,.account-menu-toggle){
 inline-size:var(--ds-control-icon);
 block-size:var(--ds-control-icon);
 min-inline-size:var(--ds-control-icon);
 min-block-size:var(--ds-control-icon);
 border-radius:50%;
 border:1px solid var(--line);
 background:var(--surface);
 place-items:center;
 padding:0;
}

.account-body .app-topbar .topbar-connect{
 min-block-size:var(--ds-control-icon);
 padding:0 var(--ds-space-4);
 font-size:var(--ds-font-control);
 border-radius:999px;
}

.account-body .app-topbar .topbar-connect>.ui-icon{
 inline-size:16px;
 block-size:16px;
}

.account-body .app-topbar nav{
 gap:var(--ds-space-2);
}

.account-body :is(.section-row)>:is(span,small,a){
 font-size:var(--ds-text-caption);
}

/* Forum header: title at the content edge; actions grouped on the right. */
.account-body .social-heading>div:first-child{
 min-inline-size:0;
 flex:1 1 auto;
}

.account-body .social-heading-actions{
 display:flex;
 align-items:center;
 gap:var(--ds-space-2);
 flex-shrink:0;
}

.account-body small{
 font-size:var(--ds-text-caption);
}

/* Library: stacked rhythm inside the device panel and guide. */
.account-body .library-device-panel>div{
 display:grid;
 gap:var(--ds-space-4);
 align-content:start;
}

.account-body .library-device-panel>div>:is(h2,p,.section-caption){
 margin:0;
}

.account-body .library-device-panel>div>h2{
 margin-block-start:calc(var(--ds-space-2) * -1);
}

.account-body .library-device-guide{
 display:grid;
 gap:var(--ds-space-3);
 align-content:start;
}

.account-body .library-device-guide>*{
 margin:0;
}

.account-body .library-device-guide>p:has(.ui-icon){
 display:flex;
 align-items:center;
 gap:var(--ds-space-2);
}
