:root { --pane-width: 352px; --pane-paper:#fffdf7; --pane-ink:#20304f; --pane-line:#dcded8; background-color:#faf8f1; }
html { scrollbar-gutter:stable; }
.shell > .masthead { display:grid; grid-template-columns:auto 1fr auto; gap:20px; align-items:center; }
.shell > .masthead nav { justify-self:center; }
.account-bar { display:flex; gap:2px; justify-content:end; align-items:center; }
.account-bar a, #account-pane nav a { display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:0 9px; color:#334562; font-size:13px; font-weight:600; text-decoration:none; }
.account-bar a[aria-expanded=true], #account-pane nav a[aria-expanded=true] { color:#192f56; box-shadow:inset 0 -2px #bc962e; }
.account-bar a:hover, #account-pane nav a:hover { background:#f0efe7; }
#account-pane[hidden] { display:none; }
#account-pane { box-sizing:border-box; position:fixed; inset:0 0 0 auto; z-index:20; width:var(--pane-width); background:var(--pane-paper); color:var(--pane-ink); border-left:1px solid var(--pane-line); display:flex; flex-direction:column; line-height:1.45; }
#account-pane { box-shadow:-6px 0 24px #192f561a; }
@media (prefers-reduced-motion:no-preference) {
  .account-open #account-pane { animation:account-enter 160ms ease-out; }
  @keyframes account-enter { from { transform:translate(var(--pane-enter-x, 100%), var(--pane-enter-y, 0)); } to { transform:none; } }
}
.account-head { display:flex; align-items:center; justify-content:space-between; padding:8px 16px; }
#account-pane nav { display:flex; border-block:1px solid var(--pane-line); padding-inline:10px; gap:8px; }
.account-scroll { overflow:auto; overscroll-behavior:contain; padding:.75rem .875rem; min-height:0; }
.account-body, .account-body form, .account-body details[open] > form { display:grid; gap:.375rem; }
.account-body > *, .account-body form, .account-body label, .account-body details, .account-status { margin:0; min-width:0; }
.account-body h2 { font-size:22px; }
.account-body h3 { font-size:15px; margin-top:6px; }
.account-body p, .account-status { color:#485773; font-size:14px; }
.account-status:not(:empty) { margin-top:12px; }
.account-body label { display:block; font-size:13px; font-weight:600; }
.account-body input:not([type=checkbox]), .account-body select { display:block; box-sizing:border-box; width:100%; min-height:var(--control-height); margin-top:.125rem; padding:.125rem .4rem; border:1px solid #afb6bd; border-radius:5px; background:white; font:inherit; color:inherit; }
.account-body button, #account-pane .provider-button { box-sizing:border-box; justify-self:start; min-height:var(--control-height); padding:.15rem .55rem; border:1px solid #d2d4cc; border-radius:6px; background:white; color:var(--pane-ink); cursor:pointer; font:600 13px/1.3 var(--type-font,sans-serif); }
.account-body button[type=submit] { background:#edca67; border-color:#d2ae50; }
#account-pane .provider-button { display:flex; gap:10px; align-items:center; justify-content:center; text-decoration:none; }
.account-body details, .account-row { border-top:1px solid var(--pane-line); }
.account-body summary { padding:.25rem 0; cursor:pointer; min-height:var(--control-height); box-sizing:border-box; font-weight:600; }
.account-row { display:flex; align-items:center; flex-wrap:wrap; gap:6px 12px; padding:8px 0; }
.account-body { overflow-wrap:anywhere; }
.account-body pre, .account-body code { display:block; white-space:pre-wrap; overflow-wrap:anywhere; font-size:12px; }
.account-body pre { border-left:2px solid #d4ae47; padding:8px 12px; background:#f5f3e9; }
.account-body .account-row code { width:100%; }
#account-pane .account-close, dialog #close { box-sizing:border-box; display:grid; place-items:center; padding:0; width:44px; height:44px; min-width:44px; min-height:44px; flex:0 0 44px; border:1px solid var(--pane-line); border-radius:6px; background:transparent; color:#263954; font:24px/1 sans-serif; cursor:pointer; }
#connect #journey-intro { display:grid; grid-template-columns:minmax(0,1fr) minmax(330px,410px); align-items:start; gap:18px; background:none; margin:0; padding:16px 0; border:0; border-bottom:1px solid var(--pane-line); border-radius:0; }
#connect #journey-intro h1 { max-width:21em; }
#connect #journey-intro .lede { max-width:55ch; }
.has-invitation #connect #journey-intro { display:none; }
#pulse .pulse-controls, #pulse .pulse-list-row, #exchange .side { border-radius:0; box-shadow:none; }
#pulse .pulse-controls { background:transparent; border-inline:0; padding-inline:0; }
#pulse .pulse-list-row { border-width:0 0 1px; }
#exchange .flow-scene { padding:12px 0; border-width:1px 0; border-radius:0; background:transparent; }
#exchange .sidehead { padding-block:8px; }
@media(max-width:1079px) {
  #account-pane { --pane-enter-x:0; --pane-enter-y:100%; }
  #account-pane { inset:auto 0 0; width:auto; height:min(55dvh,480px); border:0; border-top:2px solid #a6b1c1; box-shadow:0 -5px 18px #192f5610; }
  .account-scroll { padding:12px 16px max(12px,env(safe-area-inset-bottom)); }
  .account-head { padding:2px 12px; }
}
@media(max-width:780px) {
  .shell > .masthead { display:grid; grid-template-columns:minmax(0,1fr) auto; grid-template-areas:"brand account" "nav nav"; height:auto; gap:0; padding:4px 0 8px; }
  .shell > .masthead .brand { grid-area:brand; }
  .shell > .masthead nav { grid-area:nav; width:100%; }
  .account-bar { grid-area:account; }
  .account-bar a { padding-inline:6px; }
  #connect #journey-intro { grid-template-columns:minmax(0,1fr); gap:8px; }
}
.account-contacts { display:grid; gap:8px; }
.account-contacts > * { margin:0; }

/* Root-relative type follows the browser’s preferred text size. */
#account-pane { --control-height:1.75rem; --pane-copy:.8125rem; --pane-control:.75rem; --pane-meta:.71875rem; font:400 var(--pane-copy)/1.4 var(--type-font); background:#faf8f1; }
.account-head { gap:.5rem; padding:.4rem .875rem; }
.account-head strong { font-size:1.125rem; line-height:1.25; letter-spacing:-.025em; }
.account-email { display:block; overflow-wrap:anywhere; font-size:var(--pane-meta); color:#52617a; }
#account-pane nav { border-top:0; padding-inline:12px; }
#account-pane nav { flex-wrap:wrap; gap:.15rem; }
#account-pane nav a { min-height:2rem; padding:0 .5rem; font-size:var(--pane-control); }
.account-bar a { font-size:var(--type-control); }
.account-bar a[data-account-entry] { gap:7px; }
.account-bar svg { width:17px; height:17px; }
.account-count:not([hidden]) { color:#192f56; background:#edca67; padding:0 5px; border-radius:8px; font-size:var(--type-meta); }
#account-pane h2, #account-pane h3 { margin:0; font-size:.9375rem; letter-spacing:-.02em; line-height:1.4; }
#account-pane :is(label,button,summary,p,.provider-button) { font-family:var(--type-font); font-size:var(--pane-control); }
#account-pane .account-close { inline-size:var(--md-control-height); block-size:var(--md-control-height); min-inline-size:var(--md-control-height); min-block-size:var(--md-control-height); flex-basis:var(--md-control-height); font:1.25rem/1 var(--type-font); }
.account-section-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.account-section-heading button { color:#192f56; background:#edca67; border-color:#d2ae50; }
.account-editor:not([hidden]) { display:grid; gap:8px; padding:12px; background:#fffdf7; border:1px solid var(--pane-line); border-radius:7px; }
.account-editor > * { margin:0; }
.linked-agent > summary { display:grid; grid-template-columns:1fr auto; column-gap:8px; }
.linked-agent > summary::after { content:'⌄'; grid-area:1 / 2 / 3 / 3; align-self:center; }
.linked-agent[open] > summary::after { transform:rotate(180deg); }
.linked-agent > summary small, .contact-presence { display:block; font-size:var(--pane-meta); font-weight:400; color:#53617a; }
.linked-agent[open] > form { margin-block:6px 14px; }
.account-contacts .contact-person { display:grid; grid-template-columns:32px minmax(0,1fr) auto; align-items:center; gap:10px; }
.contact-avatar { display:grid; place-items:center; width:32px; height:32px; border-radius:50%; background:#e9ede7; color:#335846; font-weight:600; }
.contact-presence::before { display:inline-block; content:''; width:7px; height:7px; margin-right:5px; border-radius:50%; background:#90999e; }
.contact-presence.is-online::before { background:#43815f; }
.contact-actions { display:flex; flex-wrap:wrap; gap:3px; }
.contact-actions details { border:0; }
.contact-actions summary { color:#435470; }
.contact-person:has(.contact-actions > button:nth-child(2)) .contact-actions { grid-column:2 / -1; }
@media(max-width:600px) { .account-head { padding:6px 14px; } }
.account-bar [data-account-entry] img { width:24px; height:24px; flex:none; border-radius:50%; object-fit:cover; }
.account-body .linked-agent[open] > form {
  display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; align-items:end; margin:4px 0 10px;
}

#account-pane :is(input:not([type=checkbox]),select) { font:400 var(--pane-copy)/1.35 var(--type-font); }
.account-body code, .account-body pre, .account-body small, .account-status { font-size:var(--pane-meta); }
.profile-names { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.5rem; }
.account-body form + h3 { margin-top:.75rem; }
.contact-person small { display:block; color:#53617a; }
#account-pane .contact-more { min-width:var(--control-height); padding:0 .25rem; font-size:1rem; line-height:1; }
.contact-person .contact-invited { color:#285640; font-weight:600; }
.contact-options { position:fixed; inset:auto; margin:0; padding:.375rem; box-sizing:border-box; width:max-content; max-width:min(17rem,calc(100vw - 12px)); max-height:calc(100dvh - 12px); overflow:auto; border:1px solid #d2d4cc; border-radius:.4rem; background:#fffdf7; color:#20304f; box-shadow:0 4px 14px #192f5624; }
.contact-options:popover-open, .contact-menu-actions:not([hidden]), .contact-collaboration, .contact-remove-confirm:not([hidden]) { display:grid; gap:.2rem; }
.contact-collaboration > small, .contact-collaboration > details, .contact-remove-confirm { padding:.2rem .35rem; }
.contact-menu-actions small, .contact-remove-confirm small { display:block; overflow-wrap:anywhere; }
.account-body :is(.contact-menu-actions,.contact-collaboration) > button { justify-self:stretch; min-height:var(--control-height); padding:.22rem .4rem; background:transparent; border:0; text-align:left; }
.account-body :is(.contact-menu-actions,.contact-collaboration) > button:is(:hover,:focus-visible) { background:#f0efe7; }
.account-body .contact-menu-actions > button:last-child { color:#884331; }
.account-body .contact-menu-actions details { border:0; }
.account-body .contact-menu-actions details button { margin:.25rem .25rem 0 0; }
.contact-remove-confirm { grid-template-columns:auto auto; }
.contact-remove-confirm :is(small,strong) { grid-column:1/-1; }
.account-body .contact-menu-actions textarea { width:100%; margin-block:.25rem; }
@media(pointer:coarse) {
  #account-pane { --control-height:2.125rem; }
  #account-pane :is(input:not([type=checkbox]),select) { font-size:max(16px,1rem); }
  .account-body button, .account-close { position:relative; }
  .account-body button::after, .account-close::after { content:''; position:absolute; inset:-.15rem 0; }
}

#account-signin {
  position:fixed; inset:auto; z-index:21; margin:0; box-sizing:border-box;
  width:min(17rem,calc(100vw - 1.25rem)); max-height:calc(100dvh - 1.25rem); overflow:auto;
  padding:.875rem; border:1px solid var(--pane-line); border-radius:.625rem;
  background:var(--pane-paper); color:var(--pane-ink); box-shadow:0 6px 22px #192f5624;
  font:400 .8125rem/1.45 var(--type-font,sans-serif);
}
.signin-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:.625rem; }
.signin-head h2 { color:inherit; font:650 1rem/1.3 var(--type-font,sans-serif); margin:0; }
.signin-head button { display:grid; place-items:center; width:2rem; height:2rem; padding:0; border:0; border-radius:.25rem; color:inherit; background:transparent; cursor:pointer; font:1.2rem/1 sans-serif; }
.signin-content { display:grid; gap:.375rem; }
.signin-content small { margin-top:.25rem; color:#53617a; font-size:.75rem; }
#account-signin .provider-button, #account-pane .provider-button, dialog .provider-button {
  display:flex; align-items:center; justify-content:flex-start; gap:.65rem; box-sizing:border-box;
  width:100%; justify-self:stretch; min-height:2.125rem; padding:.3rem .7rem; margin:0;
  border:1px solid #c9cec9; border-radius:.375rem; background:white; color:var(--pane-ink);
  text-decoration:none; font:600 .8125rem/1.35 var(--type-font,sans-serif);
}
.provider-button :is(svg,b) { width:1rem; flex:0 0 1rem; }
#account-signin :is(button,a):hover { background:#f0efe7; }
.account-bar img[hidden] { display:none; }

.account-tab { display:inline-flex; align-items:center; }
#account-pane .account-tab a[aria-expanded=true] { padding-inline-end:.2rem; }
.account-tab-info {
  display:grid; place-items:center;
  min-width:1.6rem; min-height:2rem; padding:0; border:0; border-radius:.35rem;
  background:transparent; color:#425570; cursor:pointer;
}
.account-tab-info span {
  display:grid; place-items:center; box-sizing:border-box; width:1.05rem; height:1.05rem;
  border:1.5px solid currentColor; border-radius:50%; font:700 .78rem/1 Georgia,serif;
}
.account-tab-info:is(:hover,[aria-expanded=true]) { background:#eeeee6; color:var(--pane-ink); }
.account-tab-guide:not([hidden]) {
  margin:0 0 .75rem; padding:0 0 .75rem; border-bottom:1px solid var(--pane-line);
  color:#495973; font-size:var(--pane-copy); line-height:1.45;
}

.account-bar .signup-entry {
  position:relative;white-space:nowrap;background:#ead079;color:#192f50;
  border:1px solid #cfb35f;border-radius:.4rem;padding:.38rem .7rem;
  font:600 var(--type-control,.83rem)/1.25 var(--type-font,sans-serif);cursor:pointer;
}
.account-bar .signup-entry::before {content:"";position:absolute;inset:-.48rem 0}
.account-bar .signup-entry:hover {background:#efd98d}
.account-bar .signup-entry[hidden] {display:none}
@media(min-width:1000px) {
  .account-bar .signup-entry[data-grant]::after {content:" for " attr(data-grant) " mynit"}
}
#account-signin .signin-content p {margin:.15rem 0 .45rem}
#account-signin .auth-switch {
  justify-self:start;border:0;background:transparent;color:#234474;cursor:pointer;
  padding:.45rem 0;font:600 .8125rem/1.4 var(--type-font,sans-serif);text-decoration:underline;
}
#account-signin details {margin-top:.35rem}
#account-signin details summary {cursor:pointer}

.account-spaces { display:grid; gap:.65rem; }
.account-spaces p, .account-spaces ul { margin:0; }
.account-spaces a { color:var(--pane-ink); text-underline-offset:.15em; }
.account-spaces .repo-team { padding:.15rem 0 .6rem .75rem; }
.account-spaces .repo-team ul { list-style:none; padding:0; }
.account-spaces .repo-team li { display:grid; margin-bottom:.45rem; }
.account-spaces .repo-team small { color:#485773; }
.account-spaces .repo-list summary { padding-block:.45rem; }
.account-spaces .repo-invitations > div { display:flex; justify-content:space-between; align-items:center; gap:.5rem; padding-block:.4rem; border-bottom:1px solid var(--pane-line); }

.account-spaces h2 { display:inline-flex; align-items:center; gap:.4em; }

#account-pane .account-github-connection { display:inline-flex; align-items:center; gap:.45rem; max-width:100%; overflow-wrap:anywhere; }
#account-pane button.account-github-connection { min-height:2.5rem; padding:.35rem .8rem; background:#edca67; border-color:#d2ae50; }
.account-github-connection img { flex:none; }

#account-pane .repo-picker, #account-pane .repo-fields { display:grid; gap:.75rem; min-width:0; }
#account-pane .repo-picker { padding-block:.5rem; border-block:1px solid var(--pane-line); }
#account-pane .repo-picker :is(input,select) { width:100%; min-width:0; min-height:2.25rem; margin-top:.25rem; }
#account-pane .repo-access { padding:.45rem 0; }
#account-pane .repo-access summary { cursor:pointer; }
#account-pane .repo-access[open] > p { margin:.5rem 0; }
#account-pane .repo-results { margin:.35rem 0 .6rem; }
#account-pane .repo-result { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:.65rem; padding:.55rem 0; border-bottom:1px solid var(--pane-line); }
#account-pane .repo-result strong, #account-pane .repo-result small { display:block; overflow-wrap:anywhere; }
#account-pane .repo-result small { color:#52617a; margin-top:.15rem; }
#account-pane .repo-result button { justify-self:end; min-height:2rem; padding:.3rem .6rem; }
#account-pane .repo-actions { display:flex; flex-wrap:wrap; align-items:center; gap:.45rem .8rem; }
#account-pane .repo-actions a { display:inline-flex; align-items:center; min-height:2rem; overflow-wrap:anywhere; }
@media (pointer:coarse) {
  #account-pane .repo-picker :is(button,select,input,summary), #account-pane .repo-actions a { min-height:44px; }
  #account-pane .repo-picker :is(input,select) { font-size:1rem; }
  #account-pane .repo-picker button::after { content:none; }
}

/* One scrolling surface with persistent account navigation. */
#account-pane { width:clamp(22rem,30vw,28rem); }
#account-pane .account-head, #account-pane nav { flex:none; }
#account-pane .account-scroll { flex:1 1 auto; }
#account-pane .account-group { display:grid; gap:.4rem; min-width:0; }
#account-pane .account-group:not(:first-child) { border-top:1px solid var(--pane-line); padding-top:.7rem; margin-top:.35rem; }
#account-pane .linked-agent { padding-block:.25rem; }
#account-pane .linked-agent[open] > form + details { padding-top:.25rem; }
#account-pane .repo-picker { gap:.4rem; padding-block:.45rem; }
#account-pane .repo-picker :is(input[type=search],select) {
  box-sizing:border-box; height:2.125rem; min-height:2.125rem; padding-block:.125rem;
  margin-block:.2rem 0; font-size:max(1rem,16px); line-height:1.25;
}
#account-pane .repo-fields { grid-template-columns:repeat(2,minmax(0,1fr)); gap:.5rem; }
#account-pane .repo-filters[open] .repo-fields { padding:.2rem 0 .55rem; }
#account-pane .repo-picker :is(.repo-filters,.repo-access) { padding:0; }
#account-pane .repo-picker details summary { display:list-item; align-content:center; }
#account-pane .repo-result { padding:.35rem 0; }
#account-pane .repo-results { margin:.1rem 0 .3rem; }
#account-pane .repo-actions > [hidden] { display:none; }
@media (min-width:701px) and (max-width:1079px) {
  #account-pane { inset:0 0 0 auto; height:auto; border-top:0; border-left:1px solid var(--pane-line); --pane-enter-x:100%; --pane-enter-y:0; }
}
@media (max-width:700px) {
  #account-pane { inset:var(--account-visible-top,0px) 0 auto; width:auto; height:var(--account-visible-height,100dvh); padding-top:env(safe-area-inset-top); border:0; }
  #account-pane .account-scroll { padding:.65rem .875rem max(.75rem,env(safe-area-inset-bottom)); }
  #account-pane .repo-picker :is(input[type=search],select) { height:2.25rem; min-height:2.25rem; }
}

#account-pane .repo-list > a { display:flex; justify-content:space-between; align-items:center; min-height:44px; gap:.5rem; padding:.4rem 0; border-bottom:1px solid var(--pane-line); font-weight:600; text-decoration:none; overflow-wrap:anywhere; }
#account-pane .repo-list > a::after { content:'›'; color:#54647a; }
#account-pane .repo-list > a[hidden] { display:none; }
#account-pane .space-create { margin-top:.75rem; }
#account-pane .space-create > summary { padding:.45rem 0; }

#account-pane .account-spaces { display:grid; gap:.5rem; }
#account-pane .repo-list > a span, #account-pane .repo-choice > span { display:grid; min-width:0; gap:.1rem; }
#account-pane .repo-list small, #account-pane .repo-choice small { color:#536377; font-weight:400; }
#account-pane .repo-list > a { padding:.65rem .2rem; }
#account-pane .choosing-repo > .joined-spaces { display:none; }
#account-pane .space-create { order:-1; margin:0; border:0; }
#account-pane .account-spaces > .account-section-heading { order:-2; }
#account-pane .space-create > summary { display:flex; width:fit-content; align-items:center; min-height:44px; color:#334f70; cursor:pointer; font-weight:600; }
#account-pane .space-create > summary::-webkit-details-marker { display:none; }
#account-pane .account-spaces:not(.choosing-repo) .space-create { order:1; }
#account-pane .account-spaces:not(.choosing-repo) .space-create > summary::before { content:'+'; margin-right:.45rem; }
#account-pane .repo-picker { border:0; }
#account-pane .repo-picker .repo-result { display:block; }
#account-pane .repo-picker .repo-choice { display:flex; justify-content:space-between; align-items:center; gap:.75rem; min-height:48px; width:100%; margin:0; padding:.3rem .1rem; overflow-wrap:anywhere; cursor:pointer; }
#account-pane .repo-choice input[type=radio] { flex:none; width:1.1rem; height:1.1rem; min-height:0; margin:0 .25rem; accent-color:#375e4b; }
#account-pane .repo-picker .repo-create-submit { margin:0 0 .4rem; }
#account-pane .repo-filters summary { overflow-wrap:anywhere; }
